Search

English (United Kingdom)French (Fr)
 R&D in Computer Graphics   
    Home Tutorials XRay shader Maya XRay shader
XRay shader for Maya tutorial
XRay shader for Maya tutorial

XRay texture shader for mental ray® for Maya®

David Lanier 3D hereby grants to you a royalty-free, non-exclusive license to possess and to use the
following shaders for both commercial and non-commercial purposes.

NO WARRANTY: THE SOFTWARE AND ANY OTHER MATERIALS PROVIDED BY DAVID LANIER 3D TO YOU HEREUNDER ARE PROVIDED "AS IS."
DAVID LANIER 3D DISCLAIMS ALL WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

** Use them at your own risks **

Download :

Shader for Maya


Tutorial :

In the Maya7path folder, set the mi file in the subfolder :
maya7path\mentalray\include

Add the DLL in the subfolder
maya7path\mentalray\lib

Then modify the maya.rayrc file located in : maya7path\mentalray\maya.rayrc

By adding
link "{MAYABASE}/lib/dl3d_xraytexture.{DSO}"
and
mi "{MAYABASE}/include/dl3d_xraytexture.mi"

And finally, add the .xpm into maya7path\icons
Well, that's all.

Set mental ray® as the default render engine, suppres the "Enable default light" in the render options and add a Maya light in your scene.

 

Create a scene with a light and open the Hypershade. Then create a Lambert (or anything else) material to have a different shading group. In the hypershade : Create->Materials->Lambert.

Now assign the Lambert material to the plane by middle clikcing on the Lambert material and drag and drop it on the selected plane.

Now select the teapot (for example) and go in the attribute editor, Select the shading group (First red arrow), then go in mental ray® section and click in Custom shader subsection : Suppress all maya shaders (2nd red arrow) then click on Material shader (3rd red arrow).

In the mental ray® tab, choose dl3d_xraytexture in the Textures shaders

In the attribute editor you got :

The parameters are :

- XRay color : diffuse color of the transparent object
- Power : The higher is the power, the less transprent is the object (except with invers falloff parameters checked)
- Inverse_falloff : inverse the fall off parameter, the transparency starts from the center instead of the edges (and the contrary)
- Ks : coefficient for specular color
- roughness : coefficient to set the roughness of the surface for specular reflexions (the highest is the roughness the more centered is the specular reflexion)
- specularcol : specular color
- mode : integer that can be 0, 1 or 2, it is used to filter the lights used for rendering. (0 = use all ights, 1 = use only lights specified in the following array, 2 = use all lights but those mentionned in the following array)
- array : array of lights if mode is set to 1 or 2.

Images :

 


To top of the page Go to top To top of the page


(c) David Lanier 3D. All rights reserved.
Republication or redistribution of David Lanier 3D web site content, including by framing or similar means,
is expressly prohibited without the prior written consent of David Lanier 3D.

RenderMan developer | Maxscript developer | technical director TD | developpeur freelance free lance | lightwave plugins lscript developer | Photoshop plugins scripts developer | Motion builder plugins scripts developer | Mental Ray developer | XSI plugins script developer development programmer programming | maya plugins MEL script developer development programmer programming | 3dsmax plugins maxscript | 3dsmax sdk | maxscript training | shader developer development programmer programming writer | 3ds max SDK | plugin shader tools | formation maxscript | formation developpement plugin | developpeur independant | developpeur shader | formation 3dsmax plugins SDK | developpeur plugin |