Project 1 - Compositing Light and Shadow
Project Objective:
Through the use of creating elements in 3D, you will learn how to control CG lighting through the use of light and shadow passes with compositing techniques. You will learn how to render 3D elements in layer passes. You will also learn methods on managing elements and naming elements. Your first object is a grey ball that should match the one that is photographed. You will also create an additional object that will represent an item from the real world that has more complex shading such as an orange, soccer ball, or other round object. CG objects will roll through the space and will experience a change in lighting that matches that of the background element. Integration is essential.
Process:
Photography:
The first step of this project is to take a series of photos of a place with unique light and shadows. The goal is to make the photos interesting and have a clear focus on the composition of light and shadow. The real object should take up 25% of the pixels on screen, and the object will need to interact with the environment by casting shadows and reflecting
In order to provide objects to use as reference in the photos, I used a Light Integration Kit which includes: a wooden cube with square edges, a grey or white sphere, and a chrome sphere.
In the end there should be a set of atleast 14 photos:
(1) Image of a clean plate of the scene with light and shadows
(1) Image of a shadow plate with the scene in all shadow
(1) Image of the wood cube
(1) Image of the grey/white sphere in light
(1) Image of the grey/white sphere in shadow
(1) Image of the chrome sphere
(1) Image of the chrome sphere zoomed in
(7) Images of the chrome sphere zoomed in at 7 different exposure levels
My Photos:
F Number: 32
Exposture Time: 1/125
Camera: Canon EOS 5D Mark III
Image Size: 5760 × 3840
Color Space: RGB
Focal Length: 124
Chrome sphere at 7 different exposure levels:
Set Up The Scene:
The first step in setting up my scene was to change the units in Maya to inches. Next, I looked at the image resolution of the images I took, which is 5760 × 3840. Since that is really big, I scaled it down, by a multiple of the original resolution, to 1080 x 610, for now. I then created a new camera to work with and named it “RenderCam”. Under the camera settings I changed Focal Length to match that of my photos: 124.
Next, under the RenderCam settings, I inserted an image plane the wood cube. I then created a cube that was approximately the same size as the cube in the photo: 6” x 6” x 6”. This allowed me to position my camera by moving it around until my cube lined up with that of the cube in my photo.
Next, I switched out the photo of the cube and put in the photo of the grey sphere on the image plane under the RenderCam. I then created a sphere that was approximately the same size of that in the photo: 3.6” x 3.6” x 3.6”. When taking the photo of the grey sphere, I had placed it on top of a bottle cap to keep it in place. So in Maya I need to move the sphere up just a little bit, to account for the size of the bottle cap.
Lighting:
After inserting the image of the grey sphere and making the sure the camera still matches, I can create a Keylight and work on matching the lighting in my scene to that of the image. By paying attention to the location and softness of the shadow from the grey sphere and the specular highlights on it, I can move the Keylight around until it matches.
The next step is to prepare my 7 images at different exposure levels of the chrome ball, in order to use it as a fill light.
In Photoshop I went to File -> Automate -> Merge to HDR Pro:
A small window opens, where I select the 7 Images of the chrome ball and then hit OK.
A second window opens, and I selected Remove Ghosts, and 32-Bit Mode.
The last step is to crop the image of the HDR to the edges of the chrome ball, and then save it as a Radiance or .HDR.
Next, I created a sphere and made it large enough to fit the entire scene inside of it and named it WorldDome.
Once the sphere is created, under the Mesh tab (the second tab on the attribute editor), I went to the Arnold Settings and turned OFF Primary Visibility and Cast Shadows. Next, I assigned a new material and chose a Maya Surface Shader. Under the Surface Shader Attributes, I selected the checkerboard next to the “Out Color”, and then right clicked on the “File” option, and selected “Create As Projection”. Under the projection tab I changed the Projection Type to “Ball,” and then uploaded the image of my cropped chrome sphere.
When I render the sphere again, I now have a fill light.
The next step is to create the ground plane for the scene. This process is very similar to how I created the dome in the previous step. I created a ground plane that was large enough to fill the screen. Under the Mesh tab (the second tab on the attribute editor), I went to the Arnold Settings and turned OFF Primary Visibility. Next, I assigned a new material and chose a Maya Surface Shader. Under the Surface Shader Attributes, I selected the checkerboard next to the “Out Color”, and then right clicked on the “File” option, and selected “Create As Projection”. Under the project tab I changed the Projection Type to “Perspective,” and then went to the Camera Project Attributes. For Link to Camera I connected my “RenderCam”, and I changed the Fill Type to “Match Camera Resolution”. Lastly, I uploaded the image of my clean plate.
This process allows me to create the bounce light and color from the ground up onto the object.
Render Layers:
The next step is to set up separate render layers in order to be able to composite everything together in Nuke. I created the following render layers:
Soccer Ball Beauty
Soccer Ball Shadow
Soccer Ball Ground Occlusion
Soccer Ball Object Occlusion
Soccer Ball Shadow Prep
Soccer Ball Shadow Projection
Soccer Ball Shadow Bounce
Each render layer needs to be set up in a specific way for compositing purposes.
Beauty Layer:
CG Object
Key Light
Fill Light
Ground Plane:
Projection of Background Plate Image
Primary Visibility Turned Off
Shadow Layer
CG Object:
Primary Visibility Turned Off
Key Light
Ground Plane:
Ai Shadow Matte Shader
Primary Visibility Turned On
Ground Occlusion Layer
CG Object
Primary Visibility Turned Off
Ground Plane:
Ai Ambient Occlusion Shader (Black and White Values Switched)
Primary Visibility Turned Off
Object Occlusion Layer
CG Object
Ai Ambient Occlusion Shader (Black and White Values Switched)
Primary Visibility Turned Off
Ground Plane:
Primary Visibility Turned Off
Shadow Bounce Layer
CG Object
Chrome Material
Ground Plane:
Ai Shadow Matte Shader
Primary Visibility Turned Off
Shadow Prep Layer
Ground Plane:
Projection of the Shadow Prep Image.
In order to create the Shadow Prep layer a few things needed to be created first. The first step was to take the clean plate from the photography set, put it in grey-scale, and then adjust the grade until the areas not in shadow were black, and the shadows areas were white. I also needed to to paint out lines from cracks in the concrete, and clean up some of the softer shadow lines.
Shadow Projection Layer
CG Object
Shadow Projection from Sun
Ground Plane:
Shadow Projection from Sun
Primary Visibility Turned Off
When using these renders in Nuke, this was my first time breaking out different layers and using those to adjust elements of the image. This project broke out the specular and diffuse passes and adjusted them and then merged them all back together.