Inspired 3D: Lighting and Compositing: Dead Give-Aways: Real World Vs. the CG World — Part 1
Efficiency
Simple Tests
Shifting to High-Resolution
A good practice is to render the entire image as a base starting point, and save a copy of that image to disk. Then focus on a particular, representative area of the CG element and do test renders of only a very small portion of the entire image. Different software packages have different names for this render option and in Maya it is called a render region. An area can be selected simply by dragging a rectangle with the mouse, and then only the area defined by that rectangle is rendered. This saves a tremendous amount of time, but be wary of spending too much time making changes with a small area of the image as your visual feedback.
Lighting adjustments can cause unforeseen or unwanted results in other areas of the frame, so be sure to occasionally test the entire frame to ensure the desired look for the image.
Shadow Time-Savers
Another timesaving method for use with depth map shadows is rendering the shadow buffers once, and then reusing them over and over again. Most software packages offer the option to save the shadow buffers and use them over again the next time the image is rendered. With the shadow buffers created ahead of time, the render process is sped up considerably. Only use this technique if the lights are in their final position, because moving the lights means new shadow maps must be rendered. Also, if the shadow buffers are rendered and saved to disk before the final render is completed, image manipulation can be performed on those frames. An additional shadow can be added, for example. This brings up a good point on efficiency when dealing with rendered sequences of frames. With an adjustment such as the one just mentioned, in which a sequence of frames needs to be adjusted and overwritten, it is good practice to make a copy of the original sequence first.
Saving Versions
The lighting workflow can be optimized within any system, regardless of the techniques chosen. Prioritization is the first step because every shot tends to have more tasks and details than accounted for in the production schedule. Each shot is a set of visual layers and each layer needs to be prioritized. In terms of lighting, this means breaking down the contributions and deciding how much time can be spent on each. One possibility is to render each light separately, and control their relative levels in the compositing stage. Another approach is to separate the computer graphics elements into components, such as fill, bounce, and specular, which can also be combined in the composite stage. The choice is up to the artists personal preferences, but each requires starting simple and building on a base.
In the early lighting stages, many simple tests are more valuable than a single complex test. With the minimum number of lights to provide a general idea of the lighting scheme, many tests can be done on variations of the light positions, intensities, and colors. If the subject of the scene is an extremely complex CG model, the initial testing phase should be done on a simplified version (a proxy model) or stand-in object such as a deformed sphere. The size of these renders also plays a large role in the speed, because a render of one-half the resolution in pixels takes about one-quarter the time to render (not including render overhead such as file access times). Other factors in the speed are the render quality and optimization controls such as the number of samples or the shading rate. Samples refer to the number of samples used in anti-aliasing. More samples usually produce better quality, but other factors can affect this. The shading rate defines how fine an area is sampled to select the color for a pixel; a smaller sampling area produces better quality and a longer render time (see the Rendering section in Chapter 9: Computer Representations of Lights and Surfaces).
After the basics are established, it is time to move on to the high-resolution model and incorporate the lighting details. To judge the CG elements properly, the shading quality options need to be set close to their final values. The resolution also needs to be set to a reasonable size, because many of the details to be fine-tuned are not evident at lower resolutions. Once all the settings are established for a high-resolution image, the render time per frame of the tests is much longer. As stated earlier, doubling the pixel resolution quadruples the render time, and increasing any quality option parameters lengthens the render further. This makes it difficult and impractical to render an entire image each time a light is tweaked.
Shadows are discussed in more detail later in this chapter, but it is necessary to introduce a timesaving device with regards to shadow maps. The creation of depth map shadows can take a tremendous amount of rendering time. For each frame of a shot, the scene must be rendered once from the view of each light utilizing depth map shadows. Larger depth maps yield sharper resolution in the shadow but take more time to render. Start off with small maps, probably 512 pixels square, and see how the image looks. Most likely the shadow buffer (another term for shadow depth map) size will need to be increased, but the goal is to use the smallest size you can get away with. Depending on the renderer, low-resolution shadow maps may produce a desirable, soft shadow, or an undesirable, jagged shadow. Experimentation is important to understanding and optimizing this process.
On the subject of saving frames, it is useful to save as many frames as possible during the progression of lighting a shot. Systems administrators and producers will hate me for saying this, but save as many images online as you can get away with. Images take up a great deal of disk space, but they are both the end result and the only true documentation of the incremental steps along the way. Supervisors and directors frequently ask to see previous versions, and sifting back through videotapes of the shots history may not provide the necessary information. Images saved online also offer the opportunity to compare earlier and newer images side by side on the monitor. This can offer the lighting artist a great indication of progress, and can frequently help him spot areas that may have gotten worse instead of better. In addition to images, save as many versions of the lighting files as possible, with careful notes identifying the changes to each file. It is important to have a direct reference between images and lighting files, so make sure also that the file names for the images clearly link them with the lighting file which produced them. Any shot shown in dailies or to a supervisor should be kept track of because many times a director or supervisor asks to go back to something from several days or even several weeks ago. With careful notes and versioning, reproducing earlier lighting takes is a simple task.























Post new comment