Planetside Software Forums

General => Terragen Animation => Topic started by: dorianvan on July 13, 2013, 07:54:43 pm

Title: shadow popping
Post by: dorianvan on July 13, 2013, 07:54:43 pm
I'm doing an animation and have this shadow popping and some flickering. Also in other shots, shadows vanish at the edge of the screen as the camera pushes forward. I did do some GI caching, but maybe not small enough steps. Any ideas how to fix this?
Title: Re: shadow popping
Post by: Oshyan on July 15, 2013, 03:34:28 am
In this case you're seeing issues from direct shadowing, not GI. So you'd want to increase Ray Detail Region Padding on the "Advanced" tab of the Renderer node and have it in "Detail in Camera" mode. I would suggest starting with a value of 0.5 on that shot and see if that fixes it. If not, try 1.0. I would not go beyond 1.5, and hopefully even that won't be needed.

Also there is some noise on the shadow line that's quite jittery. It's hard to tell if that's just from the low detail render however. Keep in mind that issues like both of these will be exacerbated by lower detail renders, so if possible always try a shorter sequence at higher detail, focused on a few adjacent problem frames. If issues still persistent, for the shadow noise if you're using soft shadows you could reduce or completely turn off (set to 0) the jitter, or increase the number of samples (the latter will increase render time, of course).

Let us know if any of that helps.

- Oshyan
Title: Re: shadow popping
Post by: Bjur on July 17, 2013, 06:00:46 pm
Hi dorianvan.

What Oshyan says.

I got some more or less fine results in several small frame animations (incl. closer and wider terrain shots) with settings like:

GI on (2, 2, 8, Supersample prepass on, GI cached 5 frames), rest unchecked
Raytrace shadows on, Microvertex jittering on
Motionblur, AA-bloom, Raytraced Objects, Raytraced Atmo, all off or set to "0"
Atmosphere Quality Sample jitter off
Detail 0.8 (for tests you may happy with just 0.6 up to 0.75 too)
AA 6
Edit Sampling: Auto
Pixel filter: Catmull-Rom (sharpest results in small frame animations for me)
Detail blending: 1
Displacement filter: 1
Soft clip effect: Off
Ray detail region padding: 1
Button "Animation check" checked

My values and settings won't lead you to any perfect personal results, but they may be a possible base which could work for you too..

GL!  :)

Title: Re: shadow popping
Post by: dorianvan on July 18, 2013, 03:26:15 pm
@Oshyan, attached are the settings I changed to and the resulting video.
Most of the popping is gone here, so on my next test, I will up the region padding to 1.
Regarding the jittery shadow line, it's only a little bit better.
Edit: I did a cache on every 5 frames.
When you say "soft shadows", are you referring to soft clip effect?
When you say "increase the number of samples", are you referring to GI sample quality or AA under
edit sampling?

@Bjur, I tried your settings, but two things happened; overall colors changed a little (more saturated or something), and all shadows have jitters now.
Title: Re: shadow popping
Post by: Oshyan on July 18, 2013, 08:30:44 pm
I was referring to Soft Shadows in the Sunlight node. If you haven't enabled it, it's disabled by default so it would not be the source of the problem. However just judging by your sample video it *does* look like Soft Shadows is enabled, either on the primary Sunlight light source, or on a fill light or something. Increasing the number of samples was referring to the soft shadow setting, not GI or AA. I do think you should check the Sunlight node, Soft Shadows, Number of Samples parameter. Try increasing it to see if the shadow noise goes away.

Oh, and you might as well disable GI Surface Details, it's going to be increasing your render time quite a lot and really isn't feasible for animation. The new version in Terragen 3 is a lot better on render time.

- Oshyan
Title: Re: shadow popping
Post by: dorianvan on July 19, 2013, 10:30:17 am
Hi Oshyan, I increased the samples on the sunlight from 5 to 10 and the shadow line looks great (the other lights have soft shadows turned off).
I increased the padding from .5 to 1 but there was a shadow pop again. I'll try increasing to 1.5 I suppose, to see if that fixes it; any other suggestions on that? Also, there's graininess in the shadows and it's very noticeably on the tree. Any way to fix/reduce this? One last thing, I did change from narrow cubic filter to Mitchell.

PS. I have purchased TG3 Pro and am waiting for license key, maybe having that will help too.
Title: Re: shadow popping
Post by: Oshyan on July 19, 2013, 04:01:28 pm
Glad to hear the shadow line looks better.

There are some new detail region padding modes in TG3 that should help. You'll have to see how they compare in terms of render time with e.g. padding 1.5.

Regarding graininess in the shadows, it's hard to say for sure, it might be just a very noisy surface that is aliasing. But I also see that bush (tree?) is quite noisy, which is more likely due to low anti-aliasing. 6 is not bad for stills often-times, but more may be required for animation.

- Oshyan
Title: Re: shadow popping
Post by: dorianvan on July 20, 2013, 08:26:30 pm
Yes, I turned the padding down to 1 (1.5 didn't help), then change the ray detail region to 360 degree and it solved the popping.

I turned AA to 8 and increased the quality of tree to very high quality, tried Mitchell, Catmull, and Narrow, upped soft shadow samples to 15, however, the graininess is not improving. Any idea? Could it be in the fill lighting? They all have soft shadow/jitter @ 9/1.
Title: Re: shadow popping
Post by: Bjur on July 21, 2013, 02:04:52 am
Quote from: dorianvan on July 18, 2013, 03:26:15 pm
@Bjur, I tried your settings, but two things happened; overall colors changed a little (more saturated or something), and all shadows have jitters now.

Soft clip effect:

Quote from: Matt on September 27, 2007, 04:52:33 pm
Soft Clip effect is a (proprietary) tone mapping which alters the brightness of pixels to improve the appearance of very bright objects in the image, giving a result more similar to photographic film than traditional 2D graphics. Most digital cameras implement something similar; it's very hard to take a nice photograph without it. Areas of the image which would otherwise be much brighter than white are brought into the visible range so that details can be seen, and it avoids hard boundaries around bright halos. Soft-clip effect, Contrast and Gamma Correction do not apply to .EXR or other HDR formats - they are only applied when saving to low dynamic range formats (BMP, TIFF etc.) or when viewing the rendered image on the monitor.


So, with soft clip effect turned off, you need to readjust your light setup of course. I'm sry, it was my fault to forgot to delete this line in your case..

Reducing atmosphere's haze and the blue sky values can also reduce some graininess sometimes.

Be sure "detail in camera" is always set for animations, even in cropped test animations.
Be sure "soft shadows sample jitter" is always @ "0" in animations for every lightsource (important for soft shadows are just diameters and samples).

Very high detail and AA settings wont help you to compensate any existing shadow poppings or heavy graininess in all.

As always, it's all about "Try and error"..

Title: Re: shadow popping
Post by: Oshyan on July 23, 2013, 02:09:53 am
I hadn't realized you had fill lights, much less that they had soft shadows enabled. First, are you sure you need fill lights since you're using GI? Second, if you must use fill lights, why do they have shadows enabled? This just adds extra, odd-looking shadows to the scene in most cases, and also takes a lot longer to render (especially with soft shadows enabled). If you must have it as it is, then indeed you'll need to increase samples, or reduce jitter. Reducing jitter can cause banding in the shadows some situations, but in animations with normal terrains (i.e. not super-smooth) it shouldn't be a problem. So assuming you stick with the fill light+soft shadow setup, reduce jitter to 0 or 0.25 and see if that helps/fixes it.

- Oshyan
Title: Re: shadow popping
Post by: dorianvan on July 30, 2013, 11:15:25 am
So I'm running TG3.0.04.0; I have no fill lights, just the sun and enviro; I have the mountain shadows looking great, but the popping is back; I've ran tests using the different ray region options and different levels of padding, from none to 1.5;  I rendered every five frames, then blended every 5 frames.
Why am I still getting shadow popping? Could the cache step and blending effect this?
There's still graininess in the populations of grass and the background tree?
My render time for a full 1920x1080 is 2:20 per frame, any way to fix the above and render faster?
Title: Re: shadow popping
Post by: Dune on July 30, 2013, 11:38:52 am
This is not really 'my expertise' but soft shadow take up a lot of render time, but I guess you need it, though maybe not for every shot. Perhaps lowering the samples from 10 to 5 saves a lot and is not really detrimental to quality? Also, why do you have AA set to 7? I have picked up somewhere that 4-6-8 are 'better numbers', but I don't know if that's (still) true.
Hopefully someone doing more animations can help you out!
Title: Re: shadow popping
Post by: Hannes on July 30, 2013, 12:35:46 pm
I took a look at your latest movie. This seems to be some kind of a render error. I'm not sure if this is shadow popping. When you look at the single frames where these strange artifacts appear, you can roughly see the square shaped bucket. I have no idea what causes this, but maybe somebody else has an idea?!
Title: Re: shadow popping
Post by: Oshyan on July 30, 2013, 05:55:36 pm
What you're seeing now appears to be a new issue, not related to the ray detail region padding. It's hard to say, but it looks like possibly some depth sorting issues or something. Honestly it's hard to know what's going on without seeing a TGD at this point. This result is certainly not normal. If you're able to send a TGD along, you can send to support AT If you do so, if the scene uses any other assets external to the .tgd, please use the Export Gathered Project function from the File menu then zip up the output to send.

Don't forget to reset the Ray Detail Region Padding to the lowest setting that got rid of the other popping since it doesn't fix this issue.

For the plant model noise, I think you just need higher AA. Also make sure you're not using a "sharp" interpolation method.

- Oshyan
Title: Re: shadow popping
Post by: dorianvan on July 31, 2013, 03:59:23 pm
@Ulco, I tried lowering the samples to .25/5, AA to 6; it does save a little time, but shadow jitter on mtns are more noticeable, and "shadow popping" is still there.
@Hannes, thanks, you might be right, I don't believe it's a shadow pop (in foreground) anymore, thanks! it appears to be something weird with the grass clumps, and other than changing the render quality, which I've tried them all, I don't see any other parameters to play with, unless there's something in the density or terrain shader inputs of the grass clumps that I have going in to it.
@Oshyan, I'll send in the tgd, but what do you mean by "depth sorting"? Is there something I can try to test it out? I did a test with AA at 12, no change.
Title: Re: shadow popping
Post by: Oshyan on August 02, 2013, 02:55:04 pm
Working on this via support email, in case anyone is wondering. Hopefully we can update with some final settings which improve the issue.

- Oshyan
Title: Re: shadow popping
Post by: dorianvan on August 03, 2013, 05:30:34 pm
So TG support suggested turning off Stabilize Ray Detail in Motion (render subdivision node), and enabling Lock Subdiv to Frame on the Extra tab and lock it to frame 1. I'd love to know what this technique does, but the result was no visible problems. The render time did increase so now I'll try lowering some of the other settings to offset it a bit. Thanks guys!
Title: Re: shadow popping
Post by: Oshyan on August 03, 2013, 05:48:05 pm
Glad that seems to have solved it. I'll let Matt chime in with explanation of what's going on.

I did forget to mention that for noise in vegetation you'll want to lower your AA noise threshold a bit and/or not use 1/64th adaptive (1/16th is probably OK). Unfortunately this will probably increase render time as well, but it's really going to be necessary for noise-free vegetation rendering. I think if you lower your detail down to say 0.65 you'll still get good results and can probably make up a good portion of the render time increase. There is a light source that has soft shadows and jitter is still at 1 with samples at 8, you could probably turn down samples a bit if you reduce jitter to the 0.2 level you have on other lights. At AA8 which you're using, you can probably be fine with fewer atmosphere samples, maybe 10 or even 8. You also *might* be able to get away with a lower Detail Blending value of 0.5. Also consider using the Voxel Buffer for localized clouds. All that should help on render time.

- Oshyan
Title: Re: shadow popping
Post by: dorianvan on August 04, 2013, 01:19:13 am
Really good to know! Also looking forward to Matt's explanation if possible.
Title: Re: shadow popping
Post by: Dune on August 04, 2013, 02:58:32 am
Sounds like you're off to render some interesting sequences now, Dorian. I'm glad things could be improved, the whole setting is really worth some fine footage!