Better grass support
-
- Posts: 1
- Joined: 02 Mar 2020, 11:48
Better grass support
Currently, openmw renders grass as individual objects, which is rather resource inefficient and is a significant strain on systems. Is there a way to render grass a different way e.g. static batching and/or adjusting the grass fade distance in order to reduce system load?
Re: Better grass support
This subject has been brought up numerous times already, but a short summary:
Yes, as you say, grass renders as individual objects and therefore creates a lot of draw calls. This is simply because there is no system implemented for this yet.
Making a batching system for Morrowind is not as easy as it looks at first glance since any object in Morrowind can be added, removed and moved by scripts at any time. There has been some work on a batching system, but that work has stalled.
Yes, as you say, grass renders as individual objects and therefore creates a lot of draw calls. This is simply because there is no system implemented for this yet.
Making a batching system for Morrowind is not as easy as it looks at first glance since any object in Morrowind can be added, removed and moved by scripts at any time. There has been some work on a batching system, but that work has stalled.
Re: Better grass support
Yes, batching for things like grass is almost certainly what's going to happen, but it depends on someone to actually build the system. That someone will probably be AnyOldName3, unless a new developer turns up sometime this decade. An interim solution has been proposed, but the idea of a placeholder engine feature isn't likely to be accepted. Still, you never know - the real thing may not be as far away as it seems.
- FiftyTifty
- Posts: 63
- Joined: 15 Oct 2014, 21:02
Re: Better grass support
Why would grass be batched? Far more efficient to just use instancing, no?
Hell, a way to mark objects as instanced would be great. Just make it a flag for the records, so level designers and item hoarders can go nuts.
Hell, a way to mark objects as instanced would be great. Just make it a flag for the records, so level designers and item hoarders can go nuts.
- AnyOldName3
- Posts: 2678
- Joined: 26 Nov 2015, 03:25
Re: Better grass support
No, instancing isn't a magic bullet. If it can be batched, batching is much faster.
- FiftyTifty
- Posts: 63
- Joined: 15 Oct 2014, 21:02
Re: Better grass support
Generic dynamic batching is obscenely slower, and generic static batching being very limited in use. If a robust batching method is implemented, then I'd agree, but isn't instancing grass an industry standard since it's designed exactly for this use case? WoW did that way back in it's early days, and all post-Morrowind Elder Scrolls and Fallout games use instancing for the grass as well.AnyOldName3 wrote: ↑03 Mar 2020, 22:58 No, instancing isn't a magic bullet. If it can be batched, batching is much faster.
- AnyOldName3
- Posts: 2678
- Joined: 26 Nov 2015, 03:25
Re: Better grass support
We're not going to waste time on half-measures. That just means time that could have gone towards a robust batching method goes to something worse instead.
- FiftyTifty
- Posts: 63
- Joined: 15 Oct 2014, 21:02
Re: Better grass support
That is true. I figured instancing would be a quick implementation, since it's little more than a shader. I am very intrigued now, is a robust batching implementation on the roadmap? Really want to see how far OpenMW can be pushed when draw calls are nowhere near as much of an issue.AnyOldName3 wrote: ↑04 Mar 2020, 21:51 We're not going to waste time on half-measures. That just means time that could have gone towards a robust batching method goes to something worse instead.
Re: Better grass support
Well, the current state is the "it would be nice if someone could implement it, but we have no idea how exactly it should work, and have no people to work on this feature".
Since this feature is not an 1.0 blocker, it is actually shelved for future generations of OpenMW developers.
Re: Better grass support
Just out of interest, from someone who doesn't have a great deal of experience with rendering:
Is this 'robust batching' a feature that is already present in OSG, that 'just' needs to be taken advantage of in OpenMW, or is it something that OpenMW would have to create from scratch? Also, I'm kind of curious as to what these concepts of 'instancing' and 'batching' mean - is there a good reference anywhere?
I'm a big fan of groundcover and curious as to what would be involved to implement it in OpenMW.
Is this 'robust batching' a feature that is already present in OSG, that 'just' needs to be taken advantage of in OpenMW, or is it something that OpenMW would have to create from scratch? Also, I'm kind of curious as to what these concepts of 'instancing' and 'batching' mean - is there a good reference anywhere?
I'm a big fan of groundcover and curious as to what would be involved to implement it in OpenMW.