Abstract:
A color and lighting method and model for computer graphics productions that automates most of the lighting and compositing processes, creates a light rig that works for at least most of the shots in a given sequence, and allows multiple shots to be run simultaneously without manual interaction.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]     This application claims the benefit of U.S. Provisional Application No. 60/600,037 filed on Aug. 10, 2004, the content of which is expressly incorporated herein by reference in its entirety. 
     
    
     FIELD OF THE INVENTION  
       [0002]     The present invention relates generally to computer graphics productions and, more particularly, to color and lighting models within a computer graphics production.  
       BACKGROUND OF THE INVENTION  
       [0003]     Computer graphics (CG) has become an important, if not an integral, part of today&#39;s filmmaking process. For example, performances that cannot be or are too dangerous to be accomplished by human actors or stunt doubles are made possible by using CG visual effects. Similarly, CG effects can make fairytale characters and imaginary worlds seem realistic. In fact, it has been said that CG or, more specifically, three-dimensional CG (3D-CG) has made everything possible in a visual production and is only limited by one&#39;s imagination.  
         [0004]     In the animation genre of filmmaking, 3D-CG has prevailingly overtaken the traditional 2D cell animation. In general, a CG production crew goes through the following six steps to produce colored images:  
         [0005]     1) Shot Directory Setup  
         [0006]     A “shot” is a segment of a film, normally from the time the camera starts to roll until it is “cut” to set up another camera angle. In this first step, a shot structure is created and generic environment files (e.g., files that are required to have a working digital directory to properly run a shot) are copied over. This step is very mechanical and is the same for every shot.  
         [0007]     2) Generate Geometry  
         [0008]     Before an image can be generated by 3D-CG, the mathematical representation of the 3D geometric models need to be created that represent the objects being rendered into the image. Most studios have their own file format; some pre-bake (i.e., pre-generate) their geometry files, and some evaluate them on-the-fly as the image is being rendered. Whatever the case may be, the process is the same for every shot. The only difference is the digital source file that is used to determine the particular geometry that is present in the scene.  
         [0009]     3) Generate Lighting Files  
         [0010]     The term “lighting”, sometimes referred to as “color and lighting”, in a CG production generally means the positioning of CG lights in a CG scene, together with 3D geometry, materials and shaders, to render out colored images (generally called CGI, or computer generated imagery).  
         [0011]     This step includes generating digital files that contain information about the CG lights, materials and shaders for the geometry from Step 2, the relationships between the lights and the geometry, and any other information that is necessary to produce the final colored images. This is perhaps the most labor intensive step of a CG pipeline.  
         [0012]     4) Rendering Images  
         [0013]     Rendering is the process that generates a two-dimensional image, or series of images, from a specific view of a three-dimensional scene. In this step, the digital files created in step 3 are sent to a computer or computers equipped with rendering software to render out images.  
         [0014]     5) Compositing  
         [0015]     In most film productions, a CG scene is rendered out in different layers of images, e.g., foreground and background images. Compositing is a process in which these layers of images are put together in the order that is meant to be seen by the camera, so that one piece of geometry appears to be in front of, or behind, another. Often, there are color corrections, pixel manipulations, and other operations performed on the different layers of images to give the desired effect(s).  
         [0016]     In this process, one or more compositing scripts are generated to composite the images rendered from Step 4. A “script” as used herein means a set of computer programming commands written in a text format.  
         [0017]     6) Make Movie Files for the Shots  
         [0018]     Most film studios now make compressed movie files for every shot. This process strings together all the composite images from Step 5 in a compressed format to facilitate playing back the shot at real time. Normally, the movie files also contain audio information.  
         [0019]     The above six steps are repeated for every shot, and usually for numerous times, to produce the final desired images. As stated, creating the lighting files in Step 3 above is often the most time-consuming and requires the most hands-on work in a lighting/compositing pipeline. This is because the lighting artists need to place the CG lights for each shot in such a way that, in addition to creating a desired look for a particular shot, all related shots appear homogenous so that the transition from one shot to another would appear seamless.  
         [0020]     Normally, a film is strategically broken down into different sequences to facilitate the production. Shots for each sequence are normally taken from the same location and, thus, contain similar contents.  
         [0021]     Most studios have adopted a method in which one or a few shots are selected as key shots for a given sequence. Before the lighting production of the sequence begins, digital lighting files for the key shots are generated first by more experienced artists. Once completed and approved, the key shots are used as visual references for the remaining shots of the sequence. In other words, the lighting files (i.e., light rigs) from the key shots are commonly used as a starting point for the less experienced lighting artists to generate the lighting for their shots.  
         [0022]     The problem with this method is that propagating light rigs from key shots often does not work. This is because a key shot does not reveal everything that is in the sequence. Thus, the CG lights that are set up to work locally for the key shot do not necessarily cover everything in the whole sequence. Other times, the lights set up to work for a particular camera angle may not work as well for shots that have the camera looking from another angle. This problem is especially prevalent when the CG environment is big.  
         [0023]     When a light rig that does not work is propagated, it often creates more problems for the artists instead of saving time. Because most artists work differently and think differently, it is often difficult for one artist to decipher another artist&#39;s set up to make the lights work for a different shot. Ironically, when this happens, it is often faster and better for the second artist to start from scratch and just match visually to the approved key shots rather than using a light rig.  
         [0024]     Even when using a light rig that, to a certain degree, works, the resulting first take (i.e., the first time a particular shot is run) is often still very far off from the desired finished look.  
         [0025]     Therefore, there is a need for a more efficient lighting/compositing pipeline that would eliminate the flaws of the current use of light rigs and the repetitive manual labor in the six general steps discussed above. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0026]     The foregoing and other objects, aspects and advantages will be better understood from the following description of a preferred embodiment in accordance with the present invention with reference to the accompanying drawings, in which like numerals reference like elements, and wherein:  
         [0027]      FIG. 1  is a diagram in accordance with the present invention;  
         [0028]      FIG. 2  is a diagram of an embodiment of the present invention;  
         [0029]      FIG. 3  is a diagram of an embodiment of the present invention. 
     
    
     SUMMARY OF THE INVENTION  
       [0030]     It is an object of the present invention to provide a lighting/compositing pipeline that automates most of the shot setup process that is normally done by hand.  
         [0031]     It is another object of the subject invention to provide a lighting model that can be used to setup light rigs that work for most of the shots in a sequence.  
         [0032]     It is a further object of the present invention to provide an automated lighting and compositing pipeline that allows multiple shots to be run simultaneously without manually opening up any interactive lighting or compositing tools, and the number of shots that can be run simultaneously is only limited by the power of the computers dedicated to rendering images (e.g., a rendering farm).  
         [0033]     It is still another object of the present invention to provide an automated lighting and compositing pipeline that allows an artist to take on several shots at a time without much additional stress.  
         [0034]     It is still a further object of the subject invention to provide a lighting model that can produce first takes that are  70  to  90  percent complete from the finished look.  
       DETAILED DESCRIPTION OF THE INVENTION  
       [0035]     The present invention is directed to methods and systems for creating a more efficient lighting and compositing pipeline for a CG production.  
         [0036]     In recent years, ambient occlusion, i.e., exposure mapping, has become increasingly more popular in the world of three-dimensional computer graphics (3D-CG). Ambient occlusion is a technique that imitates the ambient, or non-directional, lighting where the surfaces in a 3D-CG world are uniformly illuminated by a theoretical hemisphere, or dome, that encloses this 3D-CG world. The uniform lighting that hits each surface in the 3D-CG world is occluded, or attenuated, by the proximity of other surfaces.  
         [0037]     The result of using ambient occlusion is that the images created contain natural-looking soft shadows where the corners of a room, for instance, are gradually darker than the floor or the ceiling near the center of the room. In other words, the computer graphics (CG) images produced by using ambient occlusion emulate those in the real world.  
         [0038]     Ambient occlusion is widely applied by baking (pre-calculating) the exposure maps directly into the texture maps (i.e., the maps that provide the basic color and texture information for a given surface in 3D-CG) of the surfaces of the CG objects. This is often done by pre-multiplying the values in the texture maps by the values in the exposure maps. The result is that for areas where an exposure map is bright (e.g., close to  1 ), the returned value for the texture map is close to its original value. For the parts where the exposure map is dark (e.g., close to  0 ), the returned value for the texture map is dimmed, which simulates shadows. This is not very flexible because whenever the surfaces are illuminated, the effect of ambient occlusion is already there. Some dark corners or niches may never be illuminated bright enough for the artistic needs of the picture.  
         [0039]     A lighting model in accordance with the present invention, however, puts an “ON/OFF” switch for the exposure maps into CG lights instead of “baking” them directly into the texture maps. By doing so, it gives an artist the flexibility to turn the effect of the exposure maps on and off at will. Thus, the exposure maps are applied only when desired. For example, if a place is too dim in the scene, an artist can easily use a light that is not attenuated by the exposure maps to illuminate where more light is needed.  
         [0040]     When ambient occlusion is used with “non-shadowing” directional lights, it becomes a great way to produce fill lights (as opposed to a “key” light, or a “rim” light) without conflicting shadows, while retaining the flexibility of directing the lighting.  
         [0041]     More specifically, the present invention teaches a lighting model that can be applied to any CG environment once the ambient occlusion data are calculated for every surface in the CG environment.  
         [0042]     In a preferred embodiment, this is done by first defining a 3D-CG environment that encloses all objects of interest (e.g., all objects in a sequence). The ambient occlusion data are calculated for the objects, and a computer software is used to calculate the center point of this 3D-CG environment.  
         [0043]     Using ambient occlusion with directional lights, which is discussed in further detail below, the 3D-CG environment can be easily lit by flooding it with lights from all directions without creating conflicting shadows. For mathematical simplicity, an imaginary cube can be calculated to enclose the environment. Using this imaginary lighting cube, lights from “all directions” into the environment can thus be simplified down to 6 directions (i.e., the 6 directions orthogonal to the 6 sides of a cube) as shown in  FIG. 1 .  
         [0044]     A software can be written to calculate the center point of any 3D-CG environment and create a “bounding box” that encloses the environment. This bounding box can be used as the lighting cube described above.  
         [0045]     Still referring to  FIG. 1 , the designation of the order of the directions is random and is only used for demonstration purposes. For most shot sequences, one CG light per direction is sufficient. This results in 6 fill lights, the positions of which can be calculated automatically by software by using the bounding box and its center point.  
         [0046]     Preferably, at least 1 of the lights has the ambient occlusion turned “ON”. More preferably, 5 of the 6 lights are ambient occluded, non-shadowing directional lights. Most preferably, 4 of the 6 lights are ambient occluded, non-shadowing directional lights. The remaining 2 lights are preferably non-shadowing, traditional lights (CG lights with intensities that are not affected by the exposure maps).  
         [0047]     Not all 6 fill lights are ambient occluded because when all lights are attenuated by exposure maps, some surfaces that are very close together may not receive enough light and would render almost black. Examples of such surfaces include those inside a character&#39;s mouth, the bottom of a plate sitting on top of a table, etc. The non-ambient occluded fill lights (e.g., 2 non-ambient occluded fill lights in the most preferred embodiment) should have low intensities to give some light to those surfaces that have very close proximities to one another. Often, but not always, the 2 regular fill lights come from the top and bottom directions (e.g., directions 5 and 6) of the lighting cube. The positions of the 6 lights are preferably calculated by computer software and are further discussed in Example 1 below.  
         [0048]     In addition to the 6 fill lights, an additional light is preferably used as a key light. This seventh light should be a shadowing, traditional directional light and can come from any direction, depending on the various artistic requirements of a particular sequence and the style of the artist. The intensity of each fill light can, of course, be controlled individually to compliment the key light to produce a realistic sense of light direction in the 3D-CG world.  
         [0049]     The main advantage of a light model in accordance with the present invention is that the basis of the lighting work can be automated. Because the positions of the 6 fill lights and other default parameters such as the number and direction of non-ambient occluded lights and their default intensities can be preset and calculated by computer software, all that is required of the artist(s) is to position the key light and to balance the intensities of all 7 lights.  
         [0050]     The lighting model disclosed herein provides a solid foundation for lighting in any 3D-CG environment, and can be used as the basis for a lighting rig. The lighting rig, however, should be tested in a “location shot” before propagating to other shots. A location shot, as used herein, is not a real shot in the production, but a shot that contains geometry of all objects in a particular sequence. It also contains a fly-through CG camera that covers all camera angles in that sequence.  
         [0051]     By rendering out this location shot as seen by the fly-through camera, and compositing the images via the fly-through camera, an artist can check how well the basis of the light rig works for every shot in the sequence. In other words, a light rig is tested as the CG camera “flies” through the entire 3D-CG environment. Modifications to the parameters of the lights, if needed, can then be appropriately made. The location shot should be used as a place to thoroughly test the light rig to ensure that it will serve most or all of the shots in the sequence well.  
         [0052]     This is a vast improvement of the traditional way of setting up light rigs from key shots, which cannot ensure that the light rigs will work for other shots in the sequence.  
         [0053]     Thus, the present invention eliminates the shortcomings of the current use of key shots and light rigs generated by the key shots.  
       EXAMPLE 1  
       [0054]     Referring now to  FIG. 2 , in the case of a 3D-CG environment in which the sides of its bounding box or lighting cube are parallel to the 3 axes X, Y and Z, the mathematics and the coordinates of the 8 corners of the bounding box and the center of each of the box&#39;s 6 surfaces can be designated and calculated as follows:  
         [0055]     The maximum and minimum values of the X, Y, and Z axes are denoted as Xmax, Xmin, Ymax, Ymin, Zmax, Zmin, respectively.  
         [0056]     Thus, the coordinates of the 8 corners of the bounding box (randomly designated as A 1 -A 8 ) are:  
         [0057]     A 1  (Xmin, Ymin, Zmin); A 2  (Xmin, Ymax, Zmin);  
         [0058]     A 3  (Xmax, Ymin, Zmin); A 4  (Xmax, Ymax, Zmin);  
         [0059]     A 5  (Xmin, Ymin, Zmax); A 6  (Xmin, Ymax, Zmax);  
         [0060]     A 7  (Xmax, Ymin, Zmax); and A 8  (Xmax, Ymax, Zmax).  
         [0061]     The 6 surface centers C 1 -C 6  are:  
         [0062]     C 1  (Xmin, (Ymin+Ymax)/2, (Zmin+Zmax)/2);  
         [0063]     C 2  (Xmax, (Ymin+Ymax)/2, (Zmin+Zmax)/2);  
         [0064]     C 3  ((Xmin+Xmax)/2, Ymin, (Zmin+Zmax)/2);  
         [0065]     C 4  ((Xmin+Xmax)/2, Ymax, (Zmin+Zmax)/2);  
         [0066]     C 5  ((Xmin+Xmax)/2, (Ymin+Y max)/2, Zmin); and  
         [0067]     C 6  ((Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmin).  
         [0068]     The positions of the 6 fill lights L 1 -L 6  can be:  
         [0069]     L 1  (Xmin−(Zmax−Zmin)/2, (Ymin+Ymax)/2, (Zmin+Zmax)/2);  
         [0070]     L 2  (Xmax+(Zmax−Zmin)/2, (Ymin+Ymax)/2, (Zmin+Zmax)/2);  
         [0071]     L 3  ((Xmin+Xmax)/2, Ymin−(Xmax−Xmin)/2, (Zmin+Zmax)/2);  
         [0072]     L 4  ((Xmin+Xmax)/2, Ymax+(Xmax−Xmin)/2, (Zmin+Zmax)/2);  
         [0073]     L 5  ((Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmin−(Xmax−Xmin)/2);  
         [0074]     L 6  ((Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmax+(Xmax−Xmin)/2).  
         [0075]     The position of each of the 6 fill lights are calculated by simple geometry. Each light is a standard 90-degree cone light. Each light can be seen as to form a 90-degree isosceles triangular cone with the surface that it faces towards. Using Light L 2  as an example and turning to  FIG. 3 :  
         [0076]     Distance “b”=Zmax−Zmin, then,  
         [0077]     Distance “h”=(Zmax−Zmin)/2  
         [0078]     Since C 2  is (Xmax, (Ymin+Ymax)/2, (Zmin+Zmax)/2),  
         [0079]     L 2  is (Xmax+(Zmax−Zmin)/2, (Ymin+Ymax)/2, (Zmin+Zmax)/2).  
         [0080]     In addition to the lighting cube, a lighting and compositing pipeline in accordance with the present invention also uses a wrapping script (e.g., a set of computer programming commands written in a text format) to automate the 6 steps for producing colored images as summarized in the Background section. In other words, because &lt;step 3: generate lighting files&gt; can be automated by the lighting model described above, &lt;Step 5: Compositing&gt; can be done with pre-generated scripts, and because all other steps are the same for every shot, a wrapping script can be written to call forth the relevant files and pre-generated scripts. All an artist has to do is to input into the wrapping script which shot or shots to run and which lighting or compositing files to load in. Therefore, all 6 steps can be run in batch mode on a computer without any hands-on, interactive work.  
         [0081]     Although the invention herein has been described with reference to particular embodiments, it is to be understood that the embodiments are merely illustrative of the principles and application of the present invention. It is therefore to be understood that various modifications may be made to the above mentioned embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims.  
         [0082]     For example, although fill lights from  6  directions are preferred, as described above, fill lights from as few as 3 directions may work sufficiently well because a camera can never see more than  3  sides of an object in a 3D environment. In addition, more than  1  light per direction or other variations can be used in the embodiments described above. Similarly, more than  1  key light may be used in more complicated or larger CG environments. Thus, more or fewer lights and lighting directions can be incorporated based on specific artistic directions to build upon the basic lighting model described above without departing from the spirit and scope of the present invention.  
         [0083]     Furthermore, in accordance with the instant invention and contrary to traditional teachings, not all of the 6 steps for producing CG images would need to be repeated for every single take. For example, after running the first take, the shot directory would not have to be created again. Similarly, if the lighting file works, but the compositing file needs to be modified to change the order of the rendered elements, only Step 5 and Step 6 need to be repeated. As such, a pipeline in accordance with the subject invention provides an efficient way to repeat any number of the process steps for any given number of shots.