# \[solved\] Shadows Volume and animated TCastleScene

**URL:** <https://forum.castle-engine.io/t/solved-shadows-volume-and-animated-tcastlescene/2063>\
**Category:** Bugs\
**Created:** [December 11, 2025, 5:12pm UTC](https://forum.castle-engine.io/t/solved-shadows-volume-and-animated-tcastlescene/2063 "2025-12-11T17:12:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)\
**Post date:** [December 11, 2025, 5:12pm UTC](https://forum.castle-engine.io/t/solved-shadows-volume-and-animated-tcastlescene/2063/1 "2025-12-11T17:12:03Z")

</div>

Basically, the problem is that Shadow Volume are often displayed incorrectly or not at all for animated TCastleScenes.

 ![image](https://forum.castle-engine.io/uploads/default/original/2X/9/9ddd79e2d2d8a614338939a9d0a665a0d1480c71.jpeg)

There is my test:

[Test\_ShadowVolume\_AnimatedScene.zip](https://forum.castle-engine.io/uploads/short-url/n6gxqlb1rDuuW1o9sP3Pudgpxvl.zip) (515.3 KB)

P.S.: This is a fairly old issue, and since I only use Shadow Map instead of Shadow Volume in my project, I only decided to write about it now.

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [December 18, 2025, 12:54am UTC](https://forum.castle-engine.io/t/solved-shadows-volume-and-animated-tcastlescene/2063/2 "2025-12-18T00:54:59Z")

</div>

This is an issue of the model you use, `chara_body.gltf`. For [shadow volumes](https://castle-engine.io/shadow_volumes), the model must be 2-manifold, which means that every edge must have exactly 2 neighboring faces, not more not less. See the linked manual page for full explanation 🙂

Checking the model in Castle Model Viewer shows that `chara_body.gltf` doesn’t satisfy it:

1. Menu item “Help → 2 manifold information” shows we have 4 “border edges” (we should have 0).

2. Switching “View → Fill Mode → Silhouette and Border Edges” shows where these “border edges” are (marked in blue).

It seems you have additional / not properly closed geometry when legs go from torso. Note that it also causes some weird shading there:

 ![image](https://forum.castle-engine.io/uploads/default/original/2X/1/1188342a3f6a095ea5f62e23eb7f355124543121.png)

Fixing this will make the model cast shadows with shadow volumes OK.

As a workaround, you could also set `RenderOptions.WholeSceneManifold` checkbox, but this is a hack when the model is not really 2-manifold: you’re forcing shadows to appear, but when model is not 2-manifold, some views may show bad rendering.

 ![image](https://forum.castle-engine.io/uploads/default/original/2X/a/a7c9505d4b4e11cf336473cfa89820f9b66f863d.png)

---

<div class="post-metadata">

**Author:** ![Recongalina](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/recongalina/32/1530_2.png) [@Recongalina](https://forum.castle-engine.io/u/Recongalina)\
**Post date:** [December 18, 2025, 4:01pm UTC](https://forum.castle-engine.io/t/solved-shadows-volume-and-animated-tcastlescene/2063/3 "2025-12-18T16:01:46Z")

</div>

Wow! I didn’t know this was a problem with Shadow Volumes. I’ll be more careful when modeling in the future.  
Thank you for your detailed and clear explanations! 🥰
