Planetside Software Forums

General => Terragen Discussion => Topic started by: sboerner on August 13, 2018, 11:09:35 AM

Title: GI artifacts
Post by: sboerner on August 13, 2018, 11:09:35 AM
Some of my high-resolution renderings have circular patterns that seem to be global illumination artifacts. I noticed them when I removed the foliage from this image. Increasing the GI blur radius fixes it, but the value has to be very large – in this case around 100.

Here's a detail of the upper right corner of the image, with a GI blur radius of 40 (top) and 100 (bottom).

[attach=1]
[attach=2]

At lower resolutions, the GI radius doesn't need to be increased as much.

I also tried increasing the GI prepass padding, but that didn't seem to make any difference.

Are these radius numbers correct? They seem unreasonably large to me but I'm not sure how else to fix the problem.
Title: Re: GI artifacts
Post by: Oshyan on August 13, 2018, 05:47:08 PM
Do you have GISD enabled? If so does this still happen if you turn it off? Note that some of the GI parameters (particularly in GISD) *are* dependent on render resolution.

- Oshyan
Title: Re: GI artifacts
Post by: N-drju on August 14, 2018, 07:24:13 AM
This may be caused by either luminosity or reflectivity settings within one or more textures. I often get this with crop renders of highly luminous or reflective items, though it is gone in full and high-detail (non-cropped) images.
Title: Re: GI artifacts
Post by: sboerner on August 14, 2018, 09:48:09 AM
QuoteDo you have GISD enabled? If so does this still happen if you turn it off? Note that some of the GI parameters (particularly in GISD) *are* dependent on render resolution.

GISD was enabled. I disabled that and reset the GI blur radius back to its default value of 8 and did an overnight rendering. Same result as before:

[attach=1]

Back in my mental ray days I would have called circular artifacts like these "photons" and would have fixed them exactly the same way as here – by increasing the radius. But those were cast from the camera while these seem to be projected along the y axis.

I remember running into this months ago, when I first set up the landscape and there was no grass or other geometry. But it disappeared when I added the trees (hidden by the detail, I guess) and I forgot about it.

This evening I'll try setting up a fresh scene to see if I can reproduce it.

QuoteThis may be caused by either luminosity or reflectivity settings within one or more textures. I often get this with crop renders of highly luminous or reflective items, though it is gone in full and high-detail (non-cropped) images.

Thanks, N-drju. I'm not using luminosity, though there may be some reflection. I'll take this into account when I set up the new scene.
Title: Re: GI artifacts
Post by: Dune on August 14, 2018, 11:29:57 AM
Very weird, I don't have a clue what it could be.
Title: Re: GI artifacts
Post by: Oshyan on August 14, 2018, 04:16:12 PM
I'm not sure either, though it seems vaguely familiar. If you could get us a stripped-down test scene that reproduces the problem, we can try to help troubleshoot it.

That being said, a very high GI blur radius is not necessarily a problem. 100 is not crazy at high resolution. See GI Blur Radius info in docs:
http://planetside.co.uk/wiki/index.php?title=Terragen_4_Global_Illumination#Render_GI_Settings

- Oshyan
Title: Re: GI artifacts
Post by: sboerner on August 14, 2018, 04:35:10 PM
QuoteThat being said, a very high GI blur radius is not necessarily a problem. 100 is not crazy at high resolution.

That's good to know. When comparing otherwise identical images, the difference between 8 and 100 blur radius seemed to be lighter and smoother shadow areas, but it wasn't objectionable.

I looked back and realized that I had jotted down some notes when I ran into this before. They've given me a couple ideas to check before starting any serious troubleshooting.
Title: Re: GI artifacts
Post by: Dune on August 15, 2018, 01:04:51 AM
Is there an intersect underlying at work? That sometimes causes strange color patches.
Title: Re: GI artifacts
Post by: sboerner on August 15, 2018, 02:42:51 PM
OK, it has something to do with the lake shader used to create the canal surface. When I strip it down to the basic displacements there are no artifacts.

[attach=1]

But they appear when the canal surface is added.

[attach=2]

I made a fresh file and tried to recreate it. In the original file the canal mask is an 8-bit grayscale image, but here a SSS is used. It's piped it through a default shader to create the mask, since the water shader does not have a mask or opacity input:

[attach=4]

But for whatever reason, I can't duplicate the effect with a water shader. When a default shader is substituted for the water shader, the artifacts appear.

[attach=3]

Apparently in the original scene the water shader is also somehow interacting with the surface displacements. But I think the idea is the same.

Am I correctly masking the water surface for the canal? The lake shader is just a meter or two above the underlying terrain.

[attachurl=5]

Title: Re: GI artifacts
Post by: bobbystahr on August 15, 2018, 08:27:44 PM
Quote from: sboerner on August 15, 2018, 02:42:51 PM
OK, it has something to do with the lake shader used to create the canal surface. When I strip it down to the basic displacements there are no artifacts.

[attach=1]

But they appear when the canal surface is added.

[attach=2]

I made a fresh file and tried to recreate it. In the original file the canal mask is an 8-bit grayscale image, but here a SSS is used. It's piped it through a default shader to create the mask, since the water shader does not have a mask or opacity input:

[attach=4]

But for whatever reason, I can't duplicate the effect with a water shader. When a default shader is substituted for the water shader, the artifacts appear.

[attach=3]

Apparently in the original scene the water shader is also somehow interacting with the surface displacements. But I think the idea is the same.

Am I correctly masking the water surface for the canal? The lake shader is just a meter or two above the underlying terrain.

[attachurl=5]





Try using a masked displaceable Plane with a Water shader; or you can mask the lake with whatever your using to make the canal.
Title: Re: GI artifacts
Post by: Dune on August 16, 2018, 01:28:51 AM
You have to be careful when using planes for water, because they don't curve with the planet. Better use a (no-shadow) sphere, as big as the planet of course. If you add a surface layer, you can use the offset to raise/lower the water level.
Also, if you use defauilt opacity as mask, you have to set diffuse color to black! That may be the culprit.
Title: Re: GI artifacts
Post by: sboerner on August 16, 2018, 11:19:49 AM
QuoteBetter use a (no-shadow) sphere, as big as the planet of course. If you add a surface layer, you can use the offset to raise/lower the water level.

Thanks, Ulco. That's a good workaround, though I did have to make it slightly smaller than the planet to avoid surface conflicts. Rendering a version with that now.

QuoteAlso, if you use defauilt opacity as mask, you have to set diffuse color to black! That may be the culprit.

I did check this but it didn't make a difference.

QuoteTry using a masked displaceable Plane with a Water shader; or you can mask the lake with whatever your using to make the canal.

Thanks, Bobby. I think Ulco is right in this instance – the scene is large enough for curvature to be an issue. And as you say the lake can also be moved below ground level and displaced up. (The artifacts appear only when the masked lake object is above part of the landscape.) I tried that as well but the sphere idea seems simpler.

Neither workaround addresses the original issue, though. Perhaps it's best to avoid the lake object altogether.
Title: Re: GI artifacts
Post by: sboerner on August 17, 2018, 11:54:18 AM
So after swapping out the lake objects for displaced spheres my rendering times went through the roof. What had been a comfortable overnight 6-7 hour render became 20 hours and counting . . . I cut it off at 73 percent.

There are two water spheres, for ground level streams and the elevated canal surface, so any rendering penalties must be getting doubled. Even so this seems unreasonable. I'll take another look at the network to see if I'm doing something wrong.

In the meantime it's back to the lake object and high GI blur radius values. Suddenly they don't look so bad after all.
Title: Re: GI artifacts
Post by: Dune on August 17, 2018, 01:16:32 PM
As long as they don't overlap and are opacity masked, rendering should go faster.
Title: Re: GI artifacts
Post by: sboerner on August 19, 2018, 10:24:43 AM
QuoteAs long as they don't overlap and are opacity masked, rendering should go faster.

Yup, it was operator error. The spheres weren't properly masked. That's fixed and render times have been reduced to something more reasonable. Artifacts are gone. Thanks for the additional tips.

Like the new website, btw. Impressive work.
Title: Re: GI artifacts
Post by: bobbystahr on August 19, 2018, 10:32:38 AM
I freakin love how this forum actually works...so many software forums I've trolled don't, and I've been glad I don't use said softwares...
Title: Re: GI artifacts
Post by: bobbystahr on August 19, 2018, 10:34:15 AM
Quote from: sboerner on August 19, 2018, 10:24:43 AM
QuoteAs long as they don't overlap and are opacity masked, rendering should go faster.

Yup, it was operator error. The spheres weren't properly masked. That's fixed and render times have been reduced to something more reasonable. Artifacts are gone. Thanks for the additional tips.

Like the new website, btw. Impressive work.

heh heh another picnic, Problem In Chair Not In Computer ....
Title: Re: GI artifacts
Post by: sboerner on August 19, 2018, 10:38:57 AM
  :D
Title: Re: GI artifacts
Post by: Dune on August 19, 2018, 12:18:07 PM
Thanks Steve. Good that it's solved!