Distant Statics Placeholder

Feedback on past, current, and future development.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Distant Statics Placeholder

Post by akortunov »

drakovyrn wrote: 02 Nov 2018, 05:31 I tried last night, but there didn't seem to be much a difference on mine... performance-wise nor visually speaking. In fact, nightly seems to run a few frames per second slower when idling on the same saves.
Which build did you try to use? The one with RecastNavigation already?
Dyskos
Posts: 64
Joined: 17 Feb 2017, 03:51

Re: Distant Statics Placeholder

Post by Dyskos »

Ah, well I just used Ace's nightly from about 3 days ago, but physics isn't my bottleneck. Graphics/Rendering is, as my Dell Optiplex 7010 tower only has integrated graphics. However, I plan to solve this later by gutting the tower and installing a better GPU and PSU.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Distant Statics Placeholder

Post by akortunov »

I tried to implement the "placeholder" approach, and results are quite decent - my GTX 1050 hand handle 5 cells viewing distance with 40-70 FPS in exteriors. Loading speed is much faster than with large ECLD too.

Some additional test results:
1. There are deadlocks in the navmesh system (in master too, but less frequent).
2. Mesh simplifying (via OSG::Simplifier or NiLODNodes) does not change FPS for me (excepts of skinned nodes).
It seems OpenSceneGraph can handle meshes with a lot of triangles a quite good, but get FPS drop when there is a lot of shapes in scene (in both culling and rendering phase). So maybe we do not need to generate anything in the OpenMW itself.
3. Probably we need to somehow limit shadows and reflections distance to do not handle most of distant stuff.
Or a more simple and dumb solution - do not reflect distant stuff at all, but in this case reflections will appear and disappear instantly.
4. We need to implement a some kind of batching to improve performance.
5. There is an additional memory consumption - about 1.2 GB of memory with 5 cells viewing distance.
6. Atlased meshes can increase performance too, but do not expect miracles.

Image

The same scene in master:

Image

Tests were done with OSG 3.6.3 with recent patches to fix crashes. With "OSG on steroids" performance can be a bit higher.
User avatar
Amenophis
Posts: 320
Joined: 30 Oct 2011, 04:34
Location: Fortaleza - Ceará - Brasil

Re: Distant Statics Placeholder

Post by Amenophis »

Love you, akortunov!!
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Distant Statics Placeholder

Post by akortunov »

The same scene with custom small feature culling size (12.0) for distant objects:

Image
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Distant Statics Placeholder

Post by wareya »

Speaking of the "small feature culling" option, why does it behave so strangely when you set it to a high value? Does it try to traverse down into individual parts of objects? It also doesn't seem to try to cull particles, though that makes sense I guess. Cull pixel size of 200 at 1080p: https://imgur.com/a/ilgPcoT

Culling tiny parts of large objects is probably counterproductive. Rendering a few triangles that are already part of a mesh is cheaper than splitting the mesh up into parts and rendering them as individual objects. Of course, I have no idea what OSG does under the hood, and splitting up animated models into individual parts might be necessary. At the very least, size-testing the individual parts of a chair is probably not worth the CPU cost.

I personally see slightly higher framerates when I have "small feature culling" disabled entirely (except for reflections), unless I set it to ridiculously high values.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Distant Statics Placeholder

Post by akortunov »

wareya wrote: 08 Jan 2019, 04:23 Speaking of the "small feature culling" option, why does it behave so strangely when you set it to a high value? Does it try to traverse down into individual parts of objects? It also doesn't seem to try to cull particles, though that makes sense I guess.
I described several times how the "small feature culling" works - it works with individual scene graph nodes.
Most of meshes usually contain several shapes, so OSG culls them individually. It is especially noticable with NPC's, which have one or even many shapes for every bodypart.
Maybe it is possible to implement custom cull callback for objects to cull only whole object subgraphs, but I have no Idea how to do it.
User avatar
AnyOldName3
Posts: 2667
Joined: 26 Nov 2015, 03:25

Re: Distant Statics Placeholder

Post by AnyOldName3 »

We've already got a custom cull callback on everything to do light selection, so I'm not 100% sure if that would also need tweaking to make a second cull callback work. I think the way a cull callback would achieve what you're suggesting is to disable small feature culling for the cull visitor, then traverse the children, then turn it back on.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Distant Statics Placeholder

Post by akortunov »

AnyOldName3 wrote: 01 Mar 2019, 12:07 I think the way a cull callback would achieve what you're suggesting is to disable small feature culling for the cull visitor, then traverse the children, then turn it back on.
IIRC, I had issues when I tried to disable a small feature culling for subgraph. The only thing I managed to do is to change the culling pixel size via custom cull callback.
User avatar
kust
Posts: 11
Joined: 10 Jan 2019, 14:06

Re: Distant Statics Placeholder

Post by kust »

The true impostors LOD technique is very interesting and seems perfect for an open world engine like OpenMW.
https://developer.nvidia.com/gpugems/GP ... _ch21.html
Post Reply