Mental Ray Shaders

drUtilSuite for mental ray 3.4 through 3.9

Description

The drUtilSuite is a collection of shaders for mental ray 3.4 through 3.9 that is aimed at making it easier to create custom networks of shaders. This may be useful when working on look development, shading or lighting tasks within mental ray, particularly when workin in Maya. The drUtilSuite includes around 150 shaders at present whose focus is to provide clearly defined atomic operations that may or may not be available already in Maya and mental ray. In many cases, the operations also mimic operations available in compositing packages such as Apple Shake but not necessarily available in mental ray or Maya.

The drUtilSuite is distributed free of charge. It would be great to see this library grow to encompass more of the functions not already present in the standard shader set. Please email info@duikerresearch.com with suggestions, questions, or pointers to typos.

Shader Categories

The drUtilSuite includes the following categories of shaders:

The shaders included in the Logic Shaders Group are:

  • drAnd_v1
  • drAnd_v2 – Array
  • drOr_v1
  • drOr_v2 – Array
  • drXOr_v1
  • drNot_v1
  • drEqualScalar_v1
  • drNotEqualScalar_v1
  • drEqualColor_v1
  • drNotEqualColor_v1
  • drEqualVector_v1
  • drNotEqualVector_v1
  • drGreaterThanScalar_v1
  • drGreaterThanOrEqualScalar_v1
  • drLessThanScalar_v1
  • drLessThanOrEqualScalar_v1
  • drGreaterThanColor_v1
  • drGreaterThanOrEqualColor_v1
  • drLessThanColor_v1
  • drLessThanOrEqualColor_v1
  • drGreaterThanVector_v1
  • drGreaterThanOrEqualVector_v1
  • drLessThanVector_v1
  • drLessThanOrEqualVector_v1
  • drInRangeColor_v1
  • drInRangeScalar_v1
  • drInRangeVector_v1
  • drIsObject_v1
  • drInRasterPositionRange_v1
  • drInBetweenVector_v1
  • drIfThenElseScalar_v1
  • drIfThenElseColor_v1
  • drIfThenElseVector_v1

The shaders included in the Conversion Shaders Group are:

  • drColor2Vector_v1
  • drColor2Scalar_v1
  • drColor2Scalars_v1
  • drColor2Boolean_v1
  • drVector2Color_v1
  • drVector2Scalar_v1
  • drVector2Scalars_v1
  • drVector2Boolean_v1
  • drScalar2Color_v1
  • drScalar2Vector_v1
  • drScalar2Boolean_v1
  • drScalars2Color_v1
  • drScalars2Vector_v1
  • drBoolean2Color_v1
  • drBoolean2Vector_v1
  • drBoolean2Scalar_v1
  • drInteger2Boolean_v1
  • drInteger2Scalar_v1
  • drInteger2Vector_v1
  • drInteger2Color_v1
  • drBoolean2Integer_v1
  • drScalar2Integer_v1
  • drVector2Integer_v1
  • drColor2Integer_v1

The shaders included in the Layer Shaders Group are:

  • drOver_v1
  • drSwitchMatte_v1
  • drMatteMult_v1
  • drMatteDiv_v1
  • drSetAlpha_v1
  • drCopyChannelColor_v1
  • drCopyChannelVector_v1
  • drSetChannelColor_v1
  • drSetChannelVector_v1
  • drMixerColor2_v1
  • drMixerColor4_v1
  • drMixerColor8_v1
  • drMixerColor16_v1
  • drMixerScalar2_v1
  • drMixerScalar4_v1
  • drMixerScalar8_v1
  • drMixerScalar16_v1
  • drMixerVector2_v1
  • drMixerVector4_v1
  • drMixerVector8_v1
  • drMixerVector16_v1
  • drReorderColor_v1
  • drReorderVector_v1

The shaders included in the Math Shaders Group are:

  • drAddColor_v2
  • drAddScalar_v1
  • drAddVector_v1
  • drSubColor_v2
  • drSubScalar_v1
  • drSubVector_v1
  • drSubAColor_v2
  • drSubAScalar_v1
  • drSubAVector_v1
  • drMultColor_v2
  • drMultScalar_v1
  • drMultVector_v1
  • drDivColor_v2
  • drDivScalar_v1
  • drDivVector_v1
  • drMinColor_v2
  • drMinScalar_v1
  • drMinVector_v1
  • drMaxColor_v2
  • drMaxScalar_v1
  • drMaxVector_v1
  • drMixColor_v2
  • drMixScalar_v1
  • drMixVector_v1
  • drClampColor_v3
  • drClampScalar_v1
  • drClampVector_v2
  • drThresholdColor_v2
  • drThresholdScalar_v1
  • drThresholdVector_v1
  • drCompressColor_v2
  • drCompressScalar_v1
  • drCompressVector_v1
  • drExpandColor_v2
  • drExpandScalar_v1
  • drExpandVector_v1
  • drInvertColor_v2
  • drInvertScalar_v1
  • drInvertVector_v1
  • drModColor_v2
  • drModScalar_v1
  • drModVector_v1
  • drFloorColor_v2
  • drFloorScalar_v1
  • drFloorVector_v1
  • drCeilColor_v2
  • drCeilScalar_v1
  • drCeilVector_v1

The shaders included in the Utility Shaders Group are:

  • drDebugColor_v1
  • drDebugVector_v1
  • drDebugScalar_v1
  • drDebugBoolean_v1
  • drNullColor_v2
  • drNullScalar_v1
  • drNullVector_v1
  • drConstColor_v2
  • drConstScalar_v1
  • drConstVector_v1
  • drNormalizeVector_v1
  • drVectorNorm_v1
  • drSelectColor_v1
  • drSelectScalar_v1
  • drSelectColor2_v1
  • drSelectColor4_v1
  • drSelectColor8_v1
  • drSelectColor16_v1
  • drSelectScalar2_v1
  • drSelectScalar4_v1
  • drSelectScalar8_v1
  • drSelectScalar16_v1
  • drSwitchColor_v4
  • drRayTypeSelect_v1
  • drSelectVector_v1
  • drSelectVector2_v1
  • drSelectVector4_v1
  • drSelectVector8_v1
  • drSelectVector16_v1

The shaders included in the State Shaders Group are:

  • drStateRasterPos_v1
  • drStateOrg_v1
  • drStateDir_v1
  • drStatePoint_v1
  • drStateNormal_v1
  • drStateGeometricNormal_v1
  • drStateMotion_v1
  • drStateRasterX_v1
  • drStateRasterY_v1
  • drStateRasterWidth_v1
  • drStateRasterHeight_v1
  • drStateDist_v1
  • drStateTime_v1
  • drStateDotND_v1
  • drStateInvNormal_v1
  • drStateReflectionLevel_v1
  • drStateRefractionLevel_v1
  • drStateLabel_v1
  • drStateInstance_v1
  • drStateReflectionLevelScalar_v1
  • drStateRefractionLevelScalar_v1
  • drStateLabelScalar_v1
  • drStateInstanceScalar_v1
  • drStateRayTypeScalar_v1
  • drStateTextureCoord_v1

The shaders included in the Light Shaders Group are:

  • drParticleLight_v1

The shaders included in the Geometry Shaders Group are:

  • drGeomSetAreaLightType_v1

The shaders included in the Lens Shaders Group are:

  • drLensPanoramic_v1
  • drLensGamma_v1

The shaders included in the Environment Shaders Group are:

  • drEnvironmentPanoramic_v1

The shaders included in the Debug Illumination Shaders Group are:

  • drDebugIllumLambert_v1
  • drDebugLightPoint_v1

The shaders included in the Multipass Shaders Group are:

  • drMultipassGeometry_v5
  • drMultipassGeometry8_v5
  • drMultipassLens_v5
  • drMultipassLens8_v5
  • drMultipassSurface_v5
  • drMultipassSurface8_v5
  • drMultipassGeometry16_v5
  • drMultipassSurface16_v5
  • drMultipassSamplesMerge_v1
  • drMultipassGeometrySamplesWrite_v1
  • drMultipassGeometrySamplesMerge_v1

The shaders included in the Lens Shaders Group are:

  • drShadowPass_v1

Download

The most recent version of the drUtilSuite manual and shaders can be downloaded here:

Donations

The drUtilSuite for mental ray is distributed free of charge but writing, maintaining and hosting the suite takes time and money. If the suite has saved you either in your pursuit of creating better images, a small Paypal donation to help fund it’s further development would be appreciated.

Installation, Miscellaneous

The .zip file listed above includes versions of the drUtilSuite for Windows, Linux, and MacOSX ready to work with Maya 7.0, 8.0, and 8.5 (including OSX Universal Binary support)

The OSX and Linux versions now have the Boost library linked directly into the shaders, so compiling and installing the libraries won’t be necessary.

Changes

2011.03.04
– Added Maya 2010 and 2011 support for all platforms

2007.07.07
– Added Windows x64 support.
– Added Linux x64 support.

2007.05.21
– Util Shaders

  • Added the ShadowPass shader.
    This shader returns the shadowing percentage for the lights in the scene.
  • Added Floor and Ceiling math shaders to the Color Suite
  • Added the State Texture Coordinate shader
  • Added Select Vector scalars
  • Boost library is now statically linked into library on OSX and Linux. It’s no longer necessary to install the library separately on machines using the shaders.

– Multipass Shaders

  • Exposed samples-based Multipass writing and merging shaders
  • These have not been thoroughly tested.

– Debug Illum Shaders

  • Updated to .mi declaration to include min version. Ray was signaling a syntax error without one.
  • Updated the XCode project to include Maya 8.5/ray 3.5 Universal Binary support
  • Updated the XCode project to include separate configurations for Maya 7.0, 8.0, and 8.5

2007.01.11
– Added drLensBrightness_v1
– Added node ids for Multipass shaders
– Updated drUtilShaders .mi declarations to include all new files
– Updated example scenes to be a bit more friendly out of the box.

2007.01.09
– Redefined the different panoramic mappings used in the environment and lens shaders.

2006.12.10
– Added new Environment shaders

  • drEnvironmentPanoramic_v1

– Added new Math shaders

  • drModColor_v2
  • drModScalar_v1
  • drModVector_v1

– Added debugging Illumination shaders

  • drDebugIllumLambert_v1
  • drDebugLightPoint_v1
  • Includes source code and build projects for Win32, Linux, and OSX

– Added Multipass shaders

  • drMultipassGeometry_v5
  • drMultipassGeometry8_v5
  • drMultipassGeometry16_v5
  • drMultipassSurface_v5
  • drMultipassSurface8_v5
  • drMultipassSurface16_v5
  • drMultipassLens_v5
  • drMultipassLens8_v5

– Added example scenes demonstrating the use of

  • drModColor_v2
  • drMultipassGeometry_v5
  • drMultipassSurface_v5
  • drMultipassGeometry8_v5
  • drMultipassSurface8_v5
  • drMultipassGeometry16_v5
  • drMultipassSurface16_v5

2006.11.29
– Added new Lens shaders

  • drLensPanoramic_v1
  • drLensGamma_v1

– Added new Geometry shaders

  • drGeomSetAreaLightType_v1

– Added new Light shaders

  • drParticleLight_v1

– Added new Utility shaders

  • drSetOpacity_v1

– Added new example scenes for Maya

2006.08.21
– Added new Conversion shaders

  • drInteger2Boolean_v1
  • drInteger2Scalar_v1
  • drInteger2Vector_v1
  • drInteger2Color_v1
  • drBoolean2Integer_v1
  • drScalar2Integer_v1
  • drVector2Integer_v1
  • drColor2Integer_v1

– Added new State Shaders

  • drStateReflectionLevelScalar_v1
  • drStateRefractionLevelScalar_v1
  • drStateLabelScalar_v1
  • drStateInstanceScalar_v1
  • drStateRayTypeScalar_v1

– Added new Utility Phenomenon

  • drRayTypeSelect_v1

– Moved shaders to the Deprecated list

  • drStateReflectionLevel_v1
  • drStateRefractionLevel_v1
  • drStateLabel_v1
  • drStateInstance_v1
  • drStateRayType_v1

2006.08.16
– Fixed missing symbol issue in Linux release.

2006.07.27
– Fixed shader export issue in Windows release.

2006.07.25
– Initial public release

Acknowledgements

The development of the drUtilSuite was inspired by the work of a few very talented engineers at the former ESC Entertainment, and the engineers behind XSI’s mental ray integration before that. I would like to thank Uwe Behrens, Jason Bright, Masuo Suzuki, Tadao Mihashi, and Andy Lomas for the inspiring work that they put into the former escBase shader suite. No longer having those shaders spurred the development of the drUtilSuite.

One thought on “Mental Ray Shaders

  1. Pingback: Tutorial: How to render the Magnitudes with Renderkit and 3DSMax – MentalRay. « LuisM´s RealFlow blog

Comments are closed.