shadow popping

Started by dorianvan, July 13, 2013, 07:54:43 PM

Previous topic - Next topic

dorianvan

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?
-Dorian

Oshyan

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

Bjur

#2
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!  :)

~ The annoying popularity of Vue brought me here.. ~

dorianvan

#3
@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.
-Dorian

Oshyan

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

dorianvan

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.
Thanks.

PS. I have purchased TG3 Pro and am waiting for license key, maybe having that will help too.
-Dorian

Oshyan

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

dorianvan

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.
-Dorian

Bjur

#8
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.

Matt

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"..

~ The annoying popularity of Vue brought me here.. ~

Oshyan

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

dorianvan

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?
Thanks.
-Dorian

Dune

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!

Hannes

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?!

Oshyan

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 planetside.co.uk. 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

dorianvan

#14
@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.
Thanks.
-Dorian