Mental Ray - Shaders

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  11 November 2003
Smile Mental Ray - Shaders

Note from moderator
Hey guys, I moved this to the resources forum to have a focussed discussion about the creation of mental ray shaders, please keep it that and that alone. if you are having errors and shaderunrelated questions about mental ray, please use the regular maxforum

Cheers, Equinoxx

9/26/2005 - Since lighting questions periodically find there way into this shader discussion, I thought it might be helpful to add links to some of the existing Mental Ray lighting threads here at CGtalk. Please be sure to use these if appropriate, or make a new thread instead of posting lighting questions in this thread:

Here's a brief overview of this thread:
Table of Contents:

	      	       Post:	       Page:
HDRI:		 	17		 2
			474		32

Glow/Glare:	 	61		 5
			191-192		13
			217-220		15
			583-584		39
			1259		84
			1297-1299	87
			1308		88

Amber:			1580		106

Max7 SSS:		1631		109

 Subscatter:		112		8
			133		9

Carbon Fiber:		78		6
			1645		110
			1664		111

Metal(lume):		103-104		7
			626		42

Dirtmap:		117		8
			122		9
			129		9
			272-273		19
			458-459		31
			739		50
			885		59

TransVol SSS:		146		10

IES with Max6:		159		11

Unlock Shaders:		179-180		12

Car Paint:		376		26	
			518		35

Anisotropic:		1121-1122	75
			1861-1875	35

Glass:			419		28
			1012		68
			1128		76

Ice:			1802		121 (Max7)
			1188		80
			1260		84

Photon(basic):		697		47

AOCC/SSS tut:		718		48

DGS materials:		676		46

Diffusion:		1053-1061	71
			1070-1079	72

How do I install these .mi & .dll files?
	Max(6):		438-439		30
			232-236		16
			510		34

	Max(7):		1655-1660	111

Does Bucket size matter:201-204	        14

1/25/09 - Here's some more current, useful mental ray related sites:

I will try and keep all posted maxfiles up to date in this initial post.

8/26/04 - Update: I've started compiling all this info onto a part of my website.

Get the .MAT file here updated 4/27/2005

I've converted most of the architectural materials to DGS materials here:
DGS-architectural materials

"The .mat file gives me missing .dll errors on startup" need to make sure you have all the extra shaders that are discussed in this thread. I've posted my MR folders in .zip format to make this a bit easier (these are old and from they may not be compatible with newer versions of 3dsmax).
Link removed because files were outdated.

Along those lines, David Baker from has added a mental ray section onto You can find most of the shaders listed in this thread (and some that arent), at his website. And they are updated as new versions are made. So be sure to check his site here:

If you have this question: "Ok, I have downloaded this .mat file...what do I do with it?", I've made a quick video that illustrates how to open a .mat file in 3dsmax. You'll need the techsmith codec to view the video...if you don't know where to get the techsmith codec, search google for techsmith codec. Here's the video:

Get the HDRI Files here

Glass - 3s - by Folical9

Rubber - 3s - by Cabbage


Well, I think I have "issues". I've been on a non-stop SSS/translucency journey since installing my copy of ver.6. I've finally made a glass w/SSS material that I'm pleased with.

It took a while to render (4 hours), but here's my result. I have disabled caustics on my ground plane because I still have a couple of tweaks to make with them. But it does generate caustics. There is only one light used in this scene.

Last edited by JeffPatton : 01 January 2009 at 03:56 PM.
  11 November 2003
that looks pretty damn funky! Is that the architectural glass material in action?

//edit: Is that light emitting photons? or are you using only the final gathering?
  11 November 2003
Yes, photons, no final gathering. Not the Architectural glass either. It's mainly caustics that are generating this effect. I'm using the "parti-volume" shader on a standard raytrace material.

Here's a link to the document that helped explain the parti-volume shader to me:

Edit: I would also like to thank Martin Baadsgaard for his research on the Parti volume shader found here:,198

Last edited by JeffPatton : 11 November 2003 at 12:05 AM.
  11 November 2003
thanks for the link and the info! I'd love to see that 'thingy' animated. Slowly changing shape and pulsing...that would prolly look pretty kewl. I hope you can get the render time down a bit.
  11 November 2003
Wow 4 hours to render.

I usually think that max has frozen up if a render has taken more than 15 mins.

Looks very funky btw.
Is It Maya?? No!
Is it Lightwave??No!

  11 November 2003
Really interesting research your doing there!

Too bad MR is really badly documented (in max) unless you really know what you are after and dig deep.

I tried to dublicate this scene with default scanline result was overally pleasing.

Rendertime with Fast Adaptive Antialiaser and AMD XP 2200+ was 24 min. 37 sec. I surfed while it rendered so comp wasn't solely dedicated to rendering. It could have came out a little faster.

Only one light in scene. A blue omni inside that thingy. With raytrace AA turned off it comes much faster.


  11 November 2003
ssalo: very nice indeed. You can do wonders with the scanline, for sure. Can you post any of your settings? Especially that translucent one from the other day.

I want to share the settings for the glass I made so others can experiment as well, so here goes.

Select to use Mental Ray for the renderer, then

(1) Create a Raytrace material. Set it up just as you would normally for glass. Two sided, and make the diffuse almost pure white. Thats it. I left the IOR @ 1.55

(2) In the Mental Ray Connection roll out add a Parti Volume (physics) shader to the Photon Volume slot and the Volume slot as well.

(3) Settings for the Parti Volume located in the Photon Volume rollout:

Mode is set to 2. I forget the name of this mode, but it's listed in that .pdf file I linked to earlier. Scatter color is the default grey.

Extinction: You will have to adjust this based upon the shape & size of the item you are applying the texture to. I found mine to work best at 1.5

The only other points I adjusted were the minimum step length (2.0), and the maximum step length (8.0). Again, you will probably have to adjust these based on your specific model.

(4) Settings for the Parti volume shader located in the volume rollout:

Mode is set to 0

Scatter color: Make this the color you want to be scattered inside the object. I made mine dark blue.

Extinction: You will have to adjust to taste, but I set mine at 1.0

Minimum step length: 0.1
Maximum step length: 5.0

Thats it for the material itself!

Now apply this material to your object and make sure the object is set to generate caustics.

Next, you only need one light to shine on your model. I used a mental ray area spotlight, but a regular spotlight will work too.

I enabled raytrace shadows.

Under the mental ray indirect illumination rollout of the light:
UNCHECK the use global settings. The "on" box below will be enabled. I set the energy to 50000, decay at 2.0, caustic photons at 100000 (you will need to adjust to your scene). Global illumination photons are at 10000.

Once ALL of this is done, now your ready to render. Make sure you've enabled caustics in the indirect illumination rollout of the mental ray renderer. I set the samples to 64 on mine.

No Final gather.

Thats it, hit render and post your cool creations so I can see them!
  11 November 2003
now this is what im after

but 4 hours, can't seem to use it in my skins shaders
  11 November 2003
Caustics is a killer, isn't it? I mean 4 hours...
I will sail to the stars...
  11 November 2003
"but 4 hours, can't seem to use it in my skins shaders"

Yes, thats a nasty render time, but my PC is not the fastest by any means (dual MP1600's). Plus, I'm just learning how to use Mental Ray myself, so I'm no expert on what to increase / decrease to make a speedy render. Other than the basic samples, etc.

I really need a new PC. I may post my file if someone with a 3 ghz or higher Xeon system or newer Opteron would be willing to render it for comparison?
  11 November 2003
Quote: I really need a new PC. I may post my file if someone with a 3 ghz or higher Xeon system or newer Opteron would be willing to render it for comparison? [/B]

Well I have a 3.06 Ghz P4 with a gig ram but I have Maya.

I do have something that might be able to import 3ds files, who knows. Or if you have an export to Maya thing, then maybe that too.
I will sail to the stars...
  11 November 2003
Hehe, my machine would probably take days!
  11 November 2003
Wow that looks dope. I am definitely going to try this out. Thanks for sharing the information Folical9!

Habitat1 : : A transitional creative analyzation of the state of humanity and its symbiosis with the environment in which it resides. Coming Soon.

Chaos breeds evolution
  11 November 2003
I have a 3.0 ghz pentium 4 with hyper threading and 1 gig ram.

I would like to render the file for comparison.
:xtreme: primal101
  11 November 2003
I've made some adjustments and have the rendertimes down to somthing a bit more acceptable. The image below was rendered in 21 minutes and 42 seconds on my dual MP1600.

I should point out the white light at the base of the feet of the object. That's not caustics. I have the ground plane set to not receive caustics. It's actually the light being transferred from the object to the plane. It seems that if the glowing object touches something, it passes the light through to it. Odd behaviour none the less.

People have had problems creating the same effect, so I'm putting the above scene on my server. It includes the blue glass as well as this orange one. Also, if you dare, you can enable Final gather and turn the skylight on and render it. It's setup for HDRI maps already. Render times will go WAY up though. But you will get nice transparant colored shadows.

Here's the file:
Download SSS Glass

Last edited by JeffPatton : 11 November 2003 at 04:05 PM.
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:01 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.