Page 1 of 2

[Solved] Disappearing statics?

Posted: 08 May 2018, 10:41
by TheOneWhoWatches
Hi all!

Recently I tried to create a test "playground" for myself.
I made a huge static object (top part of what should be a giant flying island).
Placed it at the height of 50000 in openmw-cs
Added a forest there at approximately (12500,115000,50500)
But while running there at approx. (12500,85000,50500) the island just disappear...

The forest stays there and I can fly to it with "setflying 1" but "ground" static disappears

Did I do something wrong?

Re: Disappearing statics?

Posted: 14 May 2018, 08:06
by TheOneWhoWatches
Ok, so maximum distance depends on "exterior cell load distance".

It kinda makes sense, but a nuisance in my case.

Excuse me, case solved.

Re: [Solved] Disappearing statics?

Posted: 14 May 2018, 18:37
by lysol
A little explanation: Increasing exterior cell load distance is not the "good" way to solve this, but the only way at the moment. We have distant terrain working right now, but not distant statics. So if you have a far view distance with distant terrain enabled, then you will have only terrain and no statics loaded in the distance. Distant statics is planned for the future, so this will be solved. Until then, increasing exterior cell load distance is the way to go, with heavily decreased performance and the possibility of bugs occurring as a consequence, since you not only load the statics, but also all of the scripts.

Re: [Solved] Disappearing statics?

Posted: 15 May 2018, 04:27
by TheOneWhoWatches
Yes, thanks for explanation.
I'm not sure distant statics would be a "proper" or "reliable" solution for cases like this one (huge statics that exist in multiple cells), but I cannot know the details so that's just a theory. After all it's a critical object. The very ground you walk upon, not just an eyecandy. =)

I was thinking about suggesting some sort of a check if certain object exist in the cell for big objects (ones bigger than cell size). Not sure about overhead though...
Another approach would be to split big objects to a smaller ones, but it's hard to decide on how to split it and align them to a cell size and it's easier to edit mesh as a whole without the hassle of connecting the borders (when it's not in a final variant).

Re: [Solved] Disappearing statics?

Posted: 15 May 2018, 07:07
by Chris
Likely what would happen is individual objects would be considered for LOD based on their distance, not whether they're in an "unloaded" cell or not. So a big object that crosses cell boundaries wouldn't be a problem; if it's marked to be LOD-able, it would remain at full LOD as long as it's close enough, regardless of what cell the object is rooted in, until it gets far enough away and goes to a lower LOD.

The LOD would only apply visually. The actual physics/collision object would be handled separately from the visual mesh. This is how the terrain works, I believe. The physics/collision mesh is the same regardless if distant terrain is enabled or not, but visually the individual segments change LOD based on distance.

Re: [Solved] Disappearing statics?

Posted: 15 May 2018, 07:27
by TheOneWhoWatches
Thanks for the explanations!

So, collision meshes exist only in highest LOD? And it won't change if an npc tries to walk upon/interact with statics in the distance?.
(I didn't see LOD for Morrowind meshes yet).

Re: [Solved] Disappearing statics?

Posted: 16 May 2018, 00:28
by Chris
The collision mesh is usually a lower LOD already, because with visually high-detail meshes it's unnecessary to test collisions against every visually distinct surface (fewer large surfaces will work just fine versus many smaller surfaces with minute variations). If done properly, you won't notice any difference between where actors move and what you see of the mesh. Applying real-time LOD to the collision mesh would create too many issues with physics as objects move between different levels of detail.

Re: [Solved] Disappearing statics?

Posted: 16 May 2018, 03:24
by TheOneWhoWatches
Sorry, I wasn't clear.
Right now, we can have separate meshes for visuals and for collision in one NIF file, but I didn't see meshes which were also using lower detail versions, so I was asking whether lower LOD versions of NIF meshes will have their own collision meshes used.

Re: [Solved] Disappearing statics?

Posted: 16 May 2018, 09:56
by Chris
TheOneWhoWatches wrote: 16 May 2018, 03:24 I was asking whether lower LOD versions of NIF meshes will have their own collision meshes used.
No, because applying LOD to collision is just asking for trouble. If LOD meshes contain a collision mesh, it would be ignored. Either the full collision mesh would be used because things can collide with it, or there is no collision because it's out of the play area.

Re: [Solved] Disappearing statics?

Posted: 16 May 2018, 10:01
by psi29a
Chris wrote: 16 May 2018, 09:56
TheOneWhoWatches wrote: 16 May 2018, 03:24 I was asking whether lower LOD versions of NIF meshes will have their own collision meshes used.
No, because applying LOD to collision is just asking for trouble. If LOD meshes contain a collision mesh, it would be ignored. Either the full collision mesh would be used because things can collide with it, or there is no collision because it's out of the play area.
So in theory, we could have actors/npcs/monsters running through trees, houses, castles, etc.. that could be noticeable, but not game breaking. I was worried about if gravity is applied, is it the collision mesh that keeps it from falling through the terrain? (Yes,I know.. they aren't statics.)