Corona Vray to GLB is a free script that converts either Corona Physical or Vray Materials to GLTF Materials. This is designed for the
Metal PBR Workflow.
Download here (For those not used to github, once you press on this link, top right corner press the three dots "..." and press Download)Install:- Drag the script into your 3dsmax viewport.
- Customize > Customize User Interface > Toolbars > Category: Vella > Automate CoronaVrayToGLB
- Drag this toolbar button somewhere in your UI/Toolbars
Supported textures:- Diffuse/Base Color/Albedo
- Roughness
- Metal
- Occlusion
- Emission/Self Illumination
- Alpha/Opacity
- Normal
UI:UI Notes:
TLDR - These notes are also available in the tooltips
- Export GLB Directory <BUTTON>: The "..." button allows you to pick the directory to save your .glb files.
- Find Missing Bitmaps: A material must contain at least one bitmap (eg. Sofa_Diffuse.png), if all other "Supported textures" are found in the same directory as that bitmap it will path all these for you into the GLTF material. For example Sofa_Occlusion or Sofa_Roughness etc.
- Rename GLTF Maps: If your Maps have names like Map #1 it will rename these for you in the GLTF material according to the type eg "Base Color" or "Roughness" etc. This will also replace any name you have set so be aware.
- Remove GLB log file: Deletes the .log file that gets exported with the .glb file.
- Remove Subdivision Modifiers: Deletes Turbosmooth, Opensubdiv, Meshsmooth modifiers.
- Collapse Multi-Sub Materials: WARNING: I advise you do not enable this as its very specific to my workflow (unless you find it useful for some reason). What it does is take the sub material with the highest texture count and uses that material for the GLTF.
- Hide Warning Popups: You will often get a messagebox popup about missing textures such as Metal or if it fails to find your Occlusion textures in the directory. If you are happy with your workflow and would rather not be pestered about this then this button is for you.
- Convert Materials (selected): Checkbox ON for selected objects, Checkbox OFF for everything in the scene.
- Convert Materials <BUTTON>: Converts Corona/Vray materials to GLTF Material. This also applies to the "Settings" above including Subdivision Modifiers and Multi-Subs.
- Export Selected (Individual): Exports all the selected objects as individual files such as Box001.glb Box002.glb etc.
- Export Selected (Combined): Exports all the selected objects as one .glb file (you set the name which will appear after selecting the checkbox, dont add .glb to the end of the filename (unless double filename extensions is your jam!)
- Export All (Scene): Same as Exported Selected (Combined) however applies to the entire scene, selections are ignored.
- Export GLB File(s) <BUTTON>: Exports .glb file(s) to your selected directory. Double check your materials are correct first. Undo if necessary.
- Save Settings as Default <BUTTON>: Remembers all your current settings for future, including your export directory.
- Restore Original Settings <BUTTON>: Loads default/original settings.
GLTF Material Notes:- Replaces CoronaBitmap with path only, doesnt copy settings to the bitmap such as UV coords etc. May be a future implementation but GLB files work best when you are using unwrapped 0-1 UV space bitmaps with no specific offsets/cropping/rotation/etc. Happy to receive feedback on this otherwise.
- GLTF values will be default to 1.0 for all bitmaps (as the bitmap should drive the settings, not values)
- Alpha will be set to mask mode if you have Opacity/Alpha textures. If your working with a glass material set this to blend instead.
- Gamma is set to 1.0 for all bitmaps except the Base Color and Emission which uses 2.2
- Render Engine: If Corona is selected then Corona Physical Materials are converted. If Vray is selected then Vray Materials are converted. Not both at the same time.
Find Missing Bitmap Rules: - Example: My_Bitmap_Diffuse.jpg
- "My_Bitmap" is the prefix, this must match your other textures you want to auto-find such as My_Bitmap_Roughness, My_Bitmap_Occlusion etc.
- The suffix is "_Diffuse" or "-Diffuse" (leading hyphen or underscore).
- The bitmap search is not case sensitive and matches partial words, this means DIFF is the same as diff or diffuse.
- You can match the suffix to any of the following: "Diff", "Base", "BaseColor", "Color", "Albe", "Alph", "Opac", "Metal", "Rough", "AO", "Occlus", "AmbientO", "Emiss", "SelfIllum", "Norm" (Also happy to get feedback on common/production acronyms)
Example:Version 1.0:- This is just an alpha version to get it out into the wild, feel free to play with it, break it, give me your feedback.
- If you get an error message the UI will stop working so you will have to close/re-open it. Then let me know about it.
- Save your scenes before using it, undo is not always stable but you can try it (might crash with larger scenes).
- As always, have fun!