Page 1 of 2

Exterior locations aren't cleared when traveling [RESOLVED]

Posted: Sat May 19, 2018 4:09 am
by Uncanny_Valley
Sometimes when traveling, you will find locations (cities and such) floating in the sky.

How to reproduce:
Travel to Gothway Garden. Then travel to Whitecroft. You will now find the location "Burning Soul of Kynareth" floating in the sky above the coast, soutwest of Whitecroft.
or
Save your game in Whitecroft, and then load that save when you are in Gothway Garden.

The bug occurs both in the latest build (see below) and the editor:

Tested on:
Build: Windows Spells/Diseases #111 12-May-18 (64 - bit)
Github Source: 2018-05-17

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 5:12 am
by Interkarma
I just tried both of these methods and I'm unable to reproduce. As far as I'm aware, I resolved this problem a couple of years ago. If I can reproduce, I'm happy to take another crack at it. :)

Are you using any mods here or just default build? And have you increased your terrain distance in INI?

When I perform your repro steps, the only locations in the scene at Whitecroft are Whitecroft itself and the nearby Old Elzolda's Hovel, the only other location in range. Everything is placed nice and neat where it should be.
locations.JPG
locations.JPG (22.8 KiB) Viewed 2434 times

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 6:04 am
by Uncanny_Valley
I don't have any mods enabled, and I even downloaded a clean default build to test.

More information
  • The bug only appears if TerrainDistance is set to 4
  • It happens whenever you travel or load a locations that has fewer surrounding locations than the one you came from.
  • When it happens, there is always +1 extra unloaded locations
  • The added extra locations is properly removed once you move to another terrain piece (when the surrounding terrain updates)

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 6:15 am
by Interkarma
Cheers! Probably max terrain distance then. I'll take a look.

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 9:07 am
by Hazelnut
Woah UV, you have eagle eyes man!

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 11:35 am
by Nystul
this bug report is very valuable. Especially if we can reproduce this issue.
I am not 100% sure but I think this was the reason we disabled floating-world y-value (height) adaption since we could not nail the problem down back then. With floating-world y-adaption this issue was even more obvious because cities were often floating really high in the sky.

It would be awesome if we can track down this since y-adaption would remove all these floating-point-precision shadow issues in high-elevated locations when using distant terrain or any other mod that uses TerrainSamplers that produce high elevations

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 11:45 am
by Interkarma
This wasn't ever related to floating Y origin. It's just location data not being cleaned up after changing world tiles. I fixed this a couple of years ago, so this is probably an off-by-one error or something with max terrain distance.

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 5:34 pm
by Nystul
Interkarma wrote: Sat May 19, 2018 11:45 am This wasn't ever related to floating Y origin. It's just location data not being cleaned up after changing world tiles. I fixed this a couple of years ago, so this is probably an off-by-one error or something with max terrain distance.
ah ok, then I did not remember correctly. What was the reason that we deacitvated floation y origin in FloatingOrigin.cs script in lines 116-120?

Re: Exterior locations aren't cleared when traveling

Posted: Sat May 19, 2018 9:07 pm
by Interkarma
The main problem was correctly restoring player position on load. This sounds so simple, but the shifting Y throws in some unexpected wrinkles. I decided to tackle this again later, and just haven't gotten back to it yet.

I will eventually though. It's definitely getting done by 1.0.

Re: Exterior locations aren't cleared when traveling

Posted: Tue May 22, 2018 5:04 am
by Interkarma
I'll get to this one shortly.

Nystul, I've also reopened my work on floating y. You'll find this in a branch on git. I'm working through the various serialization/deserialization problems I encountered before and solving them one by one. Hopefully will have something ready for testing in a few more days.