I started looking into how to create a realistic granite shader. While researching, I learned a lot of interesting things about gems and minerals and got distracted. For example, I didn’t know that rubies and sapphires are just variations of the same stone, called corundum. I thought it might be interesting to try to create a corundum-like shader, because it ought to be pretty simple. Let’s give it a whirl and see what we get.
Create a new scene, and add a Plane. Scale it to about 1m x 1m in size. Use the Object->Apply->Scale function so that our texture isn’t stretched. Add a Material, and in the Node editor, add a Checker texture (Add->Texture->Checker). Plug it into the Color input of the Diffuse BSDF node, like so:
This makes a nice spot for our gem to sit while we play with it:
Now we need something that is gem-like, but we don’t want to waste time making an object. There’s a Blender add-on to make diamonds for you, but we don’t need all that fanciness! Just create an Icosphere, via Add->Mesh->Ico Sphere. Scale it to 10cm and move it to < 0 cm, 0 cm, 5 cm >. Again use Object->Apply->Scale on the object so it has a uniform scale of 1, 1, 1. I like to do this so that my shaders don’t have unexpected issues related to an odd scaling I forgot about.
Now, rubies are reddish-pink, transparent, and shiny. That sounds a lot like glass. Glass has an index of refraction (IOR) of about 1.5 or so. A quick web search reveals that corundum has an IOR of about 1.76. Let’s give that a try and see how good it looks. Create a new Glass shader. Set the IOR to 1.76, and the Roughness to 0.1 (because we want it to be really smooth and shiny). Set a nice reddish-pink color, like Hex FF7B89:
It’s not too bad, but I think we can do better! Corundums get their color due to impurities in the stone, and in the case of a ruby it’s the amount of chromium that determines how deep the red color is. Because it’s impurities that cause the color, it also makes the ruby less transparent. Also, a little research reveals that light is scattered inside of a ruby.
Fortunately, Blender has a neat feature called Volume Scatter. That’s a scattering of light inside of a volume, not surprisingly. Let’s try to use that to make a better corundum.
First change the color of the Glass shader to pure white so we can worry about the color of our interior and not be confused by the exterior color. Add a Volume Scatter node (Add->Shader->Volume Scatter), and plug it into the Volume input of the Material Output node. Set the Density to 5, and the Anisotropy to 1:
The Density, as the name implies, is how dense the interior will be. If you lower the value, the shader will be more transparent. A Density of 5 made our shader quite dark and smoky:
The Anisotropy value affects how the light scatters from different angles. Setting to 1 means it reacts to light shining from the front. A value of -1 means to react to light behind it.
For our ruby, we want a red color, not black! Set the color of the Volume Scatter to a nice red like we used before, Hex FF7B89:
Oh dear. Our shader is green!! This is because it’s scattering the light, so we see the opposite of the color we want. To make it red, we actually need to choose a color on the opposite side of the color wheel. Try a nice bright green like Hex 12FF69:
Now that’s a pretty ruby color!
We can still do better, I think. What if we make the color more complex? Let’s add a Color Ramp, and use a slight gradient of red and pink colors:
The left color is the same Hex 12FF69 color we just used, and the right color is Hex 00FFF8. We need something to decide which color of the ramp to use, so let’s base it on the angle we’re looking from. Add a Layer Weight node (Add->Input->Layer Weight). Connect the Facing output to the Fac input of the Color Ramp:
The effect is subtle, but it’s a little bit redder around the edges and pinker in the middle. If we look straight down from the top, you can see it’s a deep red color:
From behind, it’s redder at the bottom and pinker at the top:
Neat, eh? You can also try connecting the Fresnel output to the Color Ramp for different behavior; try it and see if you like it better.
For the finishing touch, I think the reflections are a bit too white. That’s because our Glass shader has white as its color. Make it a tiny bit pinkish, like Hex FFD8F5, and I think we’re done:
It’s quite pretty and a lot more complex-looking than just red glass. Since there are infinite varieties of rubies, you can also tweak the colors to get whatever mix of red or pink you want in your ruby.
Remember I said rubies and sapphires are just different varieties of the same stone? You can make this into a nice sapphire by simply changing the Color Ramp. Look at what is directly opposite of the colors I’ve chosen and you’ll see it’s opposite of light blue and indigo:
The result is this:
I think that’s a really beautiful, rich blue, don’t you?
Thanks for reading! I hope you enjoyed this. I know it’s not a perfect corundum, but it still makes a pretty jewel.