# Make an object invisible but with shadows

**URL:** <https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046>\
**Category:** Rendering\
**Tags:** Shadows, unreal-engine, Lighting, Shaders, Blueprint, question\
**Created:** [April 19, 2014, 9:56am UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046 "2014-04-19T09:56:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loux\_xavier](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loux_xavier/32/1201519_2.png) [@Loux\_xavier](https://forums.unrealengine.com/u/Loux_xavier)\
**Post date:** [April 19, 2014, 9:56am UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/1 "2014-04-19T09:56:24Z")

</div>

**\_ [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](http://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.

---

<div class="post-metadata">

**Author:** ![jamesman82](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jamesman82](https://forums.unrealengine.com/u/jamesman82)\
**Post date:** [June 26, 2014, 10:02pm UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/2 "2014-06-26T22:02:39Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Loux\_xavier](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/loux_xavier/32/1201519_2.png) [@Loux\_xavier](https://forums.unrealengine.com/u/Loux_xavier)\
**Post date:** [October 15, 2015, 2:00am UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/3 "2015-10-15T02:00:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_182b4323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_182b4323](https://forums.unrealengine.com/u/anonymous_user_182b4323)\
**Post date:** [February 4, 2016, 7:49pm UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/4 "2016-02-04T19:49:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cryptical](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cryptical](https://forums.unrealengine.com/u/Cryptical)\
**Post date:** [February 4, 2016, 9:13pm UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/5 "2016-02-04T21:13:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![christang](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@christang](https://forums.unrealengine.com/u/christang)\
**Post date:** [June 10, 2020, 4:22am UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/6 "2020-06-10T04:22:21Z")

</div>

thanks , alot

---

<div class="post-metadata">

**Author:** ![esfashion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@esfashion](https://forums.unrealengine.com/u/esfashion)\
**Post date:** [January 26, 2021, 7:06pm UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/7 "2021-01-26T19:06:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andrej730](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/andrej730/32/1194692_2.png) [@Andrej730](https://forums.unrealengine.com/u/Andrej730)\
**Post date:** [September 18, 2022, 7:13pm UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/8 "2022-09-18T19:13:12Z")

</div>

The solution would be to use shadow pass switch in material - [Shadow Pass Switch | 5-Minute Materials [UE4] - YouTube](https://www.youtube.com/watch?v=LqwTLdqEUMo)

---

<div class="post-metadata">

**Author:** ![marigrou](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/marigrou/32/587416_2.png) [@marigrou](https://forums.unrealengine.com/u/marigrou)\
**Post date:** [October 29, 2022, 12:52pm UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/9 "2022-10-29T12:52:03Z")

</div>

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)](https://issues.unrealengine.com/issue/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

---

<div class="post-metadata">

**Author:** ![SnkyFrsh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SnkyFrsh](https://forums.unrealengine.com/u/SnkyFrsh)\
**Post date:** [January 29, 2024, 2:08am UTC](https://forums.unrealengine.com/t/make-an-object-invisible-but-with-shadows/281046/10 "2024-01-29T02:08:38Z")

</div>

Thank you for posting this!
