1
$\begingroup$

I'm trying to make a procedural gem shader that Is scientifically correct and physically correct. If I mixed beryl, beryllium, aluminium, chromium, vanadium, and iron shaders using an add shader it turns pure white

If I use A mix shader it turns into metal and isn't transparent like A Gem.

If I get rid of some of the metal shaders like beryllium, aluminium, chromium, vanadium, and iron while using a mix shader then it isn't pure white.

How can I Mix all of the shaders and keep it from turning pure white?

$\endgroup$
3
  • 1
    $\begingroup$ I gather you want to compose an "uber shader" for gemstones that contains all of the elements a gemstone might be made of, but I suggest that this is not the best way to go about it. You are talking about shaders with metallic components that will govern the surface response of the mesh, but for a truly scientifically and physically correct gem you would need to account for volumetric effects as well, no? Such a shader may be hard to find. $\endgroup$ Commented Sep 15, 2021 at 15:47
  • 1
    $\begingroup$ One point to note regarding the Add shader is that any time you add color values, you will eventually get to pure white when your R,G, and B values reach or exceed 1. It's literally adding the RGB values. $\endgroup$ Commented Sep 15, 2021 at 18:02
  • 1
    $\begingroup$ I would also say that if you care about accuracy you should probably create separate shaders per mineral. It's like when people want to create a "wood" shader, but the internal structure of wood is what creates the distinct look of each species. Trying to support all the possible variations would be really difficult, and you'll be able to generate a lot of wildly inaccurate species (or in this case gems). If you're going for artistry then who cares, but if that is the case then why even bother with the tons of effort towards realism? $\endgroup$ Commented Sep 15, 2021 at 18:14

1 Answer 1

2
$\begingroup$

The problem is that what you are doing isn't how metals behave when they're in a crystal lattice, so it's not physically correct. Also, shaders don't really model physics, but rather try to mimic surface behavior.

What you need is a source of the correct color for the mineral that you're trying to model, in its crystal format. Crystal, because gem stones are usually the crystal versions of minerals.

Since you started your list with beryl, I suspect you're looking to reproduce an emerald gem, although it can be the base of a wide range of crystal forms

I'll use an emerald shader as an example, but the shader only needs a few small changes to model the other forms.

There are many ways to do this, but this one is simple to explain:

Most of the color in a gemstone comes from the interior of the stone absorbing light in certain bands. Otherwise, a good way to model a gemstone is with a glass shader, one of the few times that glass is a good choice.

Because the material output node has support for both a shader and a volume shader, that's what we'll use:

Material setup for emerald using glass and volume absorption shaders

The glass shader should be set to white, no matter the color of the gem. The glass shader's IOR value might have to change to match the IOR of the gem.

The actual color of the gem comes from the absorption shader. In this case, I've set it green to match emerald; but as I said, beryl is the basis for minerals of many colors. Just change the color to match the mineral gemstone you're trying to model.

EDIT: from the comments, I was reminded that if you are going to use the Material Output's Volume input in Cycles, you need to go to Properties Editor, Render Properties tab and under Light Paths -> Max Bounces, change the setting of Volume from the default of 0 to some larger value.

properties editor render properties

Here is a diamond with the emerald shader

Volume bounces set to 0

diamond with emerald shader, volume bounces set to 0

Volume bounces set to 5

diamond with emerald shader, volume bounces set to 0

$\endgroup$
3
  • $\begingroup$ Relevant: blender.stackexchange.com/a/237777/110840 $\endgroup$ Commented Sep 15, 2021 at 15:50
  • 1
    $\begingroup$ excellent point. I'll edit the answer to mention that. $\endgroup$ Commented Sep 15, 2021 at 15:52
  • 1
    $\begingroup$ I think Marty's first point is that, for example, ruby is aluminum oxide with chromium impurities giving the reddish color. However, you cannot mix an aluminum oxide shader with a chromium shader and expect to get ruby. Cycles isn't physically correct like that, and a simple "mix" shader wouldn't behave the same as impurities in a crystal lattice. $\endgroup$ Commented Sep 15, 2021 at 18:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .