注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

316Studio

分享资源,分享快乐··

 
 
 

日志

 
 

Autodesk Maya(MAYA 360度全景立体相机Shader)  

2012-07-09 22:42:16|  分类: maya技术 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

单相机立体环,球幕相机最新解决方案

This is an early test rendering with the Domemaster3D Stereoscopic Shader for Autodesk Maya.


About This Shader

The Domemaster stereo shader is designed to create stereoscopic fulldome renderings for use in planetariums and other full dome theaters.  Roberto Ziche created the domemaster stereo shader for 3D Studio Max and I have worked on adding Autodesk Maya support.

Currently the Domemaster stereo shader is compiled for mental ray on Mac OS X 64-bit, and Windows 32-bit and 64-bit.

If you use Autodesk Softimage you should check out the Domemaster3D Shader for Softimage.

You can also join the domemaster stereo discussion on the Fulldome NING group.

You can get the Linux x64 version of the shader and the source code from the domemaster-stereo-shader Google Code page: https://code.google.com/p/domemaster-stereo-shader/


Using the domemaster shader in Maya.

Using the domemaster shader in Maya.


Download

You can download the latest version of the Domemaster3D shader for Maya & 3DSMax here:

domemaster3D.zip


Installation Instructions
Maya on Windows

Step 1. Unzip the domemaster3D.zip archive.

Step 2. Copy the appropriate "domeAFL_FOV_Stereo.dll" file from either the "Windows 32-bit LIB" or "Windows 64-bit LIB" folder to your mental ray LIB folder:


C:\Program Files\Autodesk\Maya2012\mentalray\lib\


If you are running a 32-bit version of Maya install the 32-bit DLL. If you are running a 64-bit version of Maya install the 64-bit DLL.

Step 3. Copy the "domeAFL_FOV_Stereo.mi" mental ray include file to:


C:\Program Files\Autodesk\Maya2012\mentalray\include\


Step 4. Copy the Maya AE Template file "AEdomeAFL_FOV_StereoTemplate.mel" to either the Maya AETemplates folder or to your user account's Maya script folder:


C:\Program Files\Autodesk\Maya2012\scripts\AETemplates\


or


My Documents\maya\2012\prefs\scripts


Step 5. Copy the Hypershade icons from the "Icons" folder to your Maya icons directory or to your user account's Maya icons directory:


C:\Program Files\Autodesk\Maya2012\icons\


or


My Documents\maya\2012\prefs\icons\


Step 6. The next time you start Maya you will find the "domeAFL_FOV_Stereo", "domeAFL_FOV", "domeAFL_WxH", and "rob_lookup_background" lens shaders in the Hypershade. Look in the create bar under the mental ray > lenses section.


Maya on Mac OS X

This version of the domeAFL_FOV_Stereo shader mental ray shader was compiled for Maya 2011 and 2012 for Mac OS X 64-bit. Mac OS X 10.6 Snow Leopard is required.

Step 1. Unzip the domemaster3D.zip archive.

Step 2. Copy domeAFL_FOV_Stereo.dylib file from the "Mac OS X 64-bit LIB" folder to the mentalray lib directory:


/Applications/Autodesk/maya2012/Maya.app/Contents/mentalray/lib/


If you want to go inside the Maya.app package, right click on Maya.app and select "Show Package Contents" from the contextual menu. You may have to change the mental ray folder permissions to allow the shader to be written to the lib and include directories.

Step 3. Copy the "domeAFL_FOV_Stereo.mi" mental ray include file to:


/Applications/Autodesk/maya2012/Maya.app/Contents/mentalray/include


Step 4. Copy the Maya AE Template file "AEdomeAFL_FOV_StereoTemplate.mel" to either the Maya AETemplates folder or to your user account's Maya script folder:


/Applications/Autodesk/maya2012/Maya.app/Contents/scripts/AETemplates/


or


~/Library/Preferences/Autodesk/maya/2012-x64/prefs/scripts


Step 5. Copy the Hypershade icons from the "Icons" folder to your Maya icons directory or to your user account's Maya icons directory:


~/Library/Preferences/Autodesk/maya/2012-x64/prefs/icons


Step 6. The next time you start Maya you will find the "domeAFL_FOV_Stereo", "domeAFL_FOV", "domeAFL_WxH", and "rob_lookup_background" lens shaders in the Hypershade. Look in the create bar under the mental ray > lenses section.


The DomeAFL nodes should be visible in the Lenses section of the create bar.

The DomeAFL nodes should be visible in the Lenses section of the create bar.


3D Studio Max

Step 1. Unzip the domemaster3D.zip archive.

Step 2. Copy the appropriate "domeAFL_FOV_Stereo.dll" file from either the "Windows 32-bit LIB" or "Windows 64-bit LIB" folder or to your mental ray shaders folder:


\mentalray\shaders_autoload\shaders


If you are running a 32-bit version of 3D Studio Max install the 32-bit DLL. If you are running a 64-bit version of 3D Studio Max install the 64-bit DLL.

Step 3. Copy the "domeAFL_FOV_Stereo.mi" mental ray include file to:


\mentalray\shaders_autoload\include


When you start 3D Studio Max, you will have 3 new Lens shaders:

"Domemaster Stereo Shader"

"domeAFL_FOV"

"domeAFL_WxH"


This is the 3D Studio Max UI for the shader.

This is the 3D Studio Max UI for the shader.


Using the Domemaster Stereo Lens Shader in Maya

Connect the "domeAFL_FOV_Stereo" lens shader to a camera's .miLensShader input.

A quick way to make the connection in the Hypershade is to hold down the Control key on your keyboard and, using the Middle-Mouse button, drag the domeAFL_FOV_Stereo lens shader onto the camera's node icon. This will automatically make the node connections.

In the Hypershade work area, if your domeAFL_FOV_Stereo node has a solid red color background that means you need to change your renderer to Mental Ray.

In Maya you can change mental ray to be your default renderer by going to the Window > Settings / Preferences > Preferences menu. In the Preferences window click on the rendering section. Select "mental ray" from the the preferred renderer pop-up menu and click "Save".

You can connect your own custom texture maps to the Separation Multiplier Map, Turn Multiplier Map, and Head Tilt Map attributes.


Domemaster Stereo Lens Shader Controls
The Domemaster3D shader is controlled in Maya using the Attribute Editor.

The Domemaster3D shader is controlled in Maya using the Attribute Editor.


Field of View: The field of view for the rendered fisheye image.

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 angular fisheye shader.

Dome Radius: (focus plane) This is actually the distance at which the camera's line of sight converge, so it's not really the dome size.

Dome Forward Tilt: Dome tilt in degrees. Note that this value is not used unless you enable Dome Tilt Compensation.

Camera Separation: The initial separation of the L/R camera's.

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 using the right button. It's used to control the amount of 3D effect, and eliminate it where desired.

Turn Multiplier: A value 0-1 that controls the amount of the head turn. To be used with a grayscale texture. Typical use, keep the head straight while looking at the top of the dome.

Head Tilt: A value 0-1 (with 0.5 being the "neutral" value) that tilts the cameras (or head) left/right. 0 means 90 degrees to the left, 1 means 90 degrees to the right (if I remember correctly).

Dome Tilt Compensation: Enabling this option, shifts all the calculations by the # of degrees specified in Dome Forward Tilt. (Basically, it keeps the cameras/head vertical while the dome rotates forward.)

Maps used for the various multipliers and tilt settings will have to be custom made for the proper dome tilt.

Vertical Mode: Enable the vertical dome mode, which automatically adjusts the head turn and adds a turn compensation for the upper and lower part of the dome. It's a simplified and optimized version of the Dome Tilt Compensation with a 90 degrees tilt. It is faster and easier to use.


Node connections

The Separation Multiplier, Turn Multiplier, and Head Tilt attributes support custom texture maps. It is possible to use either a procedural ramp / gradient texture or 2D file textures.

It can be challenging to map textures to mental ray's screen space coordinates so I have provided some examples and screenshots included with the domemaster3D shader download.


This is the shading network required to map the textures into mental ray screen space coordinates.

This is the shading network required to map the textures into mental ray screen space coordinates.


Here are the Maya Hypershade node connections for the domeAFL_FOV_Stereo camera separation map:


mib_texture_vector.outValue -> mib_texture_remap.input

mib_texture_remap.outValue -> mib_texture_filter_lookup.coord

mentalrayTexture.message -> mib_texture_filter_lookup.tex

mib_texture_filter_lookup.outValueR -> domeAFL_FOV_Stereo.Cameras_Separation_Map

domeAFL_FOV_Stereo.message -> perspShape.miLensShader


Included with this package is a group of screenshots showing the proper node connections (located in the "Connecting Customs Maps in Maya" folder) and two Maya scene files (located inside the "Sample Maya Project" folder.

Set the mib_texture_vector "selspace" aka. select space value to screen to enable the camera UV space projection. This means the texture will be loaded using a projection to the UV space coordinates of the camera.


Use the mib_texture_vector node to map a mental ray texture into screen space coordinates.

Use the mib_texture_vector node to map a mental ray texture into screen space coordinates.


Note:The file textures must be connected using a mentalrayTexture node.

The Maya scene file "Starting Domemaster Shading Network.ma" is an empty Maya scene that has a shading network that shows how to map mental ray textures into the "domeAFL FOV stereo" node's screen space coordinates. There is probably an easier way to do this using native Maya file nodes but I haven't figured it out yet.

The Maya scene file "domemaster3D Scene.ma" is a sample scene with a room and several objects that was created with a 1 Maya unit = 1 cm scale.


How to use the rob_lookup_background lens shader

The rob_lookup_background shader lets you preview your screen coordinate space Separation and Head Turn Map textures before you map them to the domemaster shader.

To use the rob_lookup_background shader, connect a greyscale separation or head turn map channel like OutValue.R from your mental ray mib_texture_filter_lookup.outValueR node to the tex attribute of the rob_lookup_background shader.

Then connect the rob_lookup_background lens shader to your camera. You need to click 'render' to view the results.


Using the rob_lookup_background lens shader to preview the custom maps in screen space.

Using the rob_lookup_background lens shader to preview the custom maps in screen space.


Notes

There are still a few rendering issues with the domemaster3D shader that are also present in the original DomeAFL shader library.

The most common issue is a texture sampling artifact that is sometimes visible on surfaces that are close to the camera.

  评论这张
 
阅读(6168)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017