ATEC 4371.001 Procedural Animation

ATEC 4371.001 Procedural Animation

ATCM 6317 Procedural Animation Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa Rendering What is rendering? Rendering algorithms

What is this? [ "fileversion","16.0.504.20", "hasindex",false, "pointcount",1, "vertexcount",1, "primitivecount",1, "info",{ "software":"Houdini 16.0.504.20", "hostname":"ATEC252898", "artist":"mxk047100",

"timetocook":0.000174999999999999998, "date":"2017-10-28 12:13:27", "time":2.91666666666666652, "bounds":[-1,1,-1,1,-1,1], "primcount_summary":" 1 Sphere\n", "attribute_summary":" 1 point attributes:\tP\n" }, "topology",[ "pointref",[ "indices",[0] ] ],

"attributes",[ "pointattributes",[ [ [ "scope","public", "type","numeric", "name","P", "options",{ "type":{ "type":"string", "value":"point" } }

], [ "size",3, "storage","fpreal32", "defaults",[ "size",1, "storage","fpreal64", "values",[0] ], "values",[ "size",3, "storage","fpreal32", "tuples",[[0,0,0]

] ] ] ] ] ], "primitives",[ [ [ "type","Sphere" ], [ "vertex",0,

"transform",[1,0,0,0,0,-1,0,1,0] ] ] ] ] It is [ "fileversion","16.0.504.20", "hasindex",false, "pointcount",1,

"vertexcount",1, "primitivecount",1, "info",{ "software":"Houdini 16.0.504.20", "hostname":"ATEC252898", "artist":"mxk047100", "timetocook":0.000174999999999999998, "date":"2017-10-28 12:13:27", "time":2.91666666666666652, "bounds":[-1,1,-1,1,-1,1], "primcount_summary":" 1 Sphere\n", "attribute_summary":" 1 point attributes:\tP\n"

}, "topology",[ "pointref",[ "indices",[0] ] ], "attributes",[ "pointattributes",[ [ [ "scope","public", "type","numeric", "name","P",

"options",{ "type":{ "type":"string", "value":"point" } } ], [ "size",3, "storage","fpreal32", "defaults",[ "size",1, "storage","fpreal64",

"values",[0] ], "values",[ "size",3, "storage","fpreal32", "tuples",[[0,0,0] ] ] ] ] ] ], "primitives",[

[ [ "type","Sphere" ], [ "vertex",0, "transform",[1,0,0,0,0,-1,0,1,0] ] ] ] ] Rendering

The process of converting the abstract representations of geometric entities into the appropriate color values in an image. "fileversion","16.0.504.20", "hasindex",false, "pointcount",1, "vertexcount",1, "primitivecount",1, "info",{

"software":"Houdini 16.0.504.20", "hostname":"ATEC252898", "artist":"mxk047100", "timetocook":0.000174999999999999998, "date":"2017-10-28 12:13:27", "time":2.91666666666666652, "bounds":[-1,1,-1,1,-1,1], "primcount_summary":" 1 Sphere\n", "attribute_summary":" 1 point attributes:\tP\n" }, "topology",[

"pointref",[ "indices",[0] ] Rendering algorithms Scanline (1970) Z-buffer (1974) Depth map shadow (1978) Ray-tracing (1980) REYES (1987) Photon mapping (1995)

Physically based rendering (1994) Why do we need to know how rendering algorithms work? Because we understand better: when to use which renderer which parameters are needed how to use them effectively Scanlines and pixels Any digital image is composed of a 2D

grid of pixels. Scanline is each row of pixels. Scanline Scanline Scanline is traced one by one by an electron beam to heat up phosphor of a cathode ray tube display. Scanline algorithm

looks at each pixel, one after the other, scanline by scanline, and calculates the color that pixel should be rendered. Scanline algorithm The

color of each pixel is computed using: the color and other surface characteristics of the surface visible from the camera (i.e, the surface closest to the camera), the lights in the scene, and the position of the camera.

Scanline algorithm If the surface closest to the camera is transparent, the color of the pixel is computed using the surface characteristics of the next closest surface as well. With the scanline algorithm, light is never refracted. Scanline algorithm

Fast One of the most commonly used rendering algorithm Z-buffer algorithm Z-buffer (depth buffer) stores the closet distance between the camera and the nearest surface at each pixel.

Z-buffer algorithm To render a point P on a surface, the distance D between the camera and P is compared with the value Z in the z-buffer. If D <= Z, P is rendered if D > Z, P is not rendered. Z-buffer algorithm Implemented

in hardware, e.g. computers and mobile phones. Z-buffer (depth buffer) is used in postprocessing for depth of field, fog, composite, etc. Depth map shadow Prior to rendering an image from the camera view, a shadow map is rendered from the viewpoint of a light source that casts shadows.

Shadow map contains, at each pixel, the distance between the light source and the nearest surface. Depth map shadow When a point P on a surface is rendered

from the camera view, the distance D between the light and P is compared with the distance Z in the depth map. If D > Z, P is in a shadow. If D = Z, P is not. Z Depth map shadow Needs a sufficient map size.

Ray-tracing traces the origins of the imaginary light ray that arrives the camera through each pixel in the image plane. Ray-tracing To

achieve this, a ray is cast back into the object space to determine whether the ray was absorbed or reflected by a surface, refracted by a transmissive medium, or originated directly from a light source. Ray-tracing The path of a ray may be divided into two when part of

light is reflected by a surface while another part travels through the surface. Ray-tracing good at reflection, refraction and shadows. more time-consuming than scanline rendering or z-buffer rendering. Ray-tracing

Scanline Ray-tracing Limit the number of times that a ray can be reflect. Find the minimum pixel samples that produce acceptable results. Ray-traced shadows can

be from transparent colored surfaces can have soft-edges Ray-traced shadows Depth map shadows Ray-traced shadows more

time consuming than depth map shadows. REYES Render Everything You Ever Saw 1. 2. 3. 4. All geometries are subdivided into micropolygons. Micropolygons are shaded at vertices.

Invisible micropolygons are thrown away. Visible micropolygons are sampled to produce a final image. REYES Render Everything You Ever Saw Developed by Pixar for Renderman. Micropolygon rendering in Houdini. Renders displacement mapping, motion blur and depth of field fast. Can be used with ray-tracing and PBR.

Direct vs. indirect illumination Direct illumination occurs when a light source directly illuminates objects in a scene. Indirect illumination occurs when the light that is reflected or transmitted by objects illuminates other objects.

Global illumination Global Illumination is the technique used to simulate indirect illumination. Photon mapping is one of global Illumination methods. Photon mapping is a two-pass rendering algorithm that deals with both diffuse and specular reflections. Photon

Photons light. are particles which transmit Photon mapping: 1st pass In the first pass, photons are shot from the light into the scene. Photons are bounced around interacting with all surfaces that they encounter.

Photon mapping: 1st pass Photons are stored in a photon map for later use. Only a few thousands to a million photons are sparsely stored. An estimate of the illumination at each photon is statistically computed. Photon mapping: 2nd pass

In the second pass, the direct illumination is computed like ray-tracing and the indirect illumination is computed from querying the stored photons in the photon map. Photon mapping Photon mapping shoots photons from the light and tracks their distribution in

the scene. It is more accurate than final gathering. Photon mapping Direct illumination only Indirect illumination created By photon map Photon map Direct + indirect illumination

Photon map rendering in Houdini Create Indirect Light object node (GI light) in the top level to use photon map rendering. Physically based rendering (PBR) follows

the physical behavior of light and surfaces as closely as possible. incorporates ray-tracing, photonmapping, and other methods. Physically based rendering (PBR) Fresnel Energy L conservation: Ld + Ks <= Incoming

PBR: Fresnel describes the behavior of light reflected by a surface with reflectivity that changes depending on the viewing angle. PBR: Fresnel brighter reflections near the edges.

PBR: Energy conservation The outgoing energy cannot be greater than the incoming energy. Diffuse reflection + specular reflection <= incoming light in other rendering algorithms Diffuse reflection and specular reflection

are independently controlled. Diffuse reflection + specular reflection > incoming light is possible. PBR: Energy conservation In PBR, the energy conservation law is enforced.

Recently Viewed Presentations