Better grass support

Feedback on past, current, and future development.
treesarentreal
Posts: 1
Joined: 02 Mar 2020, 11:48

Better grass support

Post by treesarentreal » 02 Mar 2020, 12:38

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?

User avatar
lysol
Posts: 1424
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Better grass support

Post by lysol » 02 Mar 2020, 13:14

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.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

CMAugust
Posts: 242
Joined: 10 Jan 2016, 00:13

Re: Better grass support

Post by CMAugust » 02 Mar 2020, 13:16

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.

User avatar
FiftyTifty
Posts: 56
Joined: 15 Oct 2014, 21:02

Re: Better grass support

Post by FiftyTifty » 03 Mar 2020, 06:12

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.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64

User avatar
AnyOldName3
Posts: 1855
Joined: 26 Nov 2015, 03:25

Re: Better grass support

Post by AnyOldName3 » 03 Mar 2020, 22:58

No, instancing isn't a magic bullet. If it can be batched, batching is much faster.
AnyOldName3, Master of Shadows

User avatar
FiftyTifty
Posts: 56
Joined: 15 Oct 2014, 21:02

Re: Better grass support

Post by FiftyTifty » 04 Mar 2020, 04:24

AnyOldName3 wrote:
03 Mar 2020, 22:58
No, instancing isn't a magic bullet. If it can be batched, batching is much faster.
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.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64

User avatar
AnyOldName3
Posts: 1855
Joined: 26 Nov 2015, 03:25

Re: Better grass support

Post by AnyOldName3 » 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.
AnyOldName3, Master of Shadows

User avatar
FiftyTifty
Posts: 56
Joined: 15 Oct 2014, 21:02

Re: Better grass support

Post by FiftyTifty » 05 Mar 2020, 04:42

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.
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.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64

User avatar
akortunov
Posts: 743
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Better grass support

Post by akortunov » 05 Mar 2020, 09:52

MajinCry wrote:
05 Mar 2020, 04:42
is a robust batching implementation on the roadmap?
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.

Time4Tea
Posts: 109
Joined: 01 Jan 2020, 00:27

Re: Better grass support

Post by Time4Tea » 05 Mar 2020, 15:06

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.

Post Reply