Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Automagic VR for Maxwell Render
automagicLatLongStereo.py" script is used to quickly prepare your Maxwell Studio mxs scenes for rendering immersive 360° LatLong Stereo VR content.
Download the Script
You can download version 0.3 of the Automagic VR for Maxwell Render script here:
Copy the "stereo" folder to your Maxwell 3.2 scripts directory:
Windows Scripts Folder:
C:/Program Files/Next Limit/Maxwell 3/scripts/
Linux Scripts Folder:
macOS Scripts Folder:
How do I use the script?
Step 1. Edit your Maxwell MXS scene file so there is only one camera. Set the focus distance on the camera to target the exact location in the scene that you want to use as the stereo camera rig's zero parallax distance (which is the convergence point for the left and right eyes). Then add the LatLong Stereo lens shader to the camera.
Step 2. Launch PyMaxwell and open up the "
automagicLatLongStereo.py" python script.
Step 3. Customize the settings in the script.
Edit the "mxsFilePath" variable in the main function near the bottom of this script and specify your Maxwell Studio based MXS scene file.
Edit the "separationTexturePath" variable in the main function near the bottom of this script and specify your LatLong Stereo separation map texture image.
Edit the the camera views to render section in the main function near the bottom of this script and specify if you want to render the left, right, or center camera views by editing the "leftView", "rightView", or "centerView" variables to equal 1.
If you wanted to render the left and right views automatically you would set the code to:
# Camera Views to Render # ---------------------- # Set each of the views to 1 to render, and 0 to skip rendering leftView = 1 rightView = 1 centerView = 0
If you wanted to render just the center camera view automatically you would set the code to:
# Camera Views to Render # ---------------------- # Set each of the views to 1 to render, and 0 to skip rendering leftView = 0 rightView = 0 centerView = 1
Step 4. Select the Script > Run menu item in PyMaxwell.
The script will start running. First the script will verify the mxs scene file exists.
If the mxs file is located then the scene will be opened in Maxwell and the camera parameters will be edited.
The camera's target / focus distance value will be used as the parallax distance for the LatLong Stereo lens shader and a suitable camera separation value is calculated based upon the current "stereoDepthStrength" value that is specified in the main function at the bottom of this script.
Then the lens shader's camera view is adjusted so a set of center, left and right camera view based scene files are generated with the names "
<scene>_L.mxs", and "
<scene>.R.mxs". These new files are saved to the same folder as the original mxs scene file.
Then the LatLong Stereo camera views that are enabled for rendering with either the "
leftView = 1" and "
rightView = 1", or "
centerView = 1" options will be rendered in Maxwell Render.