TG3 Cloud rendering rules of thumb

Started by FlynnAD, September 08, 2013, 01:11:54 AM

Previous topic - Next topic

FlynnAD

Dear Planetside and others,

Are there any general tips or guidelines for when certain cloud/atmo settings would be best to have on or off? In these notes, I'm really focusing on shots where you don't have much landscape visible, if any at all.

For example, through test renderings, I've seen that it's best to have the Cloud Quality at Optimize NONE for final renderings. Any optimization (even Optimal) may leave chunky blocks in a final rendering.

Likewise, in test renderings, it seems that raising the Render Node's Quality Detail does not impact render time much at all, but it likewise does almost nothing to increase the final cloud quality. I left the Cloud Node Quality on 1 in all my tests, and it seemed that changing the Render Node's AA seems to do everything for the final cloud and sky quality.

Issue #1: When does it most benefit to have Defer Atmo/Cloud on? For example, is it best to have it one way or the other (ON or OFF) when you have a shot without any landscape in it?

Issue #2: For a shot without any landscape (sky & cloud only) should you turn off Cloud shadows completely for best performance without any detriment, or are there still shadows within clouds in TG? [Some users like me might assume "shadows" are only calculated from clouds to landscape, not intra-cloud shadows, unless there is a special circumstance, but this may be misconstrued semantics.]

Issue #3: At what point (generally-speaking again) does the "Localize" cloud function become unhelpful or slower than not localizing a cloud? For example, if you have totally flat landscape with infinite horizons, you could theoretically make a localized cloud 100,000m to 200,000m or more in diameter. Still, I would assume localizing this scene is still faster than making a cloud for the entire planet, when you don't see 95% of a planetary cloud from a standing position. With a localized cloud 100k-200k, does the 2d shadow map become less useful than Defer (raytrace) Atmo, because you'd have to have the 2d Shadow Map's size so large to be crisp, as to become cumbersome?

Issue #4: Similar to #2, at what point in a localized cloud's size, or in what type of generalized scene (lots of landscape, or vegetation, or heavy GI, or whatever) does the cloud's Voxel Buffer help the most? Also, when does the cloud Voxel Buffer help the least or become not worthwhile to use? For instance, I have a scene of mainly sky & large localized clouds with ultra-basic landscape. Having the Voxel Buffer ON added about 20% to test render times, but I don't know why.

Issue #5: For GI caching, since it is separate and independent of render size, are there any rules of thumb for how a user might best choose the settings? For example, if you render at 1000x500 pixels with a GI of 4,4; is that equivalent to the same GI calculated at 1,1 at a render size of 2000x1000 (4x as large of a render)? Or would that be instead equal to a render size of 2000x1000 with a calculated GI of 2,2 (only 2x the dimensions of 1000x500)?

Issue #6: For animations, is it best to have the cloud's Quality Sample Jitter at zero? I'm assuming the jitter default of 1 is best for stills but don't know if it impacts animation like the Render Node's Detail Jittering, which is best left unchecked for animations.

Thank you in advance for any and all tips,

Matt

Oshyan

#1
The render artifacts that can occur with the cloud optimization options vary greatly by cloud type. Indeed sometimes it's necessary to set it to "Optimize none" but I think it's unnecessary to always assume it won't provide good results. I've used it even in animations with no problems. It does depend on the cloud settings, and unfortunately I can't offer a lot more detail than that as I haven't done a thorough comparison to see if there's a consistent pattern (there probably is). My rule of thumb is to leave it set to the default of optimal acceleration, then if I see any problems with the clouds, it's one of the first things I test, turning off acceleration.

1: Defer Atmo/Cloud can be quite useful, but does require some experience and fine-tuning to get best results, with superior speed *and* quality to the non-defer rendering of atmo. When AA needs to be high for objects in the scene (for example), it can be difficult or even impossible to properly balance it and get superior results. In the case you mention, with no landscape, Defer Atmo will probably work quite well and be less tricky to adjust. I tend to keep cloud quality at 1 and just increase AA until the noise is gone in a situation like that.

2: I'm not sure what you mean by "turn off cloud shadows". Where? You mean "Enable Secondary" in the cloud layer(s)? This will turn off self-shadowing too, so no, you don't want to disable it. Turning off the landscape should be enough, I don't think you need to try explicitly disabling any other shadow options (I may be missing something though).

3: I don't know at what specific point a localized cloud would stop being more efficient than a global cloud system, I think it depends much more on visibility overall. If you clouds go completely over the visible horizon, I would guess they may be roughly equivalent, but this doesn't necessarily have to do purely with size; if you're in orbit you could see a very large area of cloud, but localize may still be useful if you only want a particular (large) area. What Localize does is just give the cloud layer a finite boundary for the rendering engine to confine its shading to. This is why it's faster. In the case of clouds all the way to the horizon, the horizon and planet itself provide some occlusion I believe. In the case where you have no terrain being rendered, this may change of course. As you say, use of 2D Shadow Map will probably get memory-prohibitive to maintain equivalent quality when using very large localized clouds. I would basically say the rule of thumb is to use localized clouds when you will *see* the localized boundary area of the cloud, otherwise it's probably not worth bothering.

#4: Voxel Buffer helps to further confine the shading algorithm's work by generating a voxel set from the input noise functions at a coarse resolution and then using this as the shading bounds. Again if the entire screen is taken up by your clouds, it probably won't help, but as long as your clouds are finite in screen space, it will probably help. It's basically a further/more fine-grained "localization" of the clouds. The main effect of increasing resolution is to increase detail of the resulting clouds as it more accurately represents the input noise function with the voxel bounds. This takes longer due to having more area to shade, and probably increased memory use for the voxel buffer itself, so there's a balance. It's easiest to visualize just by testing with it on and off on a relatively detailed cloud layer using default settings, then adjust voxel buffer resolution until you see a minimal difference and you can see what the performance difference is like. As to when voxel buffer helps most, frankly I'm not sure. Matt may have a better answer, but quite honestly *everything* varies scene to scene so much, it may not be possible to provide a really clear rule of thumb. Honestly there is so much tuning involved in creating a scene and multiple test renders as a result, that I think simply checking voxel and/or 2D shadow map to see if they in a given scene (on a lower resolution test obviously) is the best rule of thumb. I would however try to encapsulate a good approach as follows: voxel buffer will save you more time the more finite in area your and the more patchy your cloud function, and/or the more demanding your cloud shading (high samples needed), and having a good sense of the change in detail when using voxel buffer vs. buffer resolution should help inform you as to when to use it (when the trade-off would be acceptable). I can't say why your render was slower with it enabled, but I wold guess you had high coverage clouds or clouds covering a large area of the screen.

#5: (EDITED) Twice the dimensions in the image would give you twice the GI prepass samples in each direction. To produce an equivalent set of prepass samples you would need to halve the GI cache detail, but not the GI sample quality. So as stated in your first example, 4/4 should be equivalent to 2/4 at twice the dimensions. GI sample quality stays the same because that controls the quality of each GI sample point and is independent of resolution.

#6: No, I don't think so, in general leave the jitter where it is. Lowering it can produce banding. You may get away with lower samples if you reduce jitter, and you can test it to see if it does create banding in your situation, but I wouldn't recommend it in general.

Bottom line I see you're trying to squeeze all the performance you can out of things and I get that, but there are always trade-offs. The defaults are setup to give generally good results in a variety of situations. Start with those and test. And, if possible, provide some examples of the kind of scene(s) you're working with and we may be able to give more specific advice.

Last but not least, if you learn anything you feel is more concrete or differs from the above, let us know! Many of these settings are added based on specific situations we or a customer run into in production or on specific projects, and they prove useful when implemented, but they can not always be exhaustively tested in terms of performance impact across a large variety of situations. User feedback is an important part of the process.

- Oshyan

bobbystahr

#2
Only slightly off topic here...I have no 2D clouds in the Optimisation Tab with shadow mapping like in TG2 in my install of TG3, is my install broken? and Voxel Buffer...is that a paid feature or should it be in TG3FREE?
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Oshyan

The 2D cloud option was never on the Optimizations tab, it's on the Quality tab (defaults to 3D Volumetric in most cases). Voxel Buffer is indeed a paid feature.

- Oshyan

bobbystahr

It is on my TG2 Oshyan...in TG3 I'm missing the whole bottom of this
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Oshyan

Ah, you mean 2D Shadow Map. That's a Pro-only feature in TG2 and 3. See product comparison here: http://planetside.co.uk/products/tg3-product-comparison

- Oshyan

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Matt

I've edited Oshyan's answer to number 5 above.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

bobbystahr

Quote from: Matt on September 11, 2013, 10:09:25 PM
I've edited Oshyan's answer to number 5 above.

Matt

Thanks Matt...easy enough to remember that and handy...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

FlynnAD

Oshyan and Matt,

Thank you for the detailed replies. Now I just need to absorb your answers.

Matt