Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ray tracing for the movie Cars Per Christensen Pixar Animation Studios Ayia Napa Seminar, June 2006.

Similar presentations


Presentation on theme: "Ray tracing for the movie Cars Per Christensen Pixar Animation Studios Ayia Napa Seminar, June 2006."— Presentation transcript:

1 Ray tracing for the movie Cars Per Christensen Pixar Animation Studios Ayia Napa Seminar, June 2006

2 Cars challenges Animation: cars that move, talk, thinkAnimation: cars that move, talk, think Rendering:Rendering: –geometric complexity –ray tracing: reflections, shadows, ambient occlusion

3 Overview Why ray tracing?Why ray tracing? How to deal with overwhelming complexity?How to deal with overwhelming complexity? ExamplesExamples

4 Why ray tracing for Cars? All previous Pixar movies were rendered with scanline rendering (shadow maps, reflection maps, …)All previous Pixar movies were rendered with scanline rendering (shadow maps, reflection maps, …) But cars are very shiny + reflective!But cars are very shiny + reflective! Shadows; ambient occlusionShadows; ambient occlusion We were adding ray tracing to RenderMan anywayWe were adding ray tracing to RenderMan anyway

5 Why ray tracing? Environment map Ray-traced reflections

6 Why ray tracing? Ray-traced shadows (shadow maps hard)

7 Why ray tracing? Ambient occlusion

8 Ray tracing effects: summary mirror reflection sharp shadow soft shadow self inter- reflection

9 Ray tracing is easy – or is it? Yes – but only if the scene fits in memory!Yes – but only if the scene fits in memory! Further complications:Further complications: –Displacement shaders –Motion blur –…

10 Typical scene at Pixar 100s of lights100s of lights 1,000s of textures – too many to fit in mem!1,000s of textures – too many to fit in mem! 10,000s of objects10,000s of objects 100,000,000s of polygons – too many to fit!100,000,000s of polygons – too many to fit! Shaders with 10,000s lines of codeShaders with 10,000s lines of code

11 Rendering requirements Render at hi-res (~2000 pixels)Render at hi-res (~2000 pixels) Motion blurMotion blur Depth of fieldDepth of field No spatial or temporal aliasing (staircase effects, crawlies, popping, …)No spatial or temporal aliasing (staircase effects, crawlies, popping, …)

12 Scanline rendering (Reyes) Advantages:Advantages: –Fast –One image tile at a time: only needs small fraction of objects+textures –Can deal with very complex scenes Limitations:Limitations: –Shadow maps (limited resolution) –Reflection maps (no interreflections)

13 Ray tracing Advantages:Advantages: –Interreflections –Fine shadow details –Ambient occlusion Disadvantage: rays fly all over the sceneDisadvantage: rays fly all over the scene –Needs all objects+textures all the time –Can not deal with very complex scenes

14 Goal: best of both Ray tracingRay tracing Very complex scenes (as scanline)Very complex scenes (as scanline) So: augment RenderMans Reyes scanline with ray tracingSo: augment RenderMans Reyes scanline with ray tracing

15 Main question Some rays fly all overSome rays fly all over Some rays require high geometric / texture precisionSome rays require high geometric / texture precision But not all rays fly all over and require high precision!But not all rays fly all over and require high precision! Which rays require which precision?Which rays require which precision?

16 Ray differentials to the rescue Keep track of differences between neighbor raysKeep track of differences between neighbor rays Trace rays; each ray represents a beam [Igehy 1999]Trace rays; each ray represents a beam [Igehy 1999]

17 Ray differentials and ray beam ray ray beam neighbor rays Narrow ray: ray beam cross-section is smallNarrow ray: ray beam cross-section is small Wide ray: ray beam cross-section is largeWide ray: ray beam cross-section is large

18 Ray differentials: use Ray differentials tell us: Required tessellation rate of geometryRequired tessellation rate of geometry –Quad sizes ~ ray beam cross-section Required texture resolutionRequired texture resolution –Pixel sizes ~ ray beam projected onto surface

19 Multi-resolution geometry cache Split objects into patches (as usual)Split objects into patches (as usual) Tessellate each patch on demandTessellate each patch on demand Use ray width to determine which tessellation to use:Use ray width to determine which tessellation to use: 1 quad 4x4 quads 16x16 quads

20 Multi-resolution geometry cache Store tessellation in coarse, medium, or fine sub-cacheStore tessellation in coarse, medium, or fine sub-cache Same size (e.g. 10MB) but different capacitySame size (e.g. 10MB) but different capacity Coherent lookups in medium + fine sub-cacheCoherent lookups in medium + fine sub-cache Result: can render scenes 100 x larger than cache size !Result: can render scenes 100 x larger than cache size !

21 Example: parking lot 15 cars; 240M quads; 80M rays

22 Parking lot: cache stats 1 billion geometry cache lookups1 billion geometry cache lookups No cache: run time > 4 daysNo cache: run time > 4 days Single-resolution cache:Single-resolution cache: –hit rate 97.7% –run time: 11 hours Multi-resolution cache:Multi-resolution cache: –hit rate 99.9% –run time: 6 hours

23 Example: 94 dragons mirror reflection sharp shadows texturesdisplacements

24 94 dragons: cache stats 18 million geometry cache lookups18 million geometry cache lookups 3MB multi-res. cache performs well – less than 1/200 of the fully tessellated scene3MB multi-res. cache performs well – less than 1/200 of the fully tessellated scene Single-res. vs. multi-res. geometry cache:Single-res. vs. multi-res. geometry cache: –1MB multi-res. cache beats 100MB single-res. cache (#recomputed vertices)

25 Final car images …

26

27

28

29 More information … Book: Advanced RenderManBook: Advanced RenderMan Ray differentials and multiresolution geometry caching for distribution ray tracing in complex scenes, Eurographics 2003Ray differentials and multiresolution geometry caching for distribution ray tracing in complex scenes, Eurographics 2003

30 Conclusion (part 1) Use multi-resolution geometry cacheUse multi-resolution geometry cache Use multi-resolution texture cacheUse multi-resolution texture cache Use ray differentials to select resolutionUse ray differentials to select resolution

31 Conclusion (part 2) Result: Can now ray trace production scenes – same complexity as scanline !Result: Can now ray trace production scenes – same complexity as scanline ! Was used extensively in the rendering of Cars movieWas used extensively in the rendering of Cars movie Also used by other studiosAlso used by other studios

32 Acknowledgments Thanks to: Pixar + RenderMan teamPixar + RenderMan team You for listeningYou for listening

33 Questions?

34


Download ppt "Ray tracing for the movie Cars Per Christensen Pixar Animation Studios Ayia Napa Seminar, June 2006."

Similar presentations


Ads by Google