Hello guys,
Is it possible to cast shadows with an invisible object, with ray traced lighting?
I’ve searched a lot with google, but i can’t find anything about that.
Hello guys,
Is it possible to cast shadows with an invisible object, with ray traced lighting?
I’ve searched a lot with google, but i can’t find anything about that.
There are options without ray trace.
I would assume you can either leverage those, or that a similar flag exists for ray tracing…
If there is no flag, or if it just doesn’t work…
I would use 2 directional lights and leverage the light channels in order to get the non raytraced shadow of the hidden object to display at a minimal cost (that of rendering only items set to the non ray traced light channel).
The simplest way to render an object only in shadows is to set “Render in Main Pass” to false in the component settings under rendering.
If this doesn’t work for ray tracing, you could use the Ray Tracing Quality Switch Replace Node. This should let you switch the material based on if it’s being rendered on the screen or in ray tracing.
In the material settings, set the blend mode to masked. For the normal pin, make opacity 0, and for the raytraced pin, make opacity 1. You shouldn’t need to use any other pin since this is only for shadows.
I figured out how to do this (finally).
Now the material is invisible, but still casts a shadow.
Hehe good idea. We always have a material called Invisible but never had a use case to make it cast shadows…
if I set the opacity to zero, the object also does not make a shadow anymore. At 50% Opacity, it makes a 50% shadow and is 50% visible… how can I have it cast shadow and be invisible?
Material set to translucent, Path Tracing, Unreal 5.4.4
You can use a shadow pass switch node before the opacity to set it to 0 for visibility and 1 for shadows.
I don’t think the shadow pass switch works for pathtracing/ raytracing. You would need to use the raytracing quality switch instead, which would affect more than just shadows. It would also affect reflections and GI.