1

I have the following shader node setup:

Shader node setup

and I would expect this to work similarly to the Blender manual's description of using a Fresnel node to blend Glossy with a Refraction BDSF to emulate the Glass shader:

The most common use is to mix between two BSDFs using it as a blending factor in a Mix Shader node. For a simple glass material you would mix between a glossy refraction and glossy reflection. At grazing angles more light will be reflected than refracted as happens in reality.

Frustratingly, however, I get this result:

Cycles render showing a strange black ring

This is a very similar issue to this post, however the only answer begins with "switch to Eevee" but I'm sticking to Cycles (which doesn't have this setting).

I'm also aiming for something like this question, but my issue seems to be outside of all of that.

It's possible that the issue is a mismatch between the indexes of refraction - a transparent shader is basically a refraction shader with IOR of 1, but the Fresnel node has an IOR of 1.45 - but setting the Fresnel's IOR to 1 causes the shader to be fully transparent and my sphere to disappear.

The reason for the mismatch is that I'm trying to render a soap bubble. Light doesn't refract through a bubble as it is filled with air (of the same IOR as the air outside the bubble, i.e. 1) so light rays pass through unbent, but for the purposes of Fresnel reflection, the IOR is equal to that of the soap film.

It's possible that to achieve this effect I need to give the soap bubble some thickness (allowing me to use the usual refraction BDSF, or even just use the Glass one) but soap bubbles have a thickness of less than a micrometer, and I don't think Blender will be able to handle that!

Thanks for your help! I'm doing this in the hope of implementing some thin-film interference further down the line, which should be exciting!

Tim Leach
  • 13
  • 4
  • Are you using the Shader preview or the Render preview ? – Emir Jul 01 '22 at 13:46
  • @Emir neither, the screenshot I gave is the actual cycles render – Tim Leach Jul 01 '22 at 13:47
  • Try switching the positions of the Glossy and the Transparent in the mix shader and change the IOR to 0.010 (Unintuitive, I know). – Christopher Bennett Jul 01 '22 at 13:51
  • Well, is hard to say, it's working for me https://imgur.com/a/001hFkQ with the same nodes... Is that the look you are after? – Emir Jul 01 '22 at 13:52
  • @ChristopherBennett oh that's interesting! https://imgur.com/a/FkNPmCb This is definitely closer to what I was looking for, thank you! It's not very visible, but I can play around with the settings! – Tim Leach Jul 01 '22 at 13:57
  • @Emir I'm afraid not - your torus has the same strange black bands that my sphere has, that I want to get rid of! – Tim Leach Jul 01 '22 at 13:58
  • That's because i make it that way (glossy BSDF type)), what i mean was if you were looking for a transparent area and a non transparent border – Emir Jul 01 '22 at 14:48
  • @Emir no, I was looking for a render with no border at all, like ChristopherBennett's answer below – Tim Leach Jul 01 '22 at 15:04
  • I've figured it out! The Fresnel node takes into account the direction of the normal to factor in total internal reflection, meaning the dark border is actually the "inside" of the glossy shader. It assumes the body is solid rather than hollow, which is suitable for a glass object but not for a bubble. I'll write up a solution shortly, but the fix is to trick the Fresnel node into assuming all faces it touches are facing towards it. – Tim Leach Jul 01 '22 at 16:58

1 Answers1

0

I was able to achieve this look with this node setup

SHa1

The look is more defined by using this as a background (HDRI + Color):

Sha2

As an "enhanced" version of this, I would add a Noise Texture and use the colors from it for the "soap film" color, and the height as the basis for a bit of a bump map (so the surface isn't perfectly spherical).

Sha3

Christopher Bennett
  • 25,875
  • 2
  • 25
  • 56
  • This looks great, thank you! Any idea why my initial setup was behaving strangely, and does the Fresnel IOR have any sort of physical backing? – Tim Leach Jul 01 '22 at 14:01
  • Honestly, I'm not sure why this setup works with the IOR that it does - last time I set up something like this, I'm almost certain it behaved differently. Regardless, it seems to work for this project. And yes, IOR is based in physical backing, and no, that doesn't seem to apply here for some reason - unless it's just a property of how a "non-refractive film" works. – Christopher Bennett Jul 01 '22 at 14:04
  • Playing around with this is producing some really weird effects - I think I need to read up on how all of these nodes interact with the faces on the other side of the mesh, which I think is probably what's contributing to the weirdness here – Tim Leach Jul 01 '22 at 14:21
  • I've played around with this a bit, and noticed this: https://i.imgur.com/82nrH7N.png When the glossy shader is replaced with a diffuse one, we get what looks like a "hole" being made in the side facing the camera, and the "sun" on my HDRI shining through the hole and lighting a circle on the internal surface of the sphere. Very strange! (The lit circle moves around as I orbit the camera) – Tim Leach Jul 01 '22 at 15:48
  • I've set the Fresnel IOR to 2.25 for the above image – Tim Leach Jul 01 '22 at 15:49