Postprocessing

Feedback on past, current, and future development.
Post Reply
BaronPampa
Posts: 19
Joined: 04 Aug 2017, 12:50

Postprocessing

Post by BaronPampa » 21 Jul 2019, 09:46

Hi,

I guess it's more of a set of questions than request, as it's an obvious feature.

OpenMW has come a long way graphically. With the water shader, distant land and new shadows it really looks cool, and it's very nice to see all this progress. One piece I feel is missing is the postprocessing - fog based depth of field does wonders for the vanilla engine hacked with MGEXE. Is there anyone working on this? Or anyone planning to start? How difficult is it to code? As far as I recall AnyOldName3 required over a year to implement the current shadows - is postprocessing system similar in terms of work required, or even worse? I suppose I could try to do it in 2020, but I know almost nothing about graphics, so I'd like to have a ballpark estimate about how tough it is.

Thanks,
BaronPampa

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

Re: Postprocessing

Post by lysol » 21 Jul 2019, 14:20

Unless anyone is working on it in secret, then no one is working on it at the moment. We all would like to see it of course, but unless someone steps up and does it, we will just have to be patient. AnyOldName3 is our lead graphics developer these days, and he is researching other things he would like to do right now. There are a few others that are slowly working on graphics things, but no one is working on this feature.

And while I totally love everything that has to do with graphics, I also have to say that the focus right now in reality should be put into fixing the last pieces to get 1.0 out.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

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

Re: Postprocessing

Post by AnyOldName3 » 22 Jul 2019, 00:35

If we wanted to just add a single postprocessing effect to OpenMW, the basic process would be to:
  • Switch main rendering from the default framebuffer to a FBO.
  • Add an extra rendering pass to render a fullscreen quad to the default framebuffer.
  • Set up a shader to colour in that quad that can see the main scene's FBO as a texture.
This isn't all that complicated, and I could probably get something working with a day's work if I tried.

However, we don't just want one postprocessing effect.

Instead, we need to design a system that lets us build up several effects to make a final image, and that allows modders to create new post-process shaders without having to meddle with the engine. Different shaders need different inputs - some might require just the scene colour, some might require the depth buffer, too, and some might require something more complicated, such as
  • The rendered scene in specifically either linear-space or post-gamma space. Morrowind doesn't have a gamma-correct renderer, so this gets messy quickly.
  • Lower-resolution versions of something. Some ambient-occlusion techniques are tremendously slow, but still look good when run on a quarter-resolution depth buffer, so many games use those techniques like that.
  • Views of the scene from other angles. If something like panini projection (which desire for should be enough to have someone sectioned, but we aim to provide flexibility) is implemented as a post-processing shader, it needs side views of the scene, too.
Postprocessing is easy. Postprocess compositing is harder, and we want something that means we don't have to include every post-process effect anyone in the world might want into the engine.
AnyOldName3, Master of Shadows

BaronPampa
Posts: 19
Joined: 04 Aug 2017, 12:50

Re: Postprocessing

Post by BaronPampa » 24 Jul 2019, 11:24

Thank you. Do you think that trying to hardcode some particular effects as a way of learning both the OpenMW codebase and compositing prequisites would be a viable way of educating myself, with the purpose of creating a compositing system in the future?

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

Re: Postprocessing

Post by AnyOldName3 » 24 Jul 2019, 14:21

It might be a good learning exercise in terms of figuring out how to use OpenGL and OpenSceneGraph, and finding your way around OpenMW's code, but probably won't be something we can merge.
AnyOldName3, Master of Shadows

BaronPampa
Posts: 19
Joined: 04 Aug 2017, 12:50

Re: Postprocessing

Post by BaronPampa » 24 Jul 2019, 14:57

Thank you, that's all I wanted to know. If I ever actually get to it, I will probably open a new topic. I don't assume you'd want to merge the half-baked approach:)

Post Reply