Projects using Global Illumiation (GI)

Global Illumination (GI) produces realistic lighting results, but rendering GI projects on a renderfarm must be done carefully in order to avoid typical problems (flickering in animation, lighting discontinuities in still images).

GI with still images (see the dedicated section below) When rendered on the RANCH, a still image is subdivided into many bands, each band being rendered by a different node. By default, each node will compute its own GI solution, and the end result will be an image showing clear discontinuities when all the bands are recombined:

To avoid this problem, it is necessary to compute a GI solution first and to save it in a GI cache file that will be included in the project. Each node will then use this GI solution, and the image will not show obvious tiles anymore.

GI with animations (see the dedicated section below) When an animation is rendered on the RANCH Runner, each render node is in charge of one or several frames of the sequence. In the case of a GI project, if we do not take necessary measures, each render node will compute its own GI solution and apply it while rendering. In the end, a flickering effect will ruin the animated sequence because each frame will have a different lighting. To eliminate this problem, it is necessary for every node to use the same GI solution.

To do this, individual GI solutions are first computed for all the frames and stored in GI cache files: this is the prepass phase. Then, during the rendering phase, the render node will interpolate between several of these GI cache files (corresponding to the rendered frame and to the frames immediately before and after the current frame). It will then use the result of this interpolation as the GI solution for the current frame; this technique produces clean and flicker-free animations.

Still image using a Global Illumination cache

You must compute the GI cache on your system and include it with your project. It would make little sense to compute it on the RANCH, since:

  • this operation cannot be parallelized, so we would not be much faster than your system, and you would still have to pay for it.
  • the GI cache computing is very fast compared to the rendering part, and you can often compute it at a lower definition than the final image to save additional time.

1. First go to the render options, click on the GI Settings button.

terragen_3

Then choose the option Write to GI cache file: terragen_4

And enter the name (without any path) of your GI cache and click on Render Image.

2. When it's done, go to the GI Setting once again. This time, select the Read GI cache file(s) option instead with the name of the GI cache, and save the scene. terragen_5

3. Include the GI cache file in your project, next to your .tgd scene. terragen_6

You can now prepare your project as indicated in the section about preparing your scene.

Animation project, method 1: included precomputed GI cache files

With this technique, you compute the GI cache files yourself on your system and include them in the project. Using the 'sparse cache' technique (generate a GI cache every nth frame) will give you the best image quality.

Advantages

  • you will only have to upload and render one project on the RANCH (instead of two with the method 2).
  • the final rendering will be slightly faster as all the GI files will be stored on each node and will not have to be fetched on the fly across the network.

Drawbacks

  • Unless you have a fast upload speed, the size of the project archive may become too big for you to upload it to the RANCH in a reasonable time, because of the included GI cache files.
  • it may take a while to render the GI cache files on your system, depending on their number and the settings you choose.

The GI settings of your RANCH project must be configured as below: terragen_7

Important Make sure that all the included GI files have the name gicache_xxxx.gic (e.g. gicache_0001.gic, gicache_0002, etc.):

Otherwise the server won't recognize the GI files and the project will be rendered without them.

Animation project, method 2: the Prepass/Rendering technique

With this technique, the animation project is done in two steps, that is two RANCH projects:

  • The first project is used to compute all the GI cache files
  • The second project does the actual rendering. Each rendered frame uses as its GI solution an interpolation between the previously rendered GI cache files.

Advantages

  • The size of the projects to upload is smaller: you don't have to include the GI cache files.
  • The speed of the RANCH is used to render the GI cache files.
  • You will be able to reuse the already computed GI cache files for several projects (or one big project split into several smaller projects).

Drawbacks

  • You will have to upload and render two projects on the RANCH (instead of one with the method described in 3.2).
  • The final rendering will be slightly slower as several GI files will have to be fetched on the fly across the network for each frame to render.

First project: GI cache generation (Prepass)

When you prepare this first project, you must go to the render options, click on the GI Settings button: terragen_9

Then choose the option Write to GI cache file: terragen_10

Note that the RANCH will force the output name of the GI files to gicache_%04d.gic, whatever the name you enter here (in order to easily find them for the rendering phase).

The RANCH supports the 'sparse cache' technique, which gives the best image quality. You just have to configure your scene to generate a GI cache every nth frame (every 5 or 10 frames for instance) by entering this value in the 'Sequence step' field of the “Sequence/Output” tab: terragen_11

Second project: Rendering

For the rendering project, select the Read GI cache file(s) option instead, choose Blend mode Interpolate (for animation) and then the Number of files to blend: values of 3 or 5 are generally sufficient to achieve a very good image quality with the 'sparse cache' technique. terragen_12

Note that, for a Rendering project, the “Sequence step” parameter is always forced to 1 by the RANCH (it is not possible to use a frame increment greater than 1).

Then - very important - create a text file called ranch_prepass.txt. This file must contain a single line: the ID number of the RANCH project used to generate the GI cache files. For instance if the first project ID was 12345, then your ranch_prepass.txt should be: terragen_13

Include this file in your project archive, next to the .tgd scene. That way, the automated server will know where to find the GI cache files: terragen_14

You can now prepare your project as indicated in the section about preparing your scene.

terragen/global-illumination.txt · Last modified: 2017/07/21 10:35 by ranchadmin