I have a scene with 3 cubes, Blue, White, Red. In the middle the white is covering up a section of the red cube. When I toggle on off the white cube, the shadow gets affected on the red cube side. I need to export from Blender each individual object the way it appears in the render, but when I turn off the objects, the shadow and lights also disappear from the rendered image. So is there a way to hide objects without losing the the way its influencing other objects in the scene?
1 Answer
$\begingroup$
$\endgroup$
11
Maybe you can get away with this: create a material using Transparent BSDF set its color's alpha to zero leave the RGB values full white (thx @GordonBrinkmann) and enable alpha blending under Material Properties > Settings > Blend Mode. Leave the Shadow Mode as Opaque. This gives a completely invisible object which still throws shadows.
-
1$\begingroup$ It is not necessary to set the color's alpha to zero. In fact, the Alpha value of an RGB color has no effect in the Shader Editor and many other parts of Blender at all. It can only be used in the Compositor. Especially in the Transparent BSDF, the RGB values are what creates the transparency - a value of 1 means full transparency, a value of 0 full opacity, so it is the opposite of the alpha values, which is basically an opacity value. $\endgroup$ Commented Sep 6, 2023 at 7:35
-
1$\begingroup$ @GordonBrinkmann oh wow, i didn't know. Thanks for sharing, i edit my answer. $\endgroup$– taiyoCommented Sep 6, 2023 at 7:41
-
$\begingroup$ I was editing my comment but somehow the changes got sent before I finished and now time is up to correct my slightly misunderstandable addition. What I wanted to say is, the Transparent BSDF creates RGB coded colored transparency, where each channel can have a different percentage of transparency. But the alpha channel is a greyscale value of opacity percentage. Alpha can only say, how opaque a material is in all colors whereas the Transparent BSDF can tint the transparency. $\endgroup$ Commented Sep 6, 2023 at 7:49
-
1$\begingroup$ Just to draw this to a conclusion since this thread is already too long: Yes, the color's alpha does not do anything for the render. Not even for mixing, see the following examples, I've used a separate RGB node here: a reddish color, alpha is 0.5 (note that the output is called Color) but the object is opaque: red cube. A black/white factor mix between blue with alpha 1.0 and orange at alpha 0.5 shows the full orange: blue/orange cube. Even in the Compositor, the alpha channel is not used for the Mix node. $\endgroup$ Commented Sep 6, 2023 at 10:39
-
1$\begingroup$ (run out of space) Only when you are using the Alpha Over node in the Compositor, the alpha channel of an RGB node is taken into account (note that the output in this case is called RGBA): blue color with apha 0.5 over rendered image. In the Compositor the Separate Color node also has 4 outputs, Red, Green, Blue and Alpha while in the Shader Editor there are only 3 for the color channels, the alpha is missing. $\endgroup$ Commented Sep 6, 2023 at 10:41