Monday, October 17, 2011

VSFX752 - Project 2 - Match To Live

This page will demonstrate the steps i took to complete my "Match to Live" project.

Step 1 :
       First step is to choose a object that you wish to use for the exercise. I chose to match a Weight plate and Dumbbell. Following are some of the pictures i clicked for the exercise.

 Following are some of the things to keep in mind while shooting :
* Make sure you note down the Focal Length of the image once you click the picture. It is also important to know the sensor size of the camera you are using. Most of the camera gives you "Meta Data" of the image. You can look for "35mm equivalent" parameter and directly use that number in the default camera setting in maya. At the end of this page, i also have a link to a page where i explain how to find the correct sensor/film back size for your camera.
*Make sure you have once picture with a grey cube. This will help to align the camera the CG camera in Maya  or any other 3D application. If you dont have a cube, you can also measure the object. Having a picture with grey cube is always better since the object that you are using might be a organic shape.
*Click few pictures of the area where you are shooting. It might help you to place lights in the scene or to model the props in the scene.
*If you are using a reflective object, make sure to click a picture of chrome sphere(light probe).  The reflective probe gives you a reflection map and the position of the lights. Place the light probe exactly on the spot where you had your object and click the picture. Make sure you dont move the camera during this process.
*Additionally you can also click a picture of a diffuse probe to know the color and intensity of the lights in the scene.

Step 2 : Setting up the scene in maya :

*Create a new project and copy all the reference images to the "source images" directory.
*Create a new scene and create a new camera, click on Panels -->  Perspective --> New
*Name the camera appropriately. I named it "camMain". In the attribute editor of your camera scroll down to the "Environment" tab and click on "Create".
*Now browse for the image that has the reference cube in it.


 *Now select the camera and input the camera information. View --> Select Camera.
   Enter the 35MM  equivalent focal length.
   Enter the aspect ratio (Width/Height of the image) In my case 3888/2592 = 1.5
   Since you are using  35MM  equivalent focal length, you can leave the film back settings to default.
*Now enable the "Resolution Gate" for the camera. View --> Camera Settings --> Resolution Gate.
*Go to the Render Setting and change the image size and device aspect ratio.
*Now select the "Image Plane" that you created View-->Image Plane-->Image Plane Attributes-->imagePlane1
*In the attribute editor of the image place, scroll down to placement tab. From the "Fit" drop-down list select "To Size" options and click on "Fit to Resolution Gate" button.

With this we have the completed the basic camera setup.

Step 3 :
*Measure the reference cube in your image and create a cube in maya with same dimensions. In my case it was 4.8x4.8 cm.
*Once the box is created, change the shading to "wireframe on shaded" and turn on "xray" option. This will enable you to see through your object and it makes it very easy to align the CG box to the one in picture.
*Now move/rotate the camera until the CG box aligns to the one in picture. Please dont move the box, it should be left at the origin. Make sure you move only the camera to get the alignment.

 *Now create a ground plane which will used to cast/receive shadows. Once you are satisfied with the alignment, lock the camera so you dont accidentally move the camera.

 *Now select the image plane again and swap it with the actual picture you are going to use. Then bring in the CG duplicate of the object you wish to match and place it next to its real twin. Make sure its put on top of the ground plane you just created.


Step 4 : Adding Lights

*Before adding the lights, if you have painted texture maps for your object, please assign it to the object.
* Now depending on your image add the key light in and turn on "Raytraced Shadows". Render the scene and compare the result with the original picture. Adjust the intensity, color of the light accordingly. Adjust the light position until you get proper shadows. If you are using a spot light, you can adjust the "Light Radius" parameter to get softer shadows.

Step 5 : Creating Reflection Sphere
*Create a polygon sphere in the scene and make it very large. Assign a surface shader to it. Connect a file on its "Out Color" attribute as a "Projection". 

*Load the cropped image of the chrome ball and change the projection type to "Ball". The world sphere setup is done.

Step 6 : Creating Render Layers

*Rendering in layers,  refers to separating out different aspects of the scene, such as diffuse, shadows, highlights, or reflections, each into a separate image. This gives us flexibility to adjust the images using a composting package.

*Diffuse Layer : 
Diffuse pass is the main, full-color rendering of your object, including diffuse illumination, color, and color maps. A diffuse pass will not include reflections, highlights, and shadows, which are usually separate passes. 

    To setup a diffuse layer, click on the "Render" tab which is next to the "Layers" tab in the bottom right side corner of the screen. 
    Once in the "Render Tab" you will see something called "Master Layer". This is the default layer which is created by maya. 
    To create a new layer click on the "create new empty layer" button. Once created, select the object and the lights in the scene and add it to the layer. Ground plane is not required. 
    Right-Click on the layer --> Attributes . Click on the "Presets" button and choose "diffuse" from the list. 


Specular Layer:


*Create a new render layer and add the object, lights and the chrome sphere to it. Right click layer and choose --> Attributes. Click on the "Presets" and change the type to "Specular". In the shader properties of the object, change the diffuse color & ambient color to "0". So when you render this pass, you will see only the highlights.




Shadow Layer:

* Create a new layer and add the object, ground plane and the lights which casts shadows. In the layer's attributes, change the preset to Shadows. Note that the shadow information will be stored in the alpha channel. 


Occlusion Layer :
*Create a new layer and add only the object and the ground plane. In the layer's attributes, change the preset to Occlusion. A new Surface shader will be created and automatically assigned to the object. Note that a "mib_amb_occlusion1" node is connected to the Out Color parameter of the surface shader. Increase the Samples to get a better quality. The Spread decides how soft or strong the contact shadow should be.



Select the object and in the attribute editor go to the shape tab. Scroll down until you find "Render Stats" tab and turn off  "Primary Visibility". Make sure you dont add any lights in this layer.




Now all you have to do is "Batch Render" the images. I will add a tutorial on how to combine the pictures in Nuke. Hope this was useful. Thanks !!

Thursday, September 1, 2011

VSFX 785 Documentation

Week 1 :
Basics of lighting in maya. Went through different types of lights in maya, raytraced shadows, render layers, global illumination, and final gather. Also did a project in which i used raytraced shadows, final gather and global illumination.







Week 2:
Went through the process of matching a cg object to a live action plate. Also did a project on the same.



Week 3:
Went through mood lighting with photographic reference, key to fill ratio, camera animation and also composting. 



 














Week 4 :
Continued to work on mood lighting. Learnt about advanced rendering techniques. Also worked more on composting with nuke.


Week 5 :
Learnt about rendering montion blur, how to fix flickering issue when using final gather, and also about controlling the white and black values in the render.


Week 6 :
Did research on the technical aspects of how the real world camera works, photometry, BRDF and energy conservation. Also started modeling a new scene for practicing mood lighting.


Week 7 :
Finished modeling and started with texturing, and did a basic lighting setup for the scene. Did a lot of research on mental ray architectural shaders. 
Started learning the basics of python & mel programming.
Started designing the layout for my webpage.


Week 8 :
Worked more on texturing and lighting of the scene.
Continued to learn programming.
Using world press blog, created my first website and did the hosting. 



Week 9 :
Started to refine the textures. Concentrated more on the values of whites and blacks in the scene. Also created the water reflection on the ground.
Revisited some of my houdini procedural models. 
Also started creating hdr images for the first time. 


Week 10 :
Worked more on the lighting part of the scene. Created a whole new texture for the building in the back. Mostly worked on getting the proper white and black values using the luminance mode in render view.
Created a  proper final gather emitter to get the blurred reflection on the road. 
Continued to work on my website.





Monday, July 4, 2011

Lighting !!

Traditional 3 Point Lighting With Raytrace Shadows

Wednesday, January 12, 2011

Today's Eye !!


Today's Eye!! :D Same Process, just a different reference !! :D