Planetside Software Forums

General => Terragen Discussion => Topic started by: ndeewolfwood on May 31, 2011, 10:24:18 AM

Title: project optimization
Post by: ndeewolfwood on May 31, 2011, 10:24:18 AM
hi everyone,

I just want to know your tricks to reduce rendering time who are not related to render setting and sampling quality.

I think to simple things like :

*Disable color or displacement in powerfractal node if not used by the batch (example :  disable the displacement for powerfractal node plug into surface node color input)


If we have some node who are not connected to the batch are they compute in some way and increase rendering time.

any idea ?
Title: Re: project optimization
Post by: Tangled-Universe on May 31, 2011, 10:33:07 AM
I think when you connect a coloured PF with displacement to the colour input of a surface shader that the displacement data will be ignored.
So in regard to that type of situations I think there's nothing to win and if it is I think it's likely not very significant.

1) The first thing which comes to my mind is to use the lowest amount of octaves in the noise you can get away with.
2) Also, the larger the patch size of your compute nodes the faster the calculation, likely.
3) Third, blend out clouds in the very far distance with a distance shader. (this does not work for blending out small(er) surface details in the distance, that actually works slower).
4) Keep cloud density and edge sharpness as low as possible. You can maintain a denser look by adjusting scatter colours and lighting settings properly.
5) Use an as small as possible lake radius for your water object. Or even better, use DandelO's water mask technique.
6) TG2 has a pretty good LOD algorithm for models I believe, but it's probably also worth trying to keep poly-count for imported models as low as possible.

These are the first things which come to my mind. Else, like you said, rendersettings are critical.

Cheers,
Martin
Title: Re: project optimization
Post by: ndeewolfwood on May 31, 2011, 01:16:33 PM
ok thanks,

one more question.
One PF with an blending shader is fully calculate by terragen or only the visible part.
Fully right ?

If we use a high octave PF with a distance shader can see the render time droping ? 


Title: Re: project optimization
Post by: Tangled-Universe on May 31, 2011, 01:21:00 PM
Quote
ok thanks,

one more question.
One PF with an blending shader is fully calculate by terragen or only the visible part.
Fully right ?

I think fully, hence the increase in speed when using localized clouds, so you can add that to the list as number 7 ;)
Localized clouds circumvent complete calculation of the texture-space.

Quote
If we use a high octave PF with a distance shader can see the render time droping ?

See #3 ;)
Title: Re: project optimization
Post by: ndeewolfwood on May 31, 2011, 01:22:55 PM
for terrain too ?
Title: Re: project optimization
Post by: Tangled-Universe on May 31, 2011, 01:23:37 PM
See #3 ;)
Title: Re: project optimization
Post by: Oshyan on May 31, 2011, 01:43:11 PM
As far as I understand, with any kind of blend shader (Distance Shader or otherwise) the shader still needs to test each area of the scene as it's rendered to determine whether there is coverage there, so it still takes time. What's saved is the actual shading/rasterizaton, I think. In the case of terrain displacement, due to LoD and an efficient micropolygon engine, the savings are minimal. For clouds the savings can be higher because volumetric rendering is more demanding.

But it's important to note that, as far as I'm aware, a blended cloud layer will not gain the same performance increase as localized clouds. Localized clouds actually provide a specific bounding space for the renderer to use and *only* test for cloud visibility within that area. This is different than with e.g. a Distance Shader because the Distance Shader still needs to be tested for the entire visible sky. So while you may save volumetric shading time, you won't get the speed-up of localized clouds.

Matt may need to hop in here and correct me, but this is how I understand it to work.

Proper render settings will make the biggest difference by far in 99% of cases.

- Oshyan
Title: Re: project optimization
Post by: Tangled-Universe on May 31, 2011, 01:46:02 PM
No Oshyan that's correct as far as I've understood from him as well.

With a distance-shader you restrict the volumetric rendering, but you do not restrict the texture space as this indeed needs to be "tested" for each area.
Localized cloud also restrict the texture space needed to be calculated.
Title: Re: project optimization
Post by: Oshyan on May 31, 2011, 02:04:51 PM
Exactly. So just bear that in mind when aiming for time savings. If you can use a localized cloud it's going to be faster than using any kind of blend shader method, generally speaking.

- Oshyan