How to make a crystal shader?

Hi. I was trying to get a correct crystal (transparent shader) in Spark AR.
But so far playing with alpha transparency did not yielded correct results.
Here’s the graphic I am working with for reference.

Is there a way to create an approximate crystal shader? (color black, high reflections?). So far no luck.
Please help.
Thanks!

Here’s the result of playing with the alpha:

mmmh, I don’t know how you’d go about making one this nice :thinking: Maybe through substance painter and stuff like that. Playing around with the Physical material this is the closest I come :

You might be able to get the right look with Mate’s glass shader. It has quite a few options to tweak

2 Likes

Hi friends. Thank you for your reply.
I just found out there is a gumroad glass patch shader that has all the toys I need in shading like IOR, refraction and distortion.
I will find for alternative solutions.
Yeah, SP doesn’t shade.

ooh I’m actually interested in one that has IOR. I bought Mate’s glass patch ages ago but going back to it now it doesn’t have that many parameters to tweak and doesn’t give the result you’re looking for at all (no reflection)

You could probably add reflection by blending the result of Matt G’s environment map patch

1 Like

My interest just peaked with that patch. So it is possible to create shader patches, using the what? GSL language? if so, what patch allows me to “compile” a shader to a patch?
Nothing on the guide, except the procedural effects patches…

All of the compiling happens behind the scenes. Basically, the shader patch graph gets converted into GLSL script. Spark doesn’t give us direct access to the shader scripts, probably because they have some specific subset of features that they want to force us to use for performance reasons.

But for the majority of shaders, you should be able to translate them into patches. The main things to note is that the shaders in spark are limited to lowp (low precision), and they don’t support logic statements like if/else.

2 Likes