Ok well I cracked something together, again without some real-world examples it may be missing some features or break (see the screenshot at the bottom). Feel free to give me feedback and send me some material cases. Warning: Still in test phase, save your files and don't send me death threats... pretty please. Script attached to this post.
This is what it converts:
- Diffuse (if it cant find Diffuse texture it will use the Swatch Color)
- Roughness
- Opacity
- Metal
- Normal
- Multi-Sub materials supported
Other notes:
- Autodesk Physical Material to Corona Physical Material
- Using CoronaBitmap nodes instead of standard Bitmap nodes
- Keeps naming convention from Physical Material map nodes instead of 'CoronaBitmap' naming
- Gamma 2.2 for Diffuse, Gamma 1.0 for all other textures
- Normal texture goes into the 'Corona Normal > Input Image' node. If you use standard Bump I can put a clause in there to swap it over if it doesn't find your naming convention. For example if "_Normal.png" not found in texture name then place in "Additional Bump Mapping" slot instead.
- If Metal texture used then Corona Physical Material switches Metalness to 'Metal'. Again can be scripted to find a value instead and switch it on if < 0 or whatever.
- Careful regarding Metal Materials, follow the PBR guide, for
Diffuse textures lowest black value 40, highest white value 240 otherwise your Metals will blank out at lower values.
Metal textures still can use the 0-255 range. We could use the standard workflow Corona introduced when converting from Vray materials with Metal but I have my doubts about this 'Mix' value (for those who have done their own comparisons).
- Do not stack Multi-Sub materials within Multi-Subs.
- The script works scene wide, not on selected objects. Only converts Autodesk Physical Materials so wont affect Corona or Vray materials etc.
- Currently only working with bitmap nodes plugged in as per the screenshots below, I need real-world material cases to test all situations. Default material import settings from sketchup or whatever is best for fastest workflow. For example if by default a material imports with multiple nodes between the bitmap and material then this script will not work.Install:
- Drag the .ms file into 3dsmax
- Customize > Customize User Interface > Toolbars > Category: Vella > Automate PhysicalToCorona > Drag this to your toolbar.
- Click the button
Autodesk Physical Material
Corona Physical Material - Converted with script
Autodesk Physical Material (Multi-Sub)
Corona Physical Material (Multi-Sub) - Converted with script
Example of how the script will break (currently) if there are extra nodes between the bitmaps and the material (In the Autodesk Physical Material). This is why I need real-world examples of imported materials. Once I have a few examples I will put some try/catches in so it skips over anything it cant find so the script will be more stable (Reminder I'm not a pro scripter, there is some recursive things going on I need to get my head around, enough for today).
However there is a fairly simply workaround for now I could do that wont break, that is just copy the entire tree into the nodes. So that means whatever nodes connect to each material input will be retained. This means that the Bitmaps will be standard Bitmap nodes instead of CoronaBitmaps. But you could just use the Corona Conversion script after to convert those from Standard Bitmap to CoronaBitmap if you want, Let me know your thoughts. Here is an example.