# No shadows in big worlds with world origin rebasing

**URL:** <https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520>\
**Category:** Rendering\
**Tags:** Shadows, visibility, unreal-engine, bug-report, question\
**Created:** [August 8, 2016, 5:40pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520 "2016-08-08T17:40:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![user37337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user37337](https://forums.unrealengine.com/u/user37337)\
**Post date:** [August 8, 2016, 5:40pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/1 "2016-08-08T17:40:03Z")

</div>

Since the update from 4.11.2 to 4.12.5 the shadows in our game are only shown near the origin of the world. When moving away some kilometers the shadows of smaller objects disappear and when moving further all shadows disappear. I’ve debugged a little bit and I see that the problem occurs in `FSceneRenderer::GatherShadowPrimitives`. It seems that the bounds in `Scene->PrimitiveOctree` aren’t rebased but the `ProjectedShadowInfo`.

I could reproduce the issue in a Test Project. You can find it in the attachment. We want to release our game in 3 weeks. So it is very important for us to fix the issue very fast. I hope you can help finding the issue.link text

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [August 8, 2016, 7:09pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/2 "2016-08-08T19:09:38Z")

</div>

Hi user,

Maybe I’m missing something, but I’m not seeing the issue in the test project you’ve provided.

When I hit PIE and then start to move towards the back of the cube field I still see shadow casting as I would expect. I see the cubes become shadowed on their edges as the max distance starts to shadow them.

Are you sure that your project is set to EPIC for the Engine Scalability settings? Have you tested this particular project on multiple machines?

If I’m missing please explain in detail what I should see or post screenshots/video to demonstrate.

Thank you!

Tim

---

<div class="post-metadata">

**Author:** ![user37337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user37337](https://forums.unrealengine.com/u/user37337)\
**Post date:** [August 8, 2016, 7:22pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/3 "2016-08-08T19:22:27Z")

</div>

Oh sorry. I’ve forgot to write you the controls. Press key 2 to go to the position with the issue. With key 1 you jump back to the origin.

---

<div class="post-metadata">

**Author:** ![user37337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user37337](https://forums.unrealengine.com/u/user37337)\
**Post date:** [August 9, 2016, 1:48pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/4 "2016-08-09T13:48:07Z")

</div>

Hi Tim,

maybe you have a dirty workaround for us. We urgently need the shadows at saturday because then we have a lot of press here in our studio.

Thank you

Mathias

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [August 9, 2016, 3:12pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/5 "2016-08-09T15:12:50Z")

</div>

Thanks for the clarification on using your setup. I’ve entered a ticket that you can check the status on here: [Unreal Engine Issues and Bug Tracker (UE-34417)](https://issues.unrealengine.com/issue/UE-34417)

Unfortunately, I don’t have any workarounds. I tried using a directional light for the individual streaming levels but still a no-go. I did notice that Point and Spot lights do still shadow cast though, so it’s only the directional light that is affected.

---

<div class="post-metadata">

**Author:** ![user37337](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user37337](https://forums.unrealengine.com/u/user37337)\
**Post date:** [August 9, 2016, 5:58pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/6 "2016-08-09T17:58:50Z")

</div>

Hi Tim,

I’ve found the problem:

In [\>this commit\<](https://github.com/EpicGames/UnrealEngine/commit/2b886e2c932905401ee7dd5d69386fb8a321b7fb) the line

`RootNodeContext.Bounds.Center += FVector4(InOffset, 0.0f);`

was added to

`TOctree::ApplyOffset(const FVector& InOffset)` in `GenericOctree.inl`.

This causes that the octree is near the origin but the bounds are at maximum of 1,000,000 (HALF\_WORLD\_MAX). So everything that is outside of this bounds cannot be correctly added to the octree.

I’ve removed this line and all is fine now.

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [August 9, 2016, 6:11pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/7 "2016-08-09T18:11:26Z")

</div>

Yeah, you’ve got one on me here since I’m not a coder! I’ll add the notes to the ticket and see if this can help to resolve it for future versions. I’m not sure if there is design reason or this is something that was an oversight that wasn’t caught.

I’m glad you’ve got everything sorted for your end, though! Good luck with your showing! 🙂

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [August 10, 2016, 6:53pm UTC](https://forums.unrealengine.com/t/no-shadows-in-big-worlds-with-world-origin-rebasing/366520/8 "2016-08-10T18:53:04Z")

</div>

We had a quick turnaround on this one thanks to your help. This will be fixed with 4.13 and if you’re using the preview releases at all you’ll be able to check it in 4.13 Preview 2 once that releases soon.

Thanks again!
