Maya LatLong_Stereo - zicher3d-org/domemaster-stereo-shader GitHub Wiki
The LatLong Stereo Shader shader is a stereoscopic spherical/equirectagular/latlong shader that can be used to create immersive stereoscopic renderings of your scene. You can control which camera view is rendered with the Camera control set to render either Left or Right view.
If you set the camera mode to Center you can render an optimized 2D LatLong Shader
style image.
Adding a LatLong Stereo Camera
A LatLong Stereo camera rig is added to your Maya scene using either the Domemaster3D menu in the rendering menu set, or the "Latitude Longitude Stereo" tool in the Domemaster3D shelf.
Once a rig has been added to your scene, you can edit the lens shader settings by selecting the "LatLongStereoCamera" in the outliner.
Next, you need to open the attribute editor window to the center_LatLong_Stereo
tab. The LatLong_Stereo
node controls are now visible.
Note: The attributes on the left and right camera's Stereo
nodes are driven using an expression from the center_LatLong_Stereo
control.
LatLong Stereo Shader Controls
Field of View Vertical: Controls the vertical FOV angle (in degrees) of the rendered Latitude/Longitude image.
Field of View Horizontal: Controls the horizontal FOV angle (in degrees) of the rendered Latitude/Longitude image.
Flip X: Flips the view horizontally
Flip Y: Flips the view vertically
Camera: Choices are Center/Left/Right. Selects the camera to use for rendering. Center skips 90% of the calculations and gives you a highly optimized standard latlong image.
Zero Parallax Distance (focus plane): This control adjusts the distance in the scene where the depth converges in the left and right eye views. Objects placed closer to the camera than the Zero Parallax Distance appear to come out at the audience. Objects placed further away from the camera than the Zero Parallax Distance value appear to the viewer as if they are existing beyond the physical "wall" of the screen they are viewing.
Camera Separation: The initial separation of the left and right cameras.
Separation Multiplier: A value between 0-1 that multiples the Camera Separation. This attribute is meant to be used with a grayscale texture mapped to the screen space. It's used to control the amount of 3D effect, and eliminate it where desired.
Zenith Mode: This attribute allows you to adjust the "LatLong Stereo
" lens shader to work with either a horizontal orientation (Zenith Mode OFF), or an upwards / vertical orientation (Zenith Mode ON) that lines up with the upright view orientation of the "domeAFL FOV
" / "Domemaster Stereo Shader
" shaders.
Screen Space Texture Maps
You can control the stereoscopic effect seen in the LatLong Stereo shader with the help of a texture maps. The "LatLong Stereo
" shader's Separation Multiplier attribute supports control texture mapping that is applied using screen space coordinates.
To get you started there is a collection of pre-made control texture maps for the Domemaster3D shaders in the following folder:
C:\Program Files\Domemaster3D\sourceimages
You can also create your own control map images if you want to precisely control the stereoscopic effect across your scene and sculpt the stereo depth in your renderings.
Fixing Texture Artifacts
If you are experience a texturing artifact in your renderings that looks like a blurry streak that runs through a surface material it is caused by mental ray texture sampling issues on Maya native file texture nodes. A solution to this problem is to switch to using a native "mentalrayTexture
" node to apply textures to your surface materials.
For more details on the mental ray texturing artifact that effects 360 degree lens shaders check out the wiki topic Creating domeAFL Optimized Surface Materials.
There are three Domemaster3D shelf tools named "color material
", "color + bump material
", and "color image sequence material
" that make it easier to start creating mental ray shading networks that use a "mentalrayTexture" node.
If you are rendering with the LatLong Stereo shader you can have a dark streaky line artifact occur when you are rendering with a camera inside a Maya Fluid Effects volume. You can check out the wiki topic Maya Fluid Effects and Mental Ray Lens Shaders for a solution to the problem.
Pre and Post Render MEL Scripts
When a panoramic stereo camera is added to a Domemaster3D based scene using either the shelf tools or the Domemaster3D menu, a Pre Render MEL and Post Render MEL script is added in the Maya Render Settings window automatically. This is used to control the stereoscopic rendering settings during render time and to allow Maya's realtime viewport's stereo display features to work so you can see an anaglyph preview in-scene.
If you have a scene with the Domemaster3D shader present and for some reason you need to manually add the Pre Render / Post Render MEL scripts, you should use the following values:
Pre-Render MEL Script (Run when a new rendering is launched):
source "domeRender.mel"; domemaster3DPreRenderMEL();
Post-Render MEL Script (Run when a rendering is completed):
source "domeRender.mel"; domemaster3DPostRenderMEL();
Prepping for Rendering on the Cloud
The Domemaster3D shader typically uses a Pre-render and Post-render MEL scripts to control the stereoscopic settings on the "domeAFL_FOV_Stereo
" and "LatLong_Stereo
" fulldome camera rigs at render time.
If the Domemaster3D shader is installed on a render farm that does not allow jobs to be submitted with Pre-render and Post-render MEL scripts in the Render Settings window, render farm customers should remove any Pre-render or Post-render MEL script commands in their Maya render settings.
If the render farm customer is rendering a 2D fulldome Maya scene everything is ready.
If the render farm customer is rendering a 3D fulldome or Latlong Stereo scene have them run the following MEL command on their personal workstation before sending you the maya scene file:
source "domeRender.mel"; domemaster3DPreRenderMEL();
This will make sure the camera's field of view is correct and the stereo rig is ready to render.
If there are lens shader artifacts that show up in Domemaster3D or LatLongStereo renderings, you can advise your customers to eliminate them by using the Domemaster3D shelf's native mental ray texturing tools when applying surface materials to objects in the scene. Also the applying Maya native camera shape FOV overrides (that are discussed on the Maya Domemaster3D Wiki's Tip's and Tricks page) can be used as another tool to help reduce/eliminate the lens shading artifacts.