GI cache surface detail

Started by digitalguru, April 03, 2013, 11:54:55 am

Previous topic - Next topic


I'm just testing the cache feature in Terragen and seem to be losing detail reading back from the cache file wgehn using GI surface details.
First image below is a straight render with no caching - at the bottom of the spheres there's some nice occlusion shadowing.
Rendering with the same settings to a GI cache and then reading it back in loses the detail.

Is there something I might be missing or does the GI cache not store that fine detail?

Thx in advance!


I can see a very slight difference but I don't know the reason off hand. You are using the setting, Blend mode > One file (exact filename), yes?

Could you try another version with a rough surface, maybe some fake stones or something so there is more area  to show the difference in? and supply the TGD file, it may help.



Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)


The test is not entirely comparable as the GI cache contains a different lighting "solution"/calculation as the non-cached render.
That's just how GI works inherently. Every time you render the same scene the calculation of GI will be slightly different.
You can't overcome that, but using very high GI relative detail and sampling settings may have your calculation "converge" more to the "ground state" of the scene where ground state means the true state/solution of the scene as calculated per brute force.
This is inherently not possible with any biased renderer like TG, but you can mimic it by using insane settings.

Based on that I think you're just observing that difference.

Another option might be that GI surface details is a post-effect on rendered tiles/images, thus that the GI surface details part isn't being stored in the GI cache file, which would allow for an explanation for the thing you're seeing.


Tangled - think you're right there - the cache either isn't storing that detail or it's a post process which is lost when you render using a cache. It is a small difference granted, but rendering without the cache and surface details on does give that little contact shadow effect which all helps to bed objects into the terrain

I come from from traditional Lighting TD background so I guess I miss having an ambient occlusion pass to bring out detail in scenes (in renderers like PrMan where you can cache quite a detailed ambient occlusion solution).

Also the static scene I'm working on is quite a small for Terragen (80m across) and maybe Terragen isn't really optimised for these kind of scales?

Richard - thanks - the blend mode improves it a little.

Love your site by the way - some lovely images - were you at 422?, met some guys from there a while ago - some very nice Terragen work coming out of that studio.

Attached is a link to the TGD - if you have time to have a look, if you don't, no worries - may be time to bug Mr Fairlclough for a fuller featured ambient occlusion (or perhaps I'm missing something the the AO enviro light?)


April 03, 2013, 05:00:24 pm #4 Last Edit: April 03, 2013, 05:19:33 pm by Matt
GI surface details is a separate process that happens at shading time, while the image is being rendered. The cache doesn't store that detail. Whether you read the cache from a pre-generated cache file or simply generate the cache each time you render, GI surface details works to add detail to whatever is in the cache by tracing rays a short distance from the shading point. You can still use GI surface details in combination with a GI cache file - it doesn't know or care where the cache came from.

By the way, it looks to me like both images are missing GI on the ground on the left (where the ground turns yellow, apparently lacking skylight). This could happen if both images were rendered from a GI cache file that was generated from a different viewpoint, but I don't know how this could happen with a straight render with GI pre-pass.

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


April 04, 2013, 08:42:02 am #5 Last Edit: April 04, 2013, 08:51:13 am by digitalguru
Thanks Matt - that's good to know.

Yes,  spotted that discoloration on the ground, and re-rendered the cache to test it and had the same result, but re-created the test and that missing GI was fixed, must have broken something in the first one :-)

On a side note, the scene I'm working on is quite a small scale scene -  small rock pool with lots of leafy vegetation around it - no clouds or any atmospheric rays to consider - is it better to render with ray trace atmosphere off with a reasonably high AA setting - say 5 or 6? Still getting to grips with the trade off between AA settiings and RTA.



My "rule of thumb" for AA together with RTA is to never go beyond AA4.
Above AA4 using RTA gets really expensive. Especially atmosphere samples are expensive with RTA.

So if you have vegetation and use AA6 or 8 then RTA isn't economical.

There's a whole tech-discussion behind optimizing your AA with adaptive sampling and noise-thresholds, but in the end it still runs down to the above stated rule of thumb, at least in my experience.

At some point I will dedicate a tutorial for my website to rendering vegetation and how to understand AA + RTA.


Thanks Tangled,

Still getting used to how to balance RTA vs AA settings - more tests needed!