Introducing Proper Fading

Everything about development and the OpenMW source code.
User avatar
wazabear
Posts: 51
Joined: 13 May 2020, 19:31
Gitlab profile: https://gitlab.com/glassmancody.info

Introducing Proper Fading

Post by wazabear »

If OpenMW can handle object fading like other popular games, I think this would be a huge selling point. It's not purely a visual thing, fading can give massive performance boosts for people who need it. We have object fading for various things like shadows and grass (and even my light MR), but a unified system is surely in order. I saw mention in the source for actor fading which proposed to "implement a dithering shader rather than just change object transparency." Dithering is a pretty controversial effect, and in my opinion has no place in OpenMW. An alpha blended fade is not really controversial at all and much simpler.

I propose something like this from within the in-game settings window, I don't believe it to be something that is overly complex to implement.
save.png
So, are there plans for this, and if so what does the roadmap look like?
Fade away and radiate
User avatar
AnyOldName3
Posts: 2158
Joined: 26 Nov 2015, 03:25

Re: Introducing Proper Fading

Post by AnyOldName3 »

Alpha blending mandates CPU-side depth sorting, which makes things slow. Dithering doesn't, so can be significantly less slow. In terms of having things pop out, it's much less noticeable to fade them out and middling to dither them, but ideally we'd not have too much disappear in the first place. I don't see much benefit to having more things disappear and have a menu for related settings making it obvious to people who might not otherwise have noticed that things disappear.

As for what we've got implemented now, shadows are a lighting effect, so are pretty easy to fade out, and get really slow when they go a long way, so need to disappear at some distance. Similarly, grass gets slow when there's lots of it and already has alpha testing or A2C on, so it's not too hard just to make the grass thinner as it gets further away, so you don't notice clumps of it pop out.
AnyOldName3, Master of Shadows
CMAugust
Posts: 278
Joined: 10 Jan 2016, 00:13

Re: Introducing Proper Fading

Post by CMAugust »

I'd love to have fading. Nearly every game does it, and it's easy to see why; everything feels much better to the player when transitions are smoothed out and don't "pop". It's one of the subtle things that contribute to feelings of polish and quality. Even if my PC was capable of running OpenMW at a high view distance and all objects rendered (which it isn't even close to doing with a double-digit frame rate), still I would problably want some sort of distance fade for objects to reduce visual clutter. Eventually, things like LOD transitions could fade too, like they do in Skyrim. It's definitely a feature I look forward to.

Addendum: here is an example of the beautiful fading used in Oblivion.
https://streamable.com/eq8e0s

MGEXE also made very effective use of fading, which in addition to looking pleasant strikes me as a great way to reduce cost of the active grid.
https://streamable.com/w79mnd
User avatar
wazabear
Posts: 51
Joined: 13 May 2020, 19:31
Gitlab profile: https://gitlab.com/glassmancody.info

Re: Introducing Proper Fading

Post by wazabear »

AnyOldName3 wrote: 28 Mar 2021, 23:00 I don't see much benefit to having more things disappear and have a menu for related settings making it obvious to people who might not otherwise have noticed that things disappear.
This fading based on groupings (items, objects, grass, etc...) is available in all later titles, and plays a significant role in adjusting your graphics setting for your hardware. The granularity allows for a much wider level of customization that doesn't involve messing with weird numbers in the openmw.cfg. Another real use case is that it also allows for people not able to play at max settings to use expensive setting such as shadows or water shader by setting fade very low. If there is no want for such granularity then I guess a global fade for distant objects/active grid will be better then nothing, but that remains a purely visual enhancement while this suggestion goes beyond just visuals.
AnyOldName3 wrote: 28 Mar 2021, 23:00 Alpha blending mandates CPU-side depth sorting, which makes things slow. Dithering doesn't, so can be significantly less slow.
As for dithering being cheaper, I think the elephant in the room is that it's hideous :D
Works in some stylized games, and I think it looks fine if you apply a post-processing blur on top of it. Of course the latter isn't an option.
Fade away and radiate
CMAugust
Posts: 278
Joined: 10 Jan 2016, 00:13

Re: Introducing Proper Fading

Post by CMAugust »

For what it's worth, oblivion has alpha blend fading out the wazoo (see above), and that ran better than OpenMW on my Intel HD 3000 integrated graphics. It also was designed with the Xbox 360 in mind. I think the alpha blending concern is perhaps overstated compared to the benefits. :)
User avatar
lysol
Posts: 1490
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Introducing Proper Fading

Post by lysol »

To me, a menu like this sounds brilliant and makes a lot of sense for an open world game.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page
User avatar
psi29a
Posts: 5100
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Introducing Proper Fading

Post by psi29a »

Would this be part of the object-paging system?

How does this system work, I mean how would it know what to fade and what not to fade?
User avatar
akortunov
Posts: 816
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Introducing Proper Fading

Post by akortunov »

psi29a wrote: 30 Mar 2021, 07:14 Would this be part of the object-paging system?
Object paging's job is to generate data pages. That's all. Semi-transparent and togglable objects make this job harder and cause a lot of additional calculations (to rebuild these data pages once some objects are faded in or out). Probably we will need to drop active grid paging to implement objects fading.
CMAugust
Posts: 278
Joined: 10 Jan 2016, 00:13

Re: Introducing Proper Fading

Post by CMAugust »

Object paging already "disrupts" small feature culling and NiLODNode - pages are not rebuilt, the culling/lod is simply chunkified, leading to some objects in the chunk changing sooner or later than expected. Implementing object fading while leaving paging as-is will probably have a similar effect - objects will fade in chunks rather than individually.
User avatar
akortunov
Posts: 816
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Introducing Proper Fading

Post by akortunov »

CMAugust wrote: 30 Mar 2021, 09:08 objects will fade in chunks rather than individually.
When you use paging for everything, you just do not have "individual" objects. You have chunks which consist of a set of pages, so you can not use small feature culling for them or use fade-out based on objects transparency change.
Post Reply