Gem shader: does Abbe number do anything?

Playing with the gem shader, which is “ok” given the constraints of webGL, I don’t see any change in the appearance when I change the Abbe number. Cranking up the value, I would expect to see some pretty rainbow-colored diffusion inside the gem. Perhaps a bug? Perhaps I’m using it wrong?

Also, any tips for getting the most out of this gem shader? The documentation describes the basics of the parameters, but not how to make this really sparkle. I observe that it seems to “refract” disconnected parts of the mesh… like, here, the center stone appears to show the accent stones in its faked refraction, but doesn’t show its own interior.

@adamgravois - Apologies if this wasn’t clearly documented. The gem shader only works on gems that are centered around their local origin. I would suggest detaching each gem as a separate mesh centered around the origin

The screenshot looks like they’re merged together.

Here is a screenshot of the minimum and maximum abby numbers when set up correctly, the spectrum split (rainbow) is present.

1 Like

Oh, those look vastly better! Yes, that is an important consideration that deserves mention in the docs. So, each gemstone must be a separate mesh within a model - or must be a separate model? Does axis orientation affect the result? (Is the shader, say, expecting a local axis with Y pointing up at the crown/table for best result?)

You are correct, my example gems are currently exported directly from the CAD program as a combined mesh… and these rings have several, sometimes dozens of accent stones. Hmm, ok, more pipeline work to be done.

They should be separate meshes, not necessarily separate models.
Each of the gem meshes should have the mesh origin at (0,0,0) before applying the transform. If that is how they’re setup, then you can add a transform to each gem to put them in place.

That’s a little better:
image
still need to improve the lighting environment… :wink:

1 Like

Nice! I’d love to see the final result :diamond_shape_with_a_dot_inside:

Yeah, that’s more like it… fire aplenty :slight_smile:
image

3 Likes

Looking great @adamgravois!

1 Like