Object LOD for OpenMW

Feedback on past, current, and future development.
indiedeveloper
Posts: 44
Joined: 31 Jan 2013, 12:18

Object LOD for OpenMW

Post by indiedeveloper » 27 Dec 2013, 10:02

Has object LOD been planned for OpenMW?

As a developer on Skywind, we are creating LOD for a lot of the buildings and rocks. If you can imagine that Morrowind objects are our LOD now :-P But actually we will have 2-3 levels for each one.

Probably worth planning for if you are going to have unlimited distance. Deciding on how many levels you could have as well, with variable parameters for distances so that people can tweak to meet their performance requirements.

User avatar
psi29a
Posts: 4915
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Object LOD for OpenMW

Post by psi29a » 27 Dec 2013, 10:19

indiedeveloper wrote:As a developer on Skywind,
I'm surprised you didn't speak up in the other thread about the 'animosity'. ;)

We also had another thread of LOD (and other enhancements) and it makes sense to utilize this with our large/long viewing distance in order to save on resources. No point in rendering hi-resolution when no one can really make it out anyway. My only concern is that the vanilla assets are not really made with this in mind. We'd need lo-res meshes and textures.

@scrawl: Is this right or am I totally off?

indiedeveloper
Posts: 44
Joined: 31 Jan 2013, 12:18

Re: Object LOD for OpenMW

Post by indiedeveloper » 27 Dec 2013, 12:18

I think we've managed to clear the air on the fact the both communities can meld together to advance Morrowind. Miscommunication (actually mild ignorance, don't tell anyone).
We'd need lo-res meshes and textures.
Even if you look at MGSO and the assets contained within that you'll find some incredibly hi-poly models. So (eventually) you'd look at the TES3 assets are the LOD. Trust me you wouldn't want to go any lower than they already are :-p

You'd want the CS to be able to assign the LOD models to a particular model.

wheybags
Posts: 207
Joined: 21 Dec 2012, 19:41

Re: Object LOD for OpenMW

Post by wheybags » 27 Dec 2013, 13:35

BrotherBrick wrote:
indiedeveloper wrote:As a developer on Skywind,
I'm surprised you didn't speak up in the other thread about the 'animosity'. ;)

We also had another thread of LOD (and other enhancements) and it makes sense to utilize this with our large/long viewing distance in order to save on resources. No point in rendering hi-resolution when no one can really make it out anyway. My only concern is that the vanilla assets are not really made with this in mind. We'd need lo-res meshes and textures.

@scrawl: Is this right or am I totally off?
We could do what MGE does, and generate LOD models from the existing full scale ones.
EDIT: seems it's GPL, so we could actually just use their code, it actually makes new NIF/dds files iirc, not just making them on the fly, which I think is the best solution tbh.

indiedeveloper
Posts: 44
Joined: 31 Jan 2013, 12:18

Re: Object LOD for OpenMW

Post by indiedeveloper » 27 Dec 2013, 22:02

Well you don't have to reinvent the wheel and simply use MGE functionality of generating the distant and meshes and textures.

I checked out my install and there are files created under the "data\distantland" directory, that has this information.
You'd need to decipher how the files are constructed, but MGE is open sourced, so shouldn't be a problem.
Basically there is one file "static_meshes" and all the textures that were reduced to half the size of the original.

There are limitations with this method. Every time another mod which changes the world is added, they potentially have to regenerate LOD. Also there is only 1 level of LOD. If you look at the Skyrim engine it has up to 4 levels.
Also the ability to make specific LOD models that are far more optimized than an automated decimator. For Skyrim all the LOD are packed into one 2048 texture atlas. Where MGE method you still have over 800 512 textures that potential get loaded. This is a huge difference in optimization.

Tarius
Posts: 574
Joined: 24 Oct 2011, 19:29

Re: Object LOD for OpenMW

Post by Tarius » 27 Dec 2013, 22:06

MGE does a reasonable job already but as you point out, there is room for an improvement in efficiency.
MGE type method could be taken further with 4 levels and have the textures reduced each time and such. However, the code could take into account what models already have LOD and ignore those while generating statics.
I am a bigger fan of tons of control rather than taking the "user-friendly" approach.
-Okulo

cookiemonster16
Posts: 10
Joined: 05 Jan 2013, 03:16

Re: Object LOD for OpenMW

Post by cookiemonster16 » 27 Dec 2013, 22:45

I have a few questions that I hope someone with knowledge can answer.
I can't recall any other game that lets you change the view distance as drastically as Morrowind does and this makes me concerned of the optimization OpenMW. Almost all the games I can think of have a set distance you can see, no matter what your specs are. Over the years I have heard that CPU cores can be programmed to handle certain things such as the first core handling audio, which leads me to believe that most games assign one core to loading LOD as you move. I think its also possible to split the core, allowing it to work two different things. When OpenMW is finished I plan to play with Vanilla view distance, but others will play with all of Vvardenfell visible. The way I will be playing requires no LOD, but the other way does. My concern is that having two different systems could comprehend/effect performance of the other.

User avatar
Ace (SWE)
Posts: 849
Joined: 15 Aug 2011, 14:56

Re: Object LOD for OpenMW

Post by Ace (SWE) » 27 Dec 2013, 23:00

cookiemonster16 wrote:I have a few questions that I hope someone with knowledge can answer.
I can't recall any other game that lets you change the view distance as drastically as Morrowind does and this makes me concerned of the optimization OpenMW. Almost all the games I can think of have a set distance you can see, no matter what your specs are. Over the years I have heard that CPU cores can be programmed to handle certain things such as the first core handling audio, which leads me to believe that most games assign one core to loading LOD as you move. I think its also possible to split the core, allowing it to work two different things. When OpenMW is finished I plan to play with Vanilla view distance, but others will play with all of Vvardenfell visible. The way I will be playing requires no LOD, but the other way does. My concern is that having two different options could comprehend/effect performance of the other.
Right, let's extract some questions from this and answer to the best of my knowledge...

Q: View distance?
A: Yes, Morrowind did have pretty drastic view distance changes, though BF1942 I think had an even more drastic slider. All the slider decides is how far away from you the fog should start, anything after the fog end value is simply not drawn since it's not visible. This was a necessity in old computers since they simple couldn't handle all of the polygons, something todays computers have no problems whatsoever with.

Q: Something something LOD on one core? Split a core?
A: CPU cores can't really be "programmed", but you can run your program on several of them. Loading LOD doesn't sound like something you want to dedicate a full core for though, since that is a 99% disk-bound activity. And besides, OpenMW is mostly single-threaded right now, and that is enough to run the entire game so far.

(And what I think is your main question)
Q: Will different view distances (normal / distant land) require different optimizations? / Can they effect eachothers performance?
A: Yes and no I guess. If we implement LODs then they will probably be applied in both cases, though on a much higher LOD level when dealing with distant land meshes. The main difference between them is that when you don't have distant land enabled then you have a thick fog that hides anything beyond your view distance, this speeds up rendering since you don't have to draw everything in the scene. With distant land such a fog is not just useless, it's even in the way since you want to be able to see the distance, which means more things are visible in general. But if we have a proper LOD system, then such a scene shouldn't contain that many more polygons and the fog wouldn't really matter. In the end, the optimization wouldn't really be hurt either way, the view distance slider would simply change from a 'fog distance' slider to a 'LOD distance' slider.

Tarius
Posts: 574
Joined: 24 Oct 2011, 19:29

Re: Object LOD for OpenMW

Post by Tarius » 28 Dec 2013, 01:14

And besides, OpenMW is mostly single-threaded right now, and that is enough to run the entire game so far.
Well...not really...
Yes it can run, but its not anywhere near like really good frame rates.
I think multi-threading will prove to be very useful. We arnt quite to the optimization stage yet though so things are going ok.
I am a bigger fan of tons of control rather than taking the "user-friendly" approach.
-Okulo

indiedeveloper
Posts: 44
Joined: 31 Jan 2013, 12:18

Re: Object LOD for OpenMW

Post by indiedeveloper » 28 Dec 2013, 01:53

This is kind of off topic, but what sort of functionality could there be for modders to change models at runtime?

So the ability to swap models on the fly. This could be borrowed from the same code that changes models for LOD.

The other type of applications this type of thing could be used for is; changing scenery depending on the weather or introducing seasonal changes. It just so happens doing this type of thing for Skyrim, and there is a NetImmersion Class which allows shader manipulation. Maybe you have a framework built for lower level graphics manipulation for modders (not coders)? But the ability to actual change A.nif to B.nif would be perfect if already introducing it for LOD.

Post Reply