6
$\begingroup$

I'm new to blender and I'm wondering if there is a way to make a shader covered in glass, using only materials.

I've just tried mixing glass with a diffuse using a radial gradient, but it didn't pull off the effect very well.

I want something like this but with a single mesh, is that possible?

$\endgroup$
2
  • 1
    $\begingroup$ Hello :). It'd be best to add some images to illustrate what exactly you're going for. You can also add your current result. $\endgroup$ – Jachym Michal Jan 23 at 18:19
  • $\begingroup$ I hope this explains it a bit better :) $\endgroup$ – Malte Bernhardsson Jan 23 at 18:47
7
$\begingroup$

Viewing-Angle Based Solution

This setup works well for curvy objects. enter image description here

But on a cube, for example, it is far less convincing. enter image description here

I'm sure that with some serious noding you could get much closer, but it may not be worth the effort.


Node Explanation

Inner Material

The Diffuse BSDF node is the plug'n'play part of the node tree. Whatever shader is put in its place will look like it is coated in glass.

The normals of this part are slightly warped by the Reflection coordinates to approximate the refraction of the glass coating.
enter image description here

Glass Mix Factor

This part creates a mask at grazing viewing angles that is either black or white.

To keep the glass bright, all back faces are added to the mask. If this is not done, the glass will often look dark.
enter image description here

Clearcoat Mix Factor

Once the glass has been mixed in, there is no reflection above the inner material. To add this only where the glass is not already part of the shader, subtract the glass' mix factor from the Fresnel (which should have the same IOR as the Glass BSDF).
enter image description here

$\endgroup$
4
  • 3
    $\begingroup$ Have to admit - the result on the sphere and Suzanne is really great :). And thanks for the explanation, learned a lot here. $\endgroup$ – Jachym Michal Jan 23 at 20:40
  • $\begingroup$ It didn't work quite as I needed it to, but I'll play around some and see if I can come up with something that works better for me, still, I think this helped alot, thanks! $\endgroup$ – Malte Bernhardsson Jan 23 at 20:47
  • 2
    $\begingroup$ @MalteBernhardsson "something that works better for me" is a very vague term, and only you can know what it means. Please edit your question and be more specific. Show some reference of what you aim to do. Otherwise is hard to help. $\endgroup$ – susu Jan 23 at 22:00
  • $\begingroup$ yeah, sorry, I just meant a material that would work better for materials with hard edges. @susu $\endgroup$ – Malte Bernhardsson Jan 23 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.