Author Topic: Details of GI Averaging for Animation  (Read 1089 times)

Offline PabloMack

  • Member
  • *
  • Posts: 1155
  • Evil men will be fed to the dinosaurs.
    • An Adventure in Technology
Details of GI Averaging for Animation
« on: August 16, 2014, 04:04:37 PM »
Say that I am averaging 5 frames for GI in an animation. If frame #21 is being generated are the GI frames centered around this target frame? In other words, GI frame 21 is being sample as well as the two immediately previous frames (19 & 20) and the two immediately following frames (22 & 23). If frame 1 is being rendered I would presume that only the three GI frames 1,2,3 are being sampled because GI frames 0 and -1 don't exist. Or when the front and end frames are being rendered does the renderer use the first five GI frames 1~5 and the last five GI frames because the ends don't have sufficient surrounding frames to meet the 5 frame averaging criterion? This may sound like nit-picking but I would like to think I understand these details. Thanks.
« Last Edit: August 17, 2014, 01:54:33 AM by PabloMack »

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3578
  • I'm the crazy one
Re: Details of GI Averaging for Animation
« Reply #1 on: August 26, 2014, 06:43:54 AM »
Sorry for the late reply here.

Terragen prints quite a bit of extra information to the CLI/shell/console about how it's loading GI cache files. On Windows you can see this in a console window if you start TG with tgdcli.exe instead of tgd.exe, or if you redirect the output of either executable to a text file. On the Mac you can see this extra logging by opening the Console. This output is usually logged somewhere convenient by render farm tools as well, if you happen to be using one.

The cache loader places more importance on loading a full set of caches rather than centering the caches around the current frame. So, if you ask it to blend 5 cache files, even on frame 1 it will load the first 5 GI cache files that it finds in the sequence if the blend mode is set to "Equal Blend In Range", or the first 4 (in your case) if the mode is "Interpolate (for Animation)". The reason Interpolate mode only loads 4 in this particular case is that it's designed for more sparsely separated cache files, not necessarily one on every frame, and has an interpolation filter that only sometimes used all N files and sometimes uses N-1.

There's some more information here:

« Last Edit: August 26, 2014, 07:14:37 AM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.