immersive projection environments
I'm posting here some tests renderings using a domemaster lens shader for mental ray that allows for 3D steroscopic images.
It's still a work in progress, and I'd like to make this an open effort, posting all the info, research, user interface, and the source code (later on).
A quick intro about myself. I've been working on computer graphics for too long now, and while I used to be a developer (15 years ago), I'm now mainly doing 3D content. I started evaluating the possibility of steroscopic domemaster images after I was asked by Terry Galloway at the Chabot Space and Science Center in CA to do some research.
I started with Daniel F. Ott Angular fisheye shader, and expanded (a lot) from there.
Daniel's shader can be found here, and it is also included in the DLL I will post soon.
This shader starts from the camera position, and creates two virual cameras (left and right, renderable one at a time) that rotate, constantly looking at the specific point of the dome matching the current rendered pixel.
The shader supports horizontal and vertical domes, and any degree of tilt in-between.
Here are two samples of Center, Left, and Right images, in vertical and horizontal mode.
It's not easy to see the differences here, but look below at the test stereo pairs.
The Center image would match Daniel's shader, but it has a different orientation, as I use some tricks to rotate the coordinate system 90 degrees. The current orientation matches the camera viewport, so it's extremely intuitive to setup the camera.
Of course, withouth some restrictions, this system will creates distortion points and areas where the 3D effect is wrong, reversed, or misaligned. The shader allows the use of maps to control the cameras separation (reduce or eliminate 3D effect), head rotation (force some areas to be looked with the head looking straight), and head tilt.
These are sample maps that I'm using for testing.
Using the Turn and Separation maps above, you can see what happens when rendering a simple grid (Red=Right, Green=Left).
The image above is something I would consider for horizontal or slightly tilted domes, where above/behind the viewer head the 3D effect is eliminated to allow the top of the dome to be looked at without turning the head, and the back with fully turned head.
But maps can be used creatively to control any area of the dome. Here, the Turn map above is used in combination with a simple gradient as a Separation map to have 3D only in the front part of the dome.
I think the math is almost there. The User Interface might need some adjustments, and maybe some automatic correction of distorted areas can be used instead of the maps, but the major issue now is to find a way to create proper maps.
Unfortunatley, I don't have any dome at home to try it, so I rely on simulated previews using a 3D concoction in 3ds Max, but that won't let me verify if the head tilt and rotation is set correctly. I think those values can be only found by experimentation on real domes.
These are some samples from the horizontal and verticals samples above. Relax (don't cross) your eyes to see the 3D effect. It helps is you are a bit shortsighted and take you glasses off :)
I will post more tomorrow. If you have any comments, please post.
There is a new Domemaster3D v1.8.2 Release out for 3DS Max and Maya.
Version 1.8.2 - August 17, 2015
Added the Vray 3.1 for Maya Domemaster3D shader beta files to the folder:
Added the first working version of the Cinema4D C4DtoA Domemaster3D shader beta files to the folder:
Updated the Dome Diagnostics tool to include a check for the Maya "MAYA_DISABLE_IDLE_LICENSE" env variable detection
Added a domeOpenSourceImagesDirectory() function to open the sourceimages directory. This is used by the Domemaster3D Maya shelf tool "SRC".
Added a Maya Domemaster3D Hybrid MR + Maya Color Material. The new Hybrid mentalrayTexture material shading network combines the render time improvements of a mental ray texture based surface material for reducing blurry streak artifacts when rendering with lens shaders, and a real-time high resolution preview benefit of a stock maya file texture node. The shading group uses the "Suppress all Maya Shaders" setting to make sure the mentalrayTexture is used at render time in a similar fashion to how the Starglobe surface material works. A place2dTexture node is used to drive the placement of both the mentalrayTexture and the Maya file texture nodes. Note: The place2dTexture WrapU and WrapV attributes are not supported by the mentalrayTexture node so it is a good idea to keep the rotate frame setting to 0/90/180/270, and the RepeatUV values in the range of 0-1 so the texture map doesn't expose the blank area outside the image area when transformed.
Added two new mia_material_x_passes material presets "Gold" and "AmberCrystalGlass". They do a really good job of demonstrating the new Maya 2016 Hypershade material preview viewport window's mental ray rendering mode.
There is a new Domemaster3D v1.8.3 Release out for 3DS Max and Maya. Version 1.8.3 - August 27, 2015
Added the Maya AE python template resources to the MtoA shader release that is included with the Domemaster3D installer.
Added a "Add Pre/Post Render Mel" and "Remove Pre/Post Render Mel" set of menu items to the Domemaster3D menu and shelf buttons labelled "ADD" and "REM". The "Add" shelf button adds the Domemaster3D pre-render mel scripts to the render settings window. This is used for the LatLongStereo and DomeAFL_FOV_Stereo shaders to switch the stereo camera rig between the realtime anaglyph stereo mode in the viewport and the mental ray lens shader controlled stereo mode at render time. The "Rem" button removes the Domemaster3D pre-render mel scripts from the render settings window and disables the realtime anaglyph viewport preview mode. This is used to prepare a scene that might be submitted to an online render farm service that doesn't allow pre/post render mel scripts to be included with a scene file.
Added a "MAYA" shelf tool and the "Launch Another Maya Instance" Domemaster3D menu item will launch an additional copy of Maya that will run independently. This is handy if you want to work in two separate Maya sessions at the same time. The MEL command used by the shelf tool is: source "domeDiagnostics.mel"; domeLaunchMayaInstance();
Updated the DomeAFL_FOV_Stereo and LatLong_Stereo python camera rig scripts to use a default camera separation of 6.5 cm.
RemovePrePostRenderScript() functions to the domeCamera.py script to make it easier to set up the Domemaster3D pre render and post render mel scripts in the Maya render settings window.
Added several new mia_material_x_passes material presets for rendering water simulation meshes:
WaterBlueWideOceanDeeppreset is a refractive ocean water material with the color at max distance value set to 50 units.
WaterBlueWideOceanShallowpreset is a refractive ocean water material with the color at max distance value set to 2 units.
WaterRustyIronLakeDeeppreset is a refractive lake water material with the color at max distance value set to 50 units.
WaterRustyIronLakeShallowpreset is a refractive lake water material with the color at max distance value set to 2 units.
Updated Wiki Topic Links:
GitHub Releases Download Page:
Domemaster3D Blog Post Page:
There is a new Domemaster3D v1.9 Release out for 3DS Max and Maya.
Version 1.9 - September 23, 2015
Translated the Arnold C4DtoA Cinema4D shader UI to Japanese
Added a new Domemaster3D menu item "LatLong Stereo Aim Camera" for making a camera rig that has an aim constraint applied for easier camera animation. Reminder: Maya has issues with using cameras that have aim constraints when you apply them to animation layers. A LatLong Stereo Aim Camera can be created using the following python code:
import domeCamera as domeCamera
Added a new Domemaster3D menu item "LatLong Stereo Zenith Camera" function for making a camera rig that has the "Zenith Mode" checkboxes enabled by default and a vertical orientation. A LatLong Stereo Zenith Camera can be created using the following python code:
import domeCamera as domeCamera
Updated the dome Diagnostics tool with the following changes:
Added detection for the Maya quicktime video encoding environment variable MAYA_QUICKTIME_ENCODING_GAMMA.
Updated the PlayblastVR optionVar list for the batch sequence viewers
Added detection for the MAYA_NO_CONSOLE_WINDOW environment variable. This environment variable lets you turn off the display of the Maya console window. It can effect the stability of batch renders that are launched with mayabatch if the console is disabled and anything is printed directly to the console window.
Added the Environment variable detection for the following Maya 3rd party modules and plugins:
Bifrost Env Vars:
QT Support Env Vars:
Mental Ray Env Vars:
MI_CUSTOM_SHADER_SUPPRESS - do not load suppressed files
MAYATOMR - used for a pipe to the renderer
Arnold Env Vars:
XGEN Env Vars:
SEEXPR Software Env Vars:
Mac & Linux Env Vars:
There is a new Domemaster3D v1.9.1 release out that adds a "DOMEMASTER3D_MAYA_REALTIME_FOV" environment variable option for Maya that makes it easier to set an override for the Domemaste3D camera's default realtime OpenGL persp viewport FOV setting.
This could let you use a wider field of view than the typical 90 degree view setting in the persp viewport when doing scene layout or camera animation with a panoramic camera rig.
You can apply this realtime FOV override using the Maya.env file and un-commenting a sample line at the bottom of the .env file, or by adding that environment variable to the system, or by adding it to the Maya module file.
Hi. I wanted to mention that the current Mac OS X minimum version required to use the recent Domemaster3D shader releases is OS X 10.9 due to the version of Apple Xcode and platform SDK used to compile the shaders.
If you need to run the shaders on an older system you can use this Wiki tip to compile a custom legacy build that matches your exact OS version:
Special Thanks to Eric Hanson (xRez Studio) for bringing this issue to my attention.
The Domemaster3D v1.9.2 update for Maya and 3DS Max is out.
The Vray for 3DS Max based DomemasterStereo and LatLongStereo lens shaders are greatly improved with automatic pole correction options, a LatLong based "hemirect" checkbox for rendering a cropped vertical FOV area with the frame edge locked to the zenith pole region, and several other additions.
Domemaster3D v1.9.2 improves the Maya DomeViewer panoramic 360° media tool by adding GearVR Mono Cubemap loading support, a new DomeViewer new Connect Alpha Channel control lets you enable or disable the transparency of alpha channels in the viewer. Also the updated Dome Diagnostics tool provides the most comprehensive Maya workstation and rendernode troubleshooting capability available that will help systems administrators better manage their rendering systems and fix configuration issues quickly and efficiently.
You can download the latest Domemaster3D v1.9.2 release for Maya and 3DS Max from GitHub or from my blog:
Here are a few screenshots of the updated GUIs in the Vray for 3DS Max based DomemasterStereo and LatLongStereo lens shaders:
Updated the Dome Diagnostics tool to add support for the mental ray env variable "MAYA_MRFM_SHOW_CUSTOM_SHADERS" that will expose the custom mental ray shaders in Maya.
Updated the DomeViewer tool to add Facebook Cube Map 3x2 support along with a set of Facebook Cube Map 3x2 panoramic viewing meshes "facebookCube3x2_mesh.obj", and "facebookCube3x2_mesh.ma" to the Domemaster3D sourceimages folder
Updated the DomeViewer tool to add Ricoh Theta S support along with a set of Ricoh Theta S panoramic viewing meshes "ricoh_theta_s_mesh.obj", and "ricoh_theta_s_mesh.ma" to the Domemaster3D sourceimages folder
Here are a few screenshots that show the updated Maya Domemaster3D DomeViewer tool's user interface when viewing raw unstitched Ricoh Theta S footage:
Hey - I'm new here. First of all: awesome work. Thanks a lot for the plugin. I'm using it for 3ds max.
I got some questions...
- Spherical environmental background maps (I got an awesome realistic star map) are not correctly morphed. I can use it as screen mapping and it works great, but then it does not rotate when I change rotate the camera. I can imagine it would be wired to coordinate transformation from one spherical map to another and I don't know how good the results could be. Your Starglobe is a good solution, but it would be nice if environmental background maps would be supported. Is there a fundamental limit in 3ds max so that Camera Lens Shaders cannot influence the background maps?
- A similar issue comes with Camera Output Shaders. I'm desperately trying to implement glow to light sources. But the usual approach (Glare Output Shader) does not work correctly. It's applied to the morphed, final image and creates perfect circle halos that - on the Dome or in VR - look wired. Here is a very quick and dirty example: https://www.youtube.com/watch?v=g5EJIWuDQKM (look at the halo around the Sun). Additionally, glow would not know that the left and right edges of a LatLong projection connect and the glow would have a wired cut there. (example: https://www.youtube.com/watch?v=KVY91ZNa0Tg - see glow of the left impulse engine)
Since I really need a glow for my scenes and MR is quite limited with glows, I tried to use a Beam Volume Shader. This kind of only works for lights though (you cannot assign it to self illumination materials) and the effect is different (fall of is much slower and it grays over black background). Also it seems to not really work that well behind transparent objects (like Earth's atmosphere - needed a lot of fiddling to remove wired artifacts behind the Earth). Here is an example of something that looks quite nice
but I'd rather do the glow effect around the Sun in any other way. Post processing (Adobe After Effects) will also do the circular halos that look wired in VR. Would there be any hope for a Domemaster3D Glow output effect plugin?
Thanks a lot :)
A lens shader like our could do whatever it wants to the background, but we better not do it :) It would just create issues.
3ds Max already has enough tools to manage the background. Tools created for and proven to work for compositing. They will all work with the lens shader.
What you run into is a common issue with dome or latlong projections and tools that were never meant to work that way.
Most of max tools work post-rendering on the final buffer. They have no understanding of the image projection.
I believe you need to start thinking about creating different layers. Foreground, background, lights, reflections,etc, and composite everything later.
Andrew Hazelden has a lot of tools on his web site for dealing with dome/latlong. I'm sure there is something that will make your glows work.
Hi Roberto, Hi Andrew,
thanks a lot for the quick reply. :)
Skybox 360 Post FX seems to be exactly what I need. I'm trying to render an animated VR sequence to test the after effects workflow. Unfortunately, mental ray takes forever to render and I was kind of hoping that the lens shader would also work for iray - all I could find was a post from Andrew from 2 years ago on an NVIDIA forum. Is the community really that small? ^^
And then there was this announcement:
Is there something coming from NVIDIA or is Andrew working on something? :)