Hi everybody,
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 :)
Horizontal:



Vertical:



I will post more tomorrow. If you have any comments, please post.
Rob
Tags:
Permalink Reply by Roberto Ziche on August 19, 2012 at 5:22pm I run a test, and I don't think DOF will work.
That's not a shader issue, but a mental ray one. Mental ray will randomize the point of view to simulate the DOF, but it will do it on a flat plane perpendicualr to the point of view.
The result is that at the edges the blur occurs only on the horizontal direction, but not on the vertical.
Also, the focal plane remains flat, so if you are focused on an object at 100 units in front of you (center of the domemaster image), it will be in focus, but an object at 100 units at the edge, will be blurred.
Rob
Permalink Reply by Andrew Hazelden on August 21, 2012 at 8:12am Hi Alex and Rob.
Last night I did a few test renders with the Domemaster3D shader in Maya and it looks like the mental ray z-depth render pass output works when rendered to an EXR file. Using a z-depth pass would be a possible solution for simulating DOF (Depth of Field) as a post-processed effect in a compositing package.
Here is a sample red/cyan stereo anaglyph image from compositing the left and right z-depth channels.
I created the z-depth pass using a "camera depth remapped" render pass in the Maya Render settings window.
Regards,
Andrew
Roberto Ziche said:
I run a test, and I don't think DOF will work.
That's not a shader issue, but a mental ray one. Mental ray will randomize the point of view to simulate the DOF, but it will do it on a flat plane perpendicualr to the point of view.
The result is that at the edges the blur occurs only on the horizontal direction, but not on the vertical.
Also, the focal plane remains flat, so if you are focused on an object at 100 units in front of you (center of the domemaster image), it will be in focus, but an object at 100 units at the edge, will be blurred.
Rob
Permalink Reply by Andrew Hazelden on November 5, 2012 at 1:07am Hi. I just released the Domemaster3D shader version 1.3 for Maya.
Shader Download Link:
domemaster3D.zip
The new release features the following improvements:
Changed the DomeAFL_FOV and DomeADL_WxH source code to fix the "atan2" related 90 degree rotation bug. Recompiled the Domemaster3D Mac / Windows mental ray shaders.
Updated the Domemaster3D Maya shelf:

Added a python script for creating domeAFL compatible mia_material shading network. There is a shelf icon for creating a color mia_material and a color + bump mia_material. This should solve the typical "blurry grey line" texture sampling artifact that happens near the spring line with the DomeAFL shaders.
Changed the default lens shader connections in the python scripts to support the mental ray sky and sun system. This was done because the primary lens shader connection is overwritten by the mental ray Sun & Sky setup script in the render settings window. The solution was to switch from connecting to the camera.miLensShader input to the camera.miLensShaderList[0] input.
This is a simple mental ray Sun & Sky render with the DomeAFL_FOV shader.

Permalink Reply by Andrew Hazelden on November 21, 2012 at 8:44pm Hi everyone.
Today I wrote my first full length Wiki page on the domemaster stereo shader site.
The new article covers several tips and tricks that will help fulldome production artists when they use the domeAFL and domeAFL_FOV_stereo shaders:
Tips and Tricks Wiki page:
https://code.google.com/p/domemaster-stereo-shader/wiki/MayaDomemas...
If you tried the Domemaster3D shader for Maya in the past and had technical issues, this Wiki post should help you.
Regards,
Andrew
Permalink Reply by Roberto Ziche on November 28, 2012 at 8:48pm Thanks Andrew. Excellent job.
Rob
Permalink Reply by Andrew Hazelden on December 27, 2012 at 2:59pm
Hi. I wanted to mention that I noticed Maya's native image plane features don't work correctly when using mental ray lens shaders that change the camera's ray angle (like the DomeAFL_FOV shader). While looking for a fix to this problem I tried a lot of different ideas and read a variety of technical documentation and forum posts.
I would like to present a camera set up that can be used to render alignment grids, test patterns, or text captions over fulldome images in the Maya render view.
Creating Mental Ray Screen-Space Image Overlays in Maya
Regards,
Andrew Hazelden
P.S. I'm fairly confident this technique could be adapted to work with mental ray in Softimage and 3D Studio Max.
Permalink Reply by Andrew Hazelden on January 23, 2013 at 12:18am Hi Fulldomers.
I expanded the topics on the Domemaster stereo shader Wiki to cover solutions to DomeAFL related texture artifacts.
The Wiki topic includes fixes for the common "blurry streaky" line artifact. Examples are provided to fix both the DomeAFL 2D and 3D renderings using either mental ray surface materials or native Maya surface materials and Maya texture nodes.
New Wiki Topic: Creating DomeAFL Optimized Surface Materials
Regards,
Andrew Hazelden
a site for the hemispherically obsessed
Started by VitOl May 14.
Started by Srikanth Peddibhotla. Last reply by Srikanth Peddibhotla May 14.
Started by Theo. A. Artz. Last reply by Matthew Mascheri May 12.
Started by Yulia Apr 11.
Started by Damian Leibovich. Last reply by Chris Hill Feb 17.
Started by Elisabeth Rushworth. Last reply by Chris Hill Feb 17.
Started by Andrew Hazelden. Last reply by Andrew Hazelden Feb 17.
Started by Diego De Anna. Last reply by Joseph Eakin Jan 24.
Started by Roberto Ziche. Last reply by Andrew Hazelden Jan 23.
Started by Jim Criger. Last reply by John Young Jan 11.
Alexander Zaragoza posted a blog post
nita sturiale posted an event
VitOl posted a discussion© 2013 Created by david mcconville.