0
$\begingroup$

This question already has an answer here:

I tried rendering an object that has a mixed glass and diffuse shader and also a background image but after adding a holdout shader in image 2 to make the object transparent to see the background image the glass shader becomes darker.

Image 1: enter image description here

Image 2 : after adding holdout shader glass becomes darker

Withoutenter image description here transparent shader:

Nodes for background image:enter image description here

With transparent shader : enter image description here

$\endgroup$

marked as duplicate by JtheNinja, Duarte Farrajota Ramos, X-27, David Oct 20 '18 at 1:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1
$\begingroup$

That's because the way you have it set up, it's going to be transparent on the edges and solid in the middle. Switch the top and bottom slots, and it should fix it!

EDIT: The Holdout shader also only uses what you have set for your world background. It's going to show up as a basically a hole to show the background through, with no consideration for any other object or faces behind it. If you simply want transparency, use the Transparent node instead of Holdout.

(It's doing what you you want, this is just how it looks in preview; see how it looks in render, then switch the top and bottom slots to see if it looks better, as well as also hookup up your mix factor back into your original mix; it can hook up to more things at once!)

EDIT 10/19: By switch the slots, I mean the sections that say 'shader'. When you use a mix factor, it's telling Blender to make all the white one of the shaders and all the black the other shader. Any mix is a combination of the two. Fresnel as a mix mask looks black where it's facing the camera, and white where it's angled away, and a fairly short falloff between the two. This means if it looks funny, you might simply have it hooked up opposite from the way you want, where it's hooked into the little green dots that say 'shader'. To further this note, you don't have the same mix factor in your addition with the holdout. You just moved it to the second mix. For better results, plug the Fresnel Fac into the the gray dot that says Fac on both mix shaders.

$\endgroup$
  • $\begingroup$ Thank you for responding Lee. I'm not sure what you mean by switch the top and bottom slots. Using the transparent shader doesnt seem to solve the problem. I've updated the question so you can see what happens when I add the transparent shader. $\endgroup$ – Zuros Oct 18 '18 at 14:35
  • $\begingroup$ Updated; did that help? I'll reword as much as you need me to. This is a pretty complicated subject, but once you get the hang of it, it'll seem much easier. $\endgroup$ – Lee Oct 19 '18 at 6:34
  • $\begingroup$ Basically all I want is for the object to be glass/plastic like and let the background image be visible through it. I know this is a simple fix but I just cant seem to get it. I followed what you said but it doesn't seem to work. Here's a link to the file if you ever have time : pasteall.org/blend/index.php?id=50526 $\endgroup$ – Zuros Oct 19 '18 at 15:54
  • $\begingroup$ Alright, I don't know what's going on with that file, but I can't seem to even select your lightbulb. However, if all you want is a nice glass material without fussing about all the rest, try using a principled shader, and playing with the transmission slider (that's transparency). It calculates refraction and fresnel automatically! $\endgroup$ – Lee Oct 19 '18 at 21:18

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