1

is there a shader that for transparent plastic that simulates a hollow inside, as described in this answer, but whose roughness is also adjustable? Using that node setup increasing the density value gives a somewhat rougher plastic but it looks a bit weird and I do not think that this is the correct way to do it

enter image description here

The problem is that using a Glass shader requires the mesh to have an inside and that would be quite hazel to the ad and increase render times drastically. OS I require a material that uses the same approach as in the linked question but with a roughness slider

Thanks for your help

Phönix 64
  • 720
  • 6
  • 24
  • hello, maybe show a picture of what you want – moonboots Nov 13 '21 at 00:05
  • A picture of the look I want to achieve? I have added one – Phönix 64 Nov 13 '21 at 00:07
  • What kind of shape are you using it on - is it simple like a cube, or more complex with curves and nooks? – Christopher Bennett Nov 13 '21 at 00:07
  • I have added a picture, hopefully, it is clearer now. – Phönix 64 Nov 13 '21 at 00:10
  • Yes, if I want to render the transparent material realistically, build an inside, it will drive up render times and would also increase the poly count. I could try just using a cube as the "inside" but that would still not help with the render times – Phönix 64 Nov 13 '21 at 00:13
  • I see. I'll look into it. Do you have objects inside your main object that you want to be able to see through the "shell", and if so, do they need to be refracted perfectly, or just " close enough? – Christopher Bennett Nov 13 '21 at 00:15
  • Just good enough is all I need, and yes I have bullets inside the magazine. Just like in the image. Thanks for looking into it – Phönix 64 Nov 13 '21 at 00:17
  • Hello :). Geometry doesn't increase rendertimes. Slow shaders and lightbounces increase rendertimes. In this case, it won't be faster since lightbounces will be the same. – jachym michal Nov 13 '21 at 09:24
  • Yes and if I would do it the physically correct way that would be the case – Phönix 64 Nov 13 '21 at 10:28
  • @Phönix64 just a small trick: If you use the Incoming vector as the normal of a Refraction shader, you don't need to solidify the mesh, and you can use it's roughness. – Secrop Nov 14 '21 at 08:48
  • Okay thanks will keep this in minde – Phönix 64 Nov 14 '21 at 19:23

1 Answers1

2

Try something like this - it might not be perfect, and may take some tinkering, but you can adjust the clarity/rougness through the Transparency Mix, the Roughness of the Glossy Shader, and the IOR if the Fresnel - between the 3 you should be able to find a mix that comes close. I added a bit of a Noise Texture to some Bump, to give it that "slightly bumpy plastic look" (and I mean very slightly - I mixed the noise texture .999 percent with white first), and I also colored/darkened the glossy and diffuse colors to match the photo. The "magazine" is a flattened stretched cube (6 sides):

Trans

Christopher Bennett
  • 25,875
  • 2
  • 25
  • 56