# Why my foliage dosent cast shadows in Raytrace mode ?

**URL:** <https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [May 12, 2019, 9:12pm UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081 "2019-05-12T21:12:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graphico](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Graphico](https://forums.unrealengine.com/u/Graphico)\
**Post date:** [May 12, 2019, 9:12pm UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/1 "2019-05-12T21:12:45Z")

</div>

Hey guys ,

So currently am trying to add grass as foliage painting in ray trace mode but i cant get any shadows from any source of light , is this one of the limitation currently in DXR ?

Thanks

---

<div class="post-metadata">

**Author:** ![rosegoldslugs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rosegoldslugs](https://forums.unrealengine.com/u/rosegoldslugs)\
**Post date:** [May 13, 2019, 12:40am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/2 "2019-05-13T00:40:55Z")

</div>

I don’t know which one included support for alpha-tested shadows, but I believe it’s supported by either enabling materials or two-sided geo(or both…) through a CVAR.

r.raytracing.shadows.enablematerials  
r.raytracing.shadows.enabletwosidedgeometry

---

<div class="post-metadata">

**Author:** ![Graphico](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Graphico](https://forums.unrealengine.com/u/Graphico)\
**Post date:** [May 13, 2019, 3:30am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/3 "2019-05-13T03:30:57Z")

</div>

Tried it but it didnt work still now shadows

---

<div class="post-metadata">

**Author:** ![tonpix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tonpix](https://forums.unrealengine.com/u/tonpix)\
**Post date:** [May 13, 2019, 5:15am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/4 "2019-05-13T05:15:36Z")

</div>

I guess foliage isn’t supported by raytraced shading, per documentation? [Real-Time Ray Tracing | Unreal Engine Documentation](https://docs.unrealengine.com/en-us/Engine/Rendering/RayTracing)

---

<div class="post-metadata">

**Author:** ![Farshid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/farshid/32/874107_2.png) [@Farshid](https://forums.unrealengine.com/u/Farshid)\
**Post date:** [May 13, 2019, 5:15am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/5 "2019-05-13T05:15:47Z")

</div>

raytracing is in beta mode  
foliage will support in 4.23

---

<div class="post-metadata">

**Author:** ![Graphico](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Graphico](https://forums.unrealengine.com/u/Graphico)\
**Post date:** [May 13, 2019, 5:35am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/6 "2019-05-13T05:35:48Z")

</div>

so is this is official , 4.22 dosnt support foliage ray trace , or theres a way around to get shadows in ray trace mode by adding another type of light

---

<div class="post-metadata">

**Author:** ![Xharthok](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xharthok/32/247761_2.png) [@Xharthok](https://forums.unrealengine.com/u/Xharthok)\
**Post date:** [May 15, 2019, 8:52am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/7 "2019-05-15T08:52:12Z")

</div>

Raytracing doesn’t support foliage at the moment. But you can try to activate Contact Shadows for your lights. It works for raytraced shadows too. Not perfect, but at least gives you some shadows with foliage.

---

<div class="post-metadata">

**Author:** ![Graphico](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Graphico](https://forums.unrealengine.com/u/Graphico)\
**Post date:** [May 15, 2019, 10:53am UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/8 "2019-05-15T10:53:43Z")

</div>

Thanks i will try and hope this at least compensate the missing feature

---

<div class="post-metadata">

**Author:** ![sevenman0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sevenman0](https://forums.unrealengine.com/u/sevenman0)\
**Post date:** [September 18, 2020, 2:43pm UTC](https://forums.unrealengine.com/t/why-my-foliage-dosent-cast-shadows-in-raytrace-mode/126081/9 "2020-09-18T14:43:57Z")

</div>

Hi, is this supported today?

In here:

> **[Real-Time Ray Tracing](https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/RayTracing/)**
>
> An overview of Ray Tracing features in Unreal Engine.

They said: [TABLE]

```
		**TwoSided Foliage**
		Y

```
