Make an object invisible but with shadows

_ [EN] ___________________________________________________________________________________

Hello!

I wonder if it is possible to make an object invisible but visually we can see the shadows.
I can not do it with shaders and not with the blueprint.

Thank you for your response.

(Sorry I use translate.google.com)

_ [FR] ___________________________________________________________________________________

Bonjour !

Je voudrais savoir s’il est possible de rendre un objet visuellement invisible mais qu’on puisse y voir les ombres.
Je n’y arrive pas avec les Shaders et non plus avec le blueprint.

Merci de vos réactions.

if it is a static object in the world (not a blueprint)

  1. select the object
  2. go to it’s details panel
  3. go to the rendering section
  4. set the Actor Hidden In Game flag to true
  5. go to the Lighting section
  6. set the Cast Hidden Shadow flag to true

if it’s in a Blueprint, select the component and do the above in its details panel. Hope this helps!

10 Likes

I had completely forgotten this question. x) thank you very much.

What if you only want to hide a mesh but have it still cast a shadow?

Haven’t tested this but maybe you could use static lightning to create the shadow, build the lightning and then on begin play or whatever set the mesh hidden through code or blueprint. The shadow should not disappear. Of course, this would not work with a moving shadow.

But again, I’m not sure if it would work.

thanks , alot

This does not appear to work for Alembic Geometry Caches. Any ideas on how to make it work on these?

The solution would be to use shadow pass switch in material - Shadow Pass Switch | 5-Minute Materials [UE4] - YouTube

1 Like

I can’t make either solution work with raytracing in UE 5.0.2 (hidden shadows or shadow pass switch)
If I desactivate “cast ray traced shadows” from my light details both solution are working fine

I found this bug ticket UE-90632 Unreal Engine Issues and Bug Tracker (UE-90632) it does not seem fixed to me, I can reproduce it in a blank scene by switching cast ray traced shadows on and off on the main direct light

2 Likes

Thank you for posting this!