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

Views: 33907

Reply to This

Replies to This Discussion

There is a new Domemaster3D v1.8.2 Release out for 3DS Max and Maya.

https://github.com/zicher3d-org/domemaster-stereo-shader/releases

Version 1.8.2 - August 17, 2015

Vray
Added the Vray 3.1 for Maya Domemaster3D shader beta files to the folder:

C:\Program Files\Domemaster3D\vray


Arnold
Added the first working version of the Cinema4D C4DtoA Domemaster3D shader beta files to the folder:

C:\Program Files\Domemaster3D\arnold\c4dtoa

Maya
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

Arnold

Added the Maya AE python template resources to the MtoA shader release that is included with the Domemaster3D installer.

Maya

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.

Added the AddPrePostRenderScript() and 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:

  • The WaterBlueWideOceanDeep preset is a refractive ocean water material with the color at max distance value set to 50 units.
  • The WaterBlueWideOceanShallow preset is a refractive ocean water material with the color at max distance value set to 2 units.
  • The WaterRustyIronLakeDeep preset is a refractive lake water material with the color at max distance value set to 50 units.
  • The WaterRustyIronLakeShallow preset is a refractive lake water material with the color at max distance value set to 2 units.

Updated Wiki Topic Links:

Maya Domemaster3D Version History

Maya Domemaster3D Shelf

Maya Domemaster3D Presets - Mia Material X Passes

GitHub Releases Download Page:

https://github.com/zicher3d-org/domemaster-stereo-shader/releases

Domemaster3D Blog Post Page:

http://www.andrewhazelden.com/blog/2012/04/domemaster3d-stereoscopi...

There is a new Domemaster3D v1.9 Release out for 3DS Max and Maya.

Version 1.9 - September 23, 2015


Arnold

Translated the Arnold C4DtoA Cinema4D shader UI to Japanese


Maya

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
reload(domeCamera)
domeCamera.createLatLongStereoAimRig()

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
reload(domeCamera)
domeCamera.createLatLongStereoZenithRig()

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:

BIFROST_ECHO_GEOSHADER
BIFROST_ENABLE_GRAPH_EDITING

QT Support Env Vars:

QT_HIGHDPI_AWARE
MAYA_ALIEN_WIDGETS

Mental Ray Env Vars:

MI_MAYA_BATCH_OPTIONS
MI_CUSTOM_SHADER_PATH
MI_CUSTOM_SHADER_SUPPRESS - do not load suppressed files
MAYATOMR   - used for a pipe to the renderer

Arnold Env Vars:

MTOA_SILENT_MODE
MTOA_COMMAND_PORT
ARNOLD_LICENSE_ATTEMPTS
ARNOLD_LICENSE_ATTEMPT_DELAY
K_SEARCH_PATH

XGEN Env Vars:

XGEN_CONFIG_PATH
XGEN_EXPORT_ARCHIVE_STANDALONE
XGEN_LOCATION
XGEN_ROOT
HDF5_DISABLE_VERSION_CHECK

SEEXPR Software Env Vars:

SE_EXPR_PLUGINS

Mac & Linux Env Vars:

LD_LIBRARY_PATH

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:

https://github.com/zicher3d-org/domemaster-stereo-shader/wiki/Maya-...

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:

http://www.andrewhazelden.com/blog/2012/04/domemaster3d-stereoscopi...

Here are a few screenshots of the updated GUIs in the Vray for 3DS Max based DomemasterStereo and LatLongStereo lens shaders:

Domemaster3D v1.9.3 for Maya and 3DS Max is out. You can get a copy of the latest release from the Domemaster3D GitHub page or from my blog.

Maya Changes

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:

Here is a still image of the Wong Tai Sin Temple in Hong_Kong that shows what the raw stitched footage looks like from a Ricoh Theta S panoramic 360° video camera:

Special thanks goes out to my friend Alex in Hong Kong for filming the Ricoh Theta sample footage for me.

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
https://www.youtube.com/watch?v=2o523ZyTvqw
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 :)

Hi Simon.

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.

Rob

Hi Simon.

If you are already using Adobe After Effects in your production pipeline then you might try rendering out a separate render pass with just the self illuminating objects on it.

Then look at using the 360 degree frame aware Metle SkyBox Post FX plugin which can handle your glows correctly on a LatLong frame format with the Left/Right frame edge and the pole zone wrapping taken care of for you.

http://www.mettle.com/product/skybox-360-post-fx/

Cheers,
Andrew Hazelden

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:

https://forum.nvidia-arc.com/showthread.php?14394-LatLong-lens-shad...

Is there something coming from NVIDIA or is Andrew working on something? :)

Yes. The pre-rendered 360 degree VR community really is small. ;-)

iRay does not support 3rd party lens shader development so any VR rendering features have to be implemented by NVIDIA directly.

An iRay VR presentation was demoed at this years GDC conference so something is in the works but I have no clue as to when it will actually be delivered as a consumer exposed feature in iRay for 3DS Max or Maya.

https://blogs.nvidia.com/blog/2016/04/27/virtual-reality-conference/

That said, if you can still tolerate mental ray in your workflow then there is the option of using an iRay GPU based lighting mode inside of the mental ray renderer.

In Maya it is called the "GI Next Prototype" rendering option. I don't know what it is labelled as in Max 2016/2017 but it should be an option.

Rob can probably clarify what that lighting mode is called.

RSS

Fulldome Wikipedia Entry

IMERSA

This site is proudly sponsored by IMERSA members.

Fulldome Database

Blog Posts

WAYHA: now available from Loch Ness Productions

We start out the new year with a really cool project: WAYHA!

Wayha is an immersive music video collaboration by BÓSA (Stephan…

Continue

Posted by Mark C. Petersen on January 13, 2023 at 10:59pm

New Year's Greetings 2023

Hi, all.

We've written a blog post for the New Year -- with some pleasant news to end last year.

https://lochnessproductions.com/lnpblog/

We hope you'll take a…

Continue

Posted by Mark C. Petersen on January 10, 2023 at 1:06pm

FULLDOME OnDemand introduces 4K streaming

Introducing...

4K Prewarped Mirror Movies







If you've got the gear (and the bandwidth), we're now streaming selected 4K…

Continue

Posted by Mark C. Petersen on July 7, 2022 at 3:02pm

New from Loch Ness Productions: "Bo & Bub's Cosmic Ride"

Here's an exciting fulldome show, set to upbeat music, offering fun family-friendly entertainment for kids and adults of all…

Continue

Posted by Mark C. Petersen on March 26, 2022 at 11:45pm

© 2023   Created by Dan.   Powered by

Badges  |  Report an Issue  |  Terms of Service