background rendered, but why?

Started by Dune, July 13, 2019, 02:04:18 AM

Previous topic - Next topic

Dune

I have often asked myself why this is; a lot of background area being rendered, which sometimes takes quite some time, while it's beeing covered later by frontal areas. Can't it be done more efficiently; rendering from the front? May have been covered before, but I thought I'd put it up again.

WAS

Maybe I'm wrong, but I seem to notice that when you have lateral displacement, the renderer renders all the detail of obscured distant land. When there is no lateral displacement it seems to spend less time on what's going on behind it. And I think this really is what makes lateral displacement render so long in elaborate scenes because of distant land. If I make a SSS cliff, and go absolutely nuts on lateral, it renders pretty much as fast as any other terrain cause there is nothing but sky behind it, no more terrain at varying distances with the same lateral and shaders..

René

That's strange indeed. If I remember correctly, the renderer has already been changed in the past to render from front to back.

KyL

Dune, did you try turning on "defer all shading"?

Oshyan

The renderer does its best to render from "front to back", but due to various factors it can be hard to determine *before* render time what is in "front". Extreme displacement is a good example of this because displacement is calculated *at render time*. So the renderer does not know that X is in front of Y until the displacement of X is calculated, at which point it's basically too late if Y was already calculated (i.e. rendered).

There are Sorting Bias parameters on objects now and if what is in front is separate from what is in back (on a different object) you could try manually adjusting the sorting bias (i.e. telling the renderer "this is in front of that, render it first), but in most scenes everything is attached to a single planet so that's not an option.

You might also try rendering with Defer All and see if it works better for this case. Personally I almost always use it now, but you do need to be aware that you don't need to use as high a MPD nor high soft shadow samples due to the higher surface render quality of Defer All (i.e. surface quality with Defer All at 0.5 MPD is equivalent to regular render at maybe 0.75 or so, that's just a guesstimate, but it's not far off). Generally I get higher quality renders in similar or less time with Defer All.

- Oshyan

WAS

Quote from: Oshyan on July 13, 2019, 02:15:00 PM
You might also try rendering with Defer All and see if it works better for this case. Personally I almost always use it now, but you do need to be aware that you don't need to use as high a MPD nor high soft shadow samples due to the higher surface render quality of Defer All (i.e. surface quality with Defer All at 0.5 MPD is equivalent to regular render at maybe 0.75 or so, that's just a guesstimate, but it's not far off). Generally I get higher quality renders in similar or less time with Defer All.

- Oshyan

I've been seeing this mentioned a lot actually lately. Could you elaborate on what's actually happening here when it's used? I hear it creates better quality, is there any drawbacks other than render time? I still don't think this has been added to the wiki, at least I can't find it under the render methods and object rendering wikis.

Oshyan

From the Terragen 4.3 release notes:
"Deferred shading is a great way to improve anti-aliasing of textures and lighting on the terrain and other displaced surfaces, and it unifies adaptive anti-aliasing across all parts of the scene. In some cases it will render faster, and in others it will render slower. Image quality and render time depend on anti-aliasing settings."

Matt would need to answer any more in-depth questions as I don't know enough to explain exactly how it works. But I do know the general results it provides and although it requires some different render settings vs. without it (e.g. AA more strongly controls aspects of surface quality when it is enabled), I generally find it to be a benefit.

- Oshyan

WAS

Quote from: Oshyan on July 13, 2019, 02:40:33 PM
From the Terragen 4.3 release notes:
"Deferred shading is a great way to improve anti-aliasing of textures and lighting on the terrain and other displaced surfaces, and it unifies adaptive anti-aliasing across all parts of the scene. In some cases it will render faster, and in others it will render slower. Image quality and render time depend on anti-aliasing settings."

Matt would need to answer any more in-depth questions as I don't know enough to explain exactly how it works. But I do know the general results it provides and although it requires some different render settings vs. without it (e.g. AA more strongly controls aspects of surface quality when it is enabled), I generally find it to be a benefit.

- Oshyan

From what I'm getting here it's designed to work with the new adaptive anti-aliasing too? Thanks for quoting the release notes I had forgotten and didn't think to look there.

Oshyan

Robust Adaptive came later, but it should generally provide good results in lower render time for Defer All and Path Tracing in particular, as I understand it.

- Oshyan

Dune

I will try that. Thanks for your explanation, Oshyan, makes sense. I never actually checked that box. I guess it's different from Path tracing, curious what rendertime will be with defer all.