RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna,...

30
RESEARCH RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ATI: ToyShop ATI: ToyShop Natalya Tatarchuk Natalya Tatarchuk 3D Application Research Group 3D Application Research Group ATI Research ATI Research RESEARCH RESEARCH

Transcript of RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna,...

Page 1: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

ATI: ToyShopATI: ToyShop

Natalya TatarchukNatalya Tatarchuk

3D Application Research Group3D Application Research GroupATI ResearchATI Research

RESEARCHRESEARCH

Page 2: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

OverviewOverview

• ToyShop system overview• Parallax Occlusion Mapping• Rain rendering

– Rendering rain precipitation

– GPU Water effects

– Wet reflections via reflection impostors

• Results• Conclusions

Page 3: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Imitating Reality: Background ResearchImitating Reality: Background Research• We wanted to create a moment in a dark city, downtown, during a rainy

night

• Fortunately, having started on the concept in a middle of October in Boston, we had a lot of opportunities for research

• Gigabytes of videos of rain, droplets, streams, … and here we are:

Rainy night in Boston Rainy night in Toy Shop Town

Page 4: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Demo: ToyShopDemo: ToyShopDemo: ToyShop

Page 5: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Zen and The Art of Shader WritingZen and The Art of Shader Writing• This demo is a study in combination of complex computations with

inexpensive yet effective shaders for a variety of effects

– Perspective-correct extruded surfaces with SM 3.0 parallax occlusion mapping

– Water and raindrop simulation effects

– A variety of post-processing effects for glow, blurry reflections and rain

– Many custom effects for rendering rain

– HDR illumination with lightning and shadows

– Many more…

Page 6: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

ToyShop ConstraintsToyShop Constraints

• Our goal was to fit this demo into 256MB of video memory

• This was a challenge considering the rich complex environment

• In the end we used 240Mb for the entire demo, including:– 54Mb for back / depth buffers and offscreen buffers (many were

101010-2)

– 156Mb for texture memory

– 28Mb for object vertex and index buffers

Page 7: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Rich Detailed Worlds Require Complex ShadersRich Detailed Worlds Require Complex Shaders

• We created ~500 custom unique shaders for ToyShop– >1/2 of those are rain / water / wet surfaces shaders

– ~1/3 draw depth only or render reflections

– ~1/6 relate to post-processing effects

– Particle effect shaders

– We used ~20 various shared include files (reflection / shadow mapping / HDR / math functions / lighting / lightning / etc)

Page 8: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Data and Rendering StatisticsData and Rendering Statistics

• 3Dc+ texture compression was crucial– We went from 478 MB texture memory total to 156Mb

• We used dec3n vertex data format to reduce memory

– Gives 3:1 memory savings

– For vertex normals / tangents / binormals / other data

– Available on ATI Radeon line since Radeon 9700

• A lot of work went into optimization of draw calls: Averaging 250

• Every frame we render 200K – 500K polygons and 0 –22K particles

Page 9: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Parallax Occlusion Mapping versus Normal MappingParallax Occlusion Mapping versus Normal Mapping

Scene rendered with Parallax Occlusion Mapping

Scene rendered with normal mapping

Page 10: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

• Parallax occlusion mapping was used to render extreme high details for various surfaces in the demo– Brick buildings

Surface Details in the ToyShop Demo

Page 11: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

• Parallax occlusion mapping was used to render extreme high details for various surfaces in the demo– Brick buildings

– Wood-block letters for the toy shop sign

Surface Details in the ToyShop Demo

Page 12: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

• Parallax occlusion mapping was used to render extreme high details for various surfaces in the demo– Brick buildings

– Wood-block letters for the toy shop sign

– Cobblestone sidewalk

• Using multiple lighting models– Some just used diffuse lighting

– Others simulated wet materials

– Integrated view-dependent reflections

– Shadow mapping was easily integrated into the materials with parallax occlusion mapped surfaces

• All objects used the level-of-details system

Surface Details in the ToyShop Demo

Page 13: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Parallax Occlusion Mapping Parallax Occlusion Mapping

• Inverse displacement mapping via ray casting in texture space – High precision of height field – ray intersections

• Dynamic real-time lighting of surfaces – With soft shadows due to self-occlusion under varying light

conditions

• Directable level-of-detail control system – Smooth transitions between levels

• Motion parallax simulation with perspective-correct depth

Page 14: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Would Like More Details?Would Like More Details?

• See the paper– Tatarchuk, N. “Dynamic Parallax Occlusion Mapping with

Approximate Soft Shadows”, ACM SIGRAPH Symposium on Interactive 3D Graphics and Games, April 2006.

• Check out DirectX 9.0c SDK sample (April 2006 and later)– Parallax Occlusion Mapping

– www.microsoft.com/directx

Page 15: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

The Challenge of Rendering RainThe Challenge of Rendering Rain

• Rain is difficult!– Creating convincing impression of rain in rich

natural environments is a difficult task

• It is a complex phenomenon– Vast diversity of rain components

– Huge amount of small details

• But - rain rendering greatly enhances outdoor scenes!– Many applications in games and motion

pictures

– Challenging to film and even more so to render at interactive rates

Page 16: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

ComponentsComponents

• Modeling and rendering rain precipitation– Rainfall, raindrops and rain splashes

• Water simulation for puddle rendering– Fluid dynamics– Approximation effects

• Atmospheric effects– Lightning illumination– Fog and multiple scattering effects

• Rain droplets simulation and rendering• Reflections rendering

Page 17: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Rendering Complex Environment: Without RainRendering Complex Environment: Without Rain

Page 18: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Rendering Complex Environment: With RainRendering Complex Environment: With Rain

Page 19: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Novel Algorithms for Rendering Individual Rain EffectsNovel Algorithms for Rendering Individual Rain Effects

Post-Processing Rainfall Algorithm

Simulation and rendering of dripping raindrops

Raindrop splashes

Simulation and rendering of water droplet movement on glass surfaces on the GPU

Page 20: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Novel Algorithms for Rendering Individual Rain EffectsNovel Algorithms for Rendering Individual Rain Effects

Misty objects in the rain(Halos around light

sources and objects due to light scattering)

Streaming water

GPU-Based Water Surface Simulation for Puddle Ripples due to Splashes

Atmospheric Light

Attenuation View-Dependent Warped Reflections

Page 21: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Creating Rainfall with Multiple Layers of RainCreating Rainfall with Multiple Layers of Rain

• Novel image-based algorithm to render composite rainfall – The artists specify the rain direction and speed in

world-space to simulate different rainfall strength• Model multiple layers of rain in a single pass with a

single texture fetch from the rainfall position placement texture– Allows simulation of raindrops falling with different

speed at different layers• The layer of rain is shaded by using a normal map of

varied individual raindrop shapes using scene lights

Page 22: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

GPU-Based Water SimulationGPU-Based Water Simulation

• Dynamic realistic wave motion ofinteracting ripples over the water surface

• Water ripples are generated as a result of rain drops fallingonto the geometry in the scene– Stochastically seeded into the simulation texture as droplet mass

• Entire simulation runs on the GPU using SM 2.0 shaders– Solve for water heights using explicit Euler integration

Page 23: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Water Droplet Animation and Rendering on Glass Surfaces in Real-Time on the GPU

Water Droplet Animation and Water Droplet Animation and Rendering on Glass Surfaces in Rendering on Glass Surfaces in RealReal--Time on the GPUTime on the GPU

• Adopted an offline raindrop simulation system from [Kaneda99] to the GPU – Discretize glass surface to simulate on a grid

– Dynamically animate and render a large number of water droplets on glass surfaces on the GPU

– The simulation is modified to use a gather pass in the pixel shader, rather than original scatter-based particle system implementation

• The droplet shape and motion is influenced by the forces of gravity and the interfacial tension forces, as well as air resistance

Page 24: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

View-Dependent Streaking Reflections View-Dependent Streaking Reflections • Realistic streaky reflections increase the feel of rain on wet

street and surfaces– Very prominent in any rainy scene

– Appear to elongate toward the viewer

– Much more saturated for brighter sources

Page 25: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Want More Details?Want More Details?

• See the paper:– Tatarchuk, N., Isidoro, J. 2006. Artist-Directable Real-

Time Rain Rendering in City Environments. Eurographics Workshop on Natural Phenomena, Vienna, Austria, September 2006.

– SIGGRAPH 2006 Course 26 “Advanced Real-Time Rendering”

• Course notes, Chapter 3

Page 26: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

PerformancePerformance

• Measured on 1GB Dual 3.2 GHz Pentium 4 PC with ATI Radeon X1900 XT with 512MB of video memory

• Achieve frame rates of 26-69 fps– Rendering time for the raindrop particles and splashes was

limited by the CPU

Page 27: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

ToyShop Revealed: SummaryToyShop Revealed: Summary

• We presented you some of the technology that was developed for the ToyShop demos

• Rich, complex environments demand convincing details• Lots and lots of custom shaders allowed us to create a

thorough illusion of a dark, rainy night in the city• We hope to see even better

environments in next gen games and interactive applications

Page 28: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

The ToyShop TeamThe ToyShop TeamLead ArtistLead Artist Lead ProgrammerLead Programmer

Dan Roeger Natalya TatarchukDan Roeger Natalya Tatarchuk

David GosselinDavid Gosselin

ArtistsArtists

Daniel Szecket, Eli Turner, and Abe WileyDaniel Szecket, Eli Turner, and Abe Wiley

Engine / Shader ProgrammingEngine / Shader Programming

John Isidoro, Dan Ginsburg, Thorsten Scheuermann and Chris OatJohn Isidoro, Dan Ginsburg, Thorsten Scheuermann and Chris Oat

ProducerProducer ManagerManager

Lisa CloseLisa Close Callan McInallyCallan McInally

Page 29: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Questions? Questions?

Page 30: RESEARCH ATI: ToyShop - AMD · RESEARCH Eurographics Animation Festival – Best Of. Vienna, Austria, 2006 ToyShop Constraints • Our goal was to fit this demo into 256MB of video

RESEARCHRESEARCH

Eurographics Animation Festival – Best Of. Vienna, Austria, 2006

Thank you!