Maxscript - Vray Cubemap Generator for Unity
After weeks of evaluation of today’s cross platform SDK options, we have finally decided to move forward with Unity.
While evaluating Unity, I have created a small helper MAXScript to export Vray rendered cubemaps from Max to Unity. Since I’m unable to find something similar, I have decided to release it to the public as I think it might be helpful for the community I’m about to step in… After polishing it up a little bit (UI, etc.) here it is…
What it does?
With this script, you will be able to easily render cubemaps ready to import to Unity for use as reflection maps or skyboxes. After execution, script will generate 6 image files with the correct naming scheme for Unity.
- Keeps your current render settings, after you’re done executing the script your settings will be restored.
- Rendered images will match max’s bitmap output gamma settings.
- You may output to all type of images supported by 3DS MAX.
- You will be able to select your output path.
- Rendered images will have correct naming scheme appended based on the type, skybox or reflection.
- Fully selectable cubemap sizes.
- When creating skyboxes you have option to render bottom piece 1/4 smaller than rest of the image set.
- There is an experimental blur feature, might be useful specially for reflection maps.
- Detects if Vray is your current renderer and offers an easy switch if it is not.
- New: Option to rotate back piece by 180 degrees. (v0.2)
- Rendering from the point of view of selected scene object.
- Using existing (max or vray) scene camera to render, keeping it’s settings.
- Better seam free blur with more precise control.
- Option to save default launch preferences.
- Your suggestions.
Requirements & Compatibility
In order to use that script, you will need Unity, 3DS Max & Vray. Script should be compatible with all versions but it is not widely tested. So, if you use it please let me know so we can keep a compatibly matrix and/or fix any possible bugs…
Installation & Usage
After downloading the zip file place included maxscript (.ms) to the following location: 3dsMaxRoot\Scripts\Startup
After launching max, go to Customize -> Customize User Interface. Click on Toolbars tab and within the Category pulldown, locate “Pixel Envision” entry.
From here you may drag&drop it to anywhere suitable for your use as shown in the next image.
Now, clicking on the icon will bring up the interface. Usage should be pretty self explanatory but there is one thing to point out. Once imported to Unity, make sure to set texture wrap mode to “Clamp” or otherwise you may see “seams” especially on the skyboxes…
- Current version: v0.2 – 20 March 2012
- Download Vray Cubemap Generator for Unity