RayDisplace Mental Updates

(what's new for minor releases)



Here I'll post updates about small changes to rayDisplace for Mental Ray for Maya, between major releases (for which I'll try to update the full doc/tutorial instead).

The main tutorial with sample scenes and step by step help is here : displacement_maps_mental.html

And finally if you're having trouble with the « baking » process, it might be useful for you to check the workarounds page : rayDisplace_workaround

February 15, 2005 : can't find necessary include and lib files to recompile for Maya 6.0 or 6.5 yet, so source codes can be grabbed here if you have means to compile them yourself: rayDisplaceMentalSources.zip

June 10, 2003 : recompiled the rayDispalce for Mental Ray for the version for Maya 5.0 : rayDisplaceMental5.zip

February 9, 2003 : Fixed the bias issue. Now it will work as expected, similarly to the way it worked for the Maya rayDisplace node. Also found about a small bug that was keeping me from setting objects « Visible in Reflections » attribute. In the object transform node attribute the is a « Mental Ray » section, where you can set the « trace » attribute. If set to « derive from Maya » it doesn't seem to pass the « Visible in Reflections » and « Visible in Refractions » parameter correctly. Just set it yourself to « on » or « off » and you will be able to turn object visibility to secondary rays accordingly (needed to avoid the low detail object self reflecting). Thanks go to Gonzalo Garramuno and Thomas Driemeyer for explaining me the bias issue on Mental Ray list!
You can get the updated .mi and dll here : rayDisplaceMental.zip

January 28, 2003 : Various updates to maya_rayDisplace. Maybe I should rename it to something else as now the node will likely stop trying to mimic the original rayDisplace for maya and get more and more Mental Ray specific, for various reasons it seems there is a brighter future in using Mental Ray for the displacement baking workflow in general.

The Color was added. It's a sort of quick dirty fix for cases when the surface with maya_rayDisplace self reflects, then it will return this color instead of restarting a meaningless search for closest surface (which could also lead to endless loops and crashes before). I know it's very unsatisfactory as it is, you can't really map anything in this parameter, just return a solid color that will be the « warning » for self reflection.

Added « outside » and « inside » parameters to instruct it to only « look » for a secondary surface inside (direction opposite to the normals) or outside (normals direction). Will actually optimise render times as only requested rays will be traced.

Added returnSpace parameter that allows you to specificy in which coordinate space to express the results that are of point or vector type (outPoint, outNormal, outTangentU, outTangentV). To be consistent with other Mental Ray shaders like mib_texture_vector, the same code convention is used :

Note : be careful that the old maya_rayDisplace used to return values in world space by default. I found TS_INTERNAL to be equivalent to TS_WORLD in the render I did in Mental Ray so far, but it can't be taken for granted and it might be a good idea to manually set the returnSpace parameter to 2 whenever you import scenes/graphs which were constructed using the old version.

Changed one output attribute and added several too :

outDisplaceVector was removed and has been replaced by outPoint, which returns the coordinates of the intersection point on the intersected surface.

outTangentU will return the tangentU of the intersected surface, that is dP/dU, the intersection point derivative in U.

outTangentV will return the tangentV of the intersected surface, that is dP/dV, the intersection point derivative in V.

outColor will return the (shaded) color of the intersected surface, provided it has a valid material (can be either Maya or Mental Ray shader) assigned.



That is what the new attributes look like in the attributes editor :




Olivier Renouard

olivier AT drone DOT org