Professional VFX Tutorials

by Cornelia Bader

Diamonds with Mental Ray

How to shade and render diamonds with mental ray (maya 2012)?
As I googeled for an answer, I was surprised by how few tutorials there are on the web who deal with the shading of diamonds, especially when it comes to Maya. So I decided to write this tut on how I made mine:

When it comes to reflections, refractions and dispersion, shading can be a very difficult task. So, let’s see how those diamonds were done.

First step: The model
Take a cone, turn down its subdivision axis to 20 and extrude the top face twice.


extrude upper face

Select the edge of the face you just used for extruding and insert a second edge loop here. This helps the lighting to define a nice and realistic edge which will improve our rendering. You can do so by using the bevel function and choosing a nice value for your offset depending on your size of the diamond (mine is 0.05).

bevel edge

After that take the “Interactive Split Tool” to turn following quads into triangles:

interactive split tool

interactive split tool 02

Delete those edges all around the diamond:

delete edges

And you will get this:


Now we want to have more detail on the lower parts of the diamond, so we will use the “interactive split tool” again to draw triangles:

detail lower parts

After that delete following edges:

delete edges

And you will get:

result 02

I also inserted another edge loop on the bottom of the diamond so that it gets a nice flat bottom instead of just a sharp one:

flat bottom

Second step: Lighting
First of all turn “use default light” off (for that go to the render settings –> render options):

Now your scene will render black. Bring two spot lights into the scene and arrange them like you would use real three point lighting: one key light and one fill light. My setup looks like that, feel free to chose your own location for your lights:

three point lighting

I decided to go without the bounce light because we will use final gathering instead. But what we want to do is using our spot lights as area lights. So go to the mental ray tab in the spot light settings and chose area light, as well as visible:

spot light as area light

When we render the image now you will see that there is something essential missing now: shadows. So we go to our key light and turn on raytrace shadows:raytracing spot light

Those values could be way to high for your own scene, just experiment which ones you need (never mind the ray depth limit setting right now, we will need that later on). When you hit render now, you will see that still nothing happens. This is because raytracing is turned off in our render settings. So, go there and check raytracing:

raytracing on

Now you will get something like that:


And by the way: Turn up the anti-aliasing to 2.
So far, so good. We will come back to adjust our light settings because lighting always goes hand in hand with shading.

Third step: Shading
Because of the energy conservation and physical accuracy of mental ray materials, they will always look a bit more realistic and better than simple maya shaders. Since diamonds have a lot of specs, the energy conservation of the mental ray materials is just what we need and what better way to shade diamonds than to use the mia_material?

But first I’d like to give the ground plane a nice shader: Assign a mia_material and use those settings:

floor shader

Well, to explain those settings: It is a rough material without reflection or refraction, it is not glossy nor does it need a fresnel reflection. What we need is a color, the diffuse value, the roughness and a bump:
Go to the bump tab of the mia_material and chose a fractal (bump depth: 0.004) and repeat it 15 times (depends on your scene size and on your UV layout):

bump floor

At this time the image renders too dark and too ugly, so we will use final gathering to brighten up our image as well as letting the light bounce around correctly. The second thing we will do now immediately is to use an exposure lens shader for the camera which will give us the right gamma value for the scene (2.2):

dark and ugly rendering

dark and ugly rendering

same rendering with final gathering and exposure lens shader

same rendering with final gathering and exposure lens shader

This are the settings for the exposure shader for this image (I brought up the value for burn hightlights as well because it will give the diamonds a nicer look once when we assigned a shader to them):

exposure settings 01

If you think that your image now looks too flat and you don’t want to correct that with an exposure node in After Effects later (which would be the normal way of doing so), you could bring down the gamma value now to 1.3 and the F Number to 6, which will give you that rendering:

gamma 1.3

rendering with gamma 1.3 and f number 6

Now it is time to assign a nice shader to our diamond models. We will use the mia_material again. Those are my settings:

diamond shader

Turn off weight and roughness, bump up your reflectivity to 1.0, turn off all the settings inside the advanced reflection tab (you want to have highlights for your lights in the scene and you want to have reflection even on the inside of your models), bring up the IOR to 2.417 (real value for diamonds), put the transparency to 1.0, turn off advanced refraction but turn on “solid” and “refractive caustic” (we will need this for some nice caustics later on) and turn on “Use Fresnel Reflection” (since we want to get stronger reflections on the edges but not on those faces who look straight into the camera – just like when you look at a real glass).
Before rendering don’t forget to bring up the values for raytracing in the render settings.

The rendering now looks like that:

Now, what makes reflecting objects realistic are the, yes, reflections. What better way to put things in a scene that can be reflected than to use a HDRI? Go to the render settings, indirect lighting and chose imaged based lighting. Go to google and search for the kitchen_probe.hdr which is available for free – if you want to use them for commercial use, let the authors know.
Now the rendering looks like that:

hdri rendering

saturated hdri

desaturated hdri

desaturated hdri

What is still missing now are caustics as well as the dispersion which gives diamonds their typical look.

Fourth Step: Caustics
Go to our spot lights, to the mental ray tab and check “Emit Photons”. In order to make caustics work you have to go first to the render settings to check “Caustics” in the Indirect Lighting tab. I put the accuracy to 150, the radius to 2, the filter type to cone. The values in the attribute editor of the light are: Photon Intensity: 35000, Exponent: 2, Caustic Photons: 10000. Just try what gives you the best results in your scene.

diamond rendering with caustics

diamond rendering with caustics

Now there are too much caustics in it, I will correct that with the next rendering.

Fifth Step: Dispersion

There are two ways I know of to get dispersion in Maya with Mental Ray: mib_glossy_refractions and faking it by chosing different types of IORs.
My favorit one is the second way. Just create three render layers, each one with another value for the IOR, e.g.: 2.40, 2.43 and 2.46. In compositing just take the image with the IOR of 2.40 and make it red, take the one with the IOR of 2.43 as the green one and the last one as your blue image (to color your renderings just use e.g. Levels in After Effects). Add those three (additive mixture of color) and you will get a final diamond which now has dispersion:

image with IOR 2.40 used as red image

IOR 2.43 - colored green

IOR 2.46 - colored blue in Compositing

Blending Modes: Add

dispersion (e.g. within the red circle ;D) - for this rendering I used the desaturated HDRI so that the dispersion can be seen better

You can read more about this trick here.

Et voilร  our diamond is finished:

If you are in need of the diamonds for your print work, you can download some of my images here (300 dpi, alpha channel).



  web design greece wrote @

Hello! I just would like to give a huge thumbs up for the great info you have here on this post. I will be coming back to your blog for more soon.

  Augustina Ondeck wrote @

I consider something truly special in this site.

  Odette Bryar wrote @

Some genuinely choice posts on this website , bookmarked .

  Lona Walls wrote @

Great post!

  pixelprophecy wrote @

Thank you! ๐Ÿ™‚

  ame wrote @

Hi, how do you do.

i have tryed to follow your tutorials, unfortunately, when i render i have got blue background, and my diamond doesn’t have glassy appearance, i have whitish, or rather bluish diamond.
i thought maybe its mia_photographic1, settings, or RGB colors is not fixed properly?
also i wanted download for apple kitchen_probe.hdr its a lot websites, but i couldnt find right one.
could uou help me on this metter, please.


  pixelprophecy wrote @

Hi ame,

You can find the kitchen hdri here: (just scroll down)

Concerning your blue color you could check those settings:

What is your color for your camera background? (should be white or black, not blue)

If you have given a blue color for the max distance in your advanced refraction or advanced reflection tab within the mia material for the diamonds, the diamonds will appear bluish.

Maybe the color for your lights is blue?

Are your raytracing settings high and good enough? (concerning refraction and reflection or “glassy” appearance, the most common mistake is here; use raytracing within the render settings, bring up the raytracing values there, check the the IOR Setting, the BRDF curve and the Reflectivity) – the missing of the glassy appeareance sounds like a shader problem to me or maybe it is just the missing hdri.

Do you have blue shadows?

And if you used the mia_material preset “GlassSolid” the reflective color for this shader is slightely blue, just change the color to white instead.

If your whole image appears to be too blue or too dark, it could be because of your light setup or because of the settings for the mia_photographic shader. If it is just the diamonds, the reason is most certainly one of the above named.

I hope I could help you!


  Zachariah wrote @

Fantastic tutorial! Although, I’ve tried it over and over and I still get a lot of black spots in the diamond. I’ve had my reflections and refractions set at 20 and then at 40… doesn’t rid myself of the black areas… any thoughts?

  pixelprophecy wrote @

Hi Zachariah! Thank you ๐Ÿ˜‰ Concerning your problem: It could just be a bad reflection or refraction of the HDR image you use or the camera background color (try to set it to white).

  noddman wrote @


I tried following your tutorial but my when I get to the point at rendering the diamonds with mia_material_x the diamonds are too black. Any ideas?

  Jeff wrote @

May I have your two spot light setting? Coz I cant setup the light pretty as your lighting looks ^^

  pixelprophecy wrote @

Of course!

  Anoop wrote @

Superbbbbbb sir

  pixelprophecy wrote @

It’s madam ๐Ÿ˜‰

  arescet wrote @

thank you!! ๐Ÿ˜€ you solved my diamond problems, mine looked like a thick flat glass before. thanks again for this

  Shawn wrote @

Bloody brilliant!
This works really well with Maya’s crystal Paint Effects brush. I added the Mental Ray bump flakes and adjusted the values to make some really nice looking quartz.

  Aditya Kalan wrote @

Thank you sir ! i try to diamond caustic dispersion …& you solved my problem…5th step is very imp …TC

  pixelprophecy wrote @

It’s madam, I am female ^^ Glad I could help.

  mrbungle1 wrote @

All of your images seem to be broken. ๐Ÿ˜ฆ

  pixelprophecy wrote @

That’s strange. Everything works just fine here… Do you have a slow connection to the www?

  mrbungle1 wrote @

No sir… when I click on an image, it tells me

โ€” 403: Access Denied โ€”

This file requires authorization:

Very weird.

  pixelprophecy wrote @

I see, that’s what you mean. Honestly, I have no idea why this keeps happening. The html code says it should not happen ๐Ÿ˜‰ Hope you like the images nonetheless!

  oken wrote @

Nice Work. It has really helped us as in reference for some of our works in our animation company Keep it up

  shinesprite wrote @

Hey there! I’m having the same problem as mrbungle1. I can only view some of your images. The error I get is “403: Access Denied – This file requires authorization. You must be logged in and a member of this blog.” I noticed the HTML code for the problem images is: “” …which means they MIGHT be from November 2011. The files that work for me are: “” …which means they might be from December 2011. I noticed also that I can’t view any posts for Nov 2011, if you have any. Did you make certain material from Nov 2011 private? Perhaps that is why we cannot see the images. Please reply! I’d love to be able to use this tutorial, it seems very informative!

  shinesprite wrote @

Oops! Sorry! The problem images seem to be linked to your “PixelProphecy” blog. While the working images are linked to your “PixelTutorials” blog. ๐Ÿ˜›

  pixelprophecy wrote @

Hi there!

Could you please try it again? I had my other blog on “private” because I don’t use it anymore ;D and maybe that was the problem!

Thx for telling me about it, guys ๐Ÿ™‚

  zorkkz wrote @

Hi Cornelia,
I tried to follow your tutorial but i did not get the result as yours.
Isn’t it possible that you make a quick movie to show the whole process ? Coz I reading it, I got lost sometime like where/how to add the bump ? ” to bring up the values for raytracing in the render settings” which ones ?

  pixelprophecy wrote @

This is a good idea. Once I find some time, I will definitely do this.

  sonu kumar wrote @

Awesome tutorial! Keep it up, man!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: