Page 2 of 3

Re: Distant Statics Placeholder

Posted: 02 Nov 2018, 06:34
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?

Re: Distant Statics Placeholder

Posted: 03 Nov 2018, 18:58
by drakovyrn
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.

Re: Distant Statics Placeholder

Posted: 06 Jan 2019, 10:58
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.

Re: Distant Statics Placeholder

Posted: 06 Jan 2019, 16:47
by Amenophis
Love you, akortunov!!

Re: Distant Statics Placeholder

Posted: 06 Jan 2019, 18:33
by akortunov
The same scene with custom small feature culling size (12.0) for distant objects:

Image

Re: Distant Statics Placeholder

Posted: 08 Jan 2019, 04:23
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.

Re: Distant Statics Placeholder

Posted: 01 Mar 2019, 07:46
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.

Re: Distant Statics Placeholder

Posted: 01 Mar 2019, 12:07
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.

Re: Distant Statics Placeholder

Posted: 01 Mar 2019, 16:15
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.

Re: Distant Statics Placeholder

Posted: 02 Mar 2019, 05:04
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