Real-Time Hair Rendering on the GPU NVIDIA

Similar documents
Real-Time Hair Simulation and Rendering on the GPU. Louis Bavoil

Deep Opacity Maps. Cem Yuksel and John Keyser Texas A&M University

A Trip Down The (2011) Rasterization Pipeline

Motivation MGB Agenda. Compression. Scalability. Scalability. Motivation. Tessellation Basics. DX11 Tessellation Pipeline

Department of Computer Engineering 3D Graphics in Games and Movies

Stochastic Transparency. Eric Enderton Erik Sintorn Pete Shirley David Luebke

Constant-Memory Order-Independent Transparency Techniques

Rendering Grass with Instancing in DirectX* 10

Deep Opacity Maps. Cem Yuksel 1 and John Keyser 2. Department of Computer Science, Texas A&M University 1 2

Hair Self Shadowing and Transparency Depth Ordering Using Occupancy maps

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

8/5/2012. Introduction. Transparency. Anti-Aliasing. Applications. Conclusions. Introduction

Multi-View Soft Shadows. Louis Bavoil

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation

How to Work on Next Gen Effects Now: Bridging DX10 and DX9. Guennadi Riguer ATI Technologies

Voxel Cone Tracing and Sparse Voxel Octree for Real-time Global Illumination. Cyril Crassin NVIDIA Research

Octree-Based Sparse Voxelization for Real-Time Global Illumination. Cyril Crassin NVIDIA Research

Efficient and Scalable Shading for Many Lights

Hair. Hair. Edit Panel

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

DirectX10 Effects. Sarah Tariq

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

D3D11 Tessellation. Sarah Tariq NVIDIA

Enabling immersive gaming experiences Intro to Ray Tracing

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Pipeline Operations. CS 4620 Lecture 14

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Morphological: Sub-pixel Morhpological Anti-Aliasing [Jimenez 11] Fast AproXimatte Anti Aliasing [Lottes 09]

2.11 Particle Systems

Gettin Procedural. Jeremy Shopf 3D Application Research Group

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Beyond Programmable Shading Course, ACM SIGGRAPH 2011

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

Order Independent Transparency with Dual Depth Peeling. Louis Bavoil, Kevin Myers

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

DirectX10 Effects and Performance. Bryan Dudash

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

The Rasterization Pipeline

Per-Face Texture Mapping for Realtime Rendering. Realtime Ptex

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

3ds Max certification prep

Evolution of GPUs Chris Seitz

Spring 2009 Prof. Hyesoon Kim

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

The Vegetation of Horizon Zero Dawn. Gilbert Sanders Principal Artist, Guerrilla Games

Rendering Hair with Back-lighting 1

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Introduction to the Direct3D 11 Graphics Pipeline

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

Spring 2011 Prof. Hyesoon Kim

Visible Volume Buffer for Efficient Hair Expression and Shadow Generation

Volume Rendering with libmini Stefan Roettger, April 2007

CS427 Multicore Architecture and Parallel Computing

Distributed Ray Tracing

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

GPU-Accelerated Deep Shadow Maps for Direct Volume Rendering

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

Shaders in Eve Online Páll Ragnar Pálsson

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Beyond Programmable Shading Course ACM SIGGRAPH 2010 Bending the Graphics Pipeline

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools

Rendering Subdivision Surfaces Efficiently on the GPU

Particle Shadows & Cache-Efficient Post-Processing. Louis Bavoil & Jon Jansen Developer Technology, NVIDIA

The Graphics Pipeline

Rendering Hair-Like Objects with Indirect Illumination

White Paper. Solid Wireframe. February 2007 WP _v01

The Rasterization Pipeline

Craig Peeper Software Architect Windows Graphics & Gaming Technologies Microsoft Corporation

Sculpting 3D Models. Glossary

Shading Shades. Frank Jargstorff. June 1, Abstract

Real-Time Reyes Programmable Pipelines and Research Challenges

Procedural Shaders: A Feature Animation Perspective

Pipeline Operations. CS 4620 Lecture 10

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

Fragment-Parallel Composite and Filter. Anjul Patney, Stanley Tzeng, and John D. Owens University of California, Davis

Interactive Methods in Scientific Visualization

The Application Stage. The Game Loop, Resource Management and Renderer Design

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Previously... contour or image rendering in 2D

Towards Supporting Volumetric Data in FurryBall GPU Renderer

Fur Shader GRAPHICS PROGRAMMING 2

CHAPTER 1 Graphics Systems and Models 3

Programming Graphics Hardware

VAO++: Practical Volumetric Ambient Occlusion for Games

Horizon-Based Ambient Occlusion using Compute Shaders. Louis Bavoil

3D Rasterization II COS 426

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

Game Developer Conference 2011 TheTechnology Technology Behind the DirectX 11 Unreal Engine "Samaritan" Demo

Efficient GPU Rendering of Subdivision Surfaces. Tim Foley,

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

AGGREGATE G-BUFFER ANTI-ALIASING

Basic GPU techniques Josef Pelikán CGG MFF UK Praha.

Graphics Processing Unit Architecture (GPU Arch)

Adaptive Point Cloud Rendering

Advanced Ambient Occlusion Methods for Modern Games

Transcription:

Real-Time Hair Rendering on the GPU Sarah Tariq NVIDIA

Motivation Academia and the movie industry have been simulating and rendering impressive and realistic hair for a long time We have demonstrated realistic real time results [Nalu, 2003] GPU i f l d bl h GPU is powerful and programmable enough to do all simulation/rendering

Results 166 simulated strands 0.99 Million triangles Stationary: 64 fps Moving: 41 fps 8800GTX, 1920x1200, 8XMSAA

Results 166 simulated strands 2.1Million triangles 24fps 8800GTX, 1280x1024 8xMSAA 2xSSAA with 5 taps

In this talk I will cover only hair rendering Real Time Hair Simulation and Rendering on the GPU Session: Lets get physical Thursday Room 502B. 1:45-3:30

Import Guide Hair Simulate Guide Tessellate and Render Final Hair Hair Interpolate Guide Hair

Tessellation and Interpolation ti

Tessellation Simulated Vertices Smoothly Tessellated Hair

Tessellation Tessellation W B S li 1 3 3 1 3 t We use B-Splines Uniform cubic b-splines [ ] = 1 0 0 0 1 1 3 3 3 4 0 6 3 6 1 ) ( 2 3 2 1 0 t t t P P P P t x Pre-compute and store partial results Automatically handle continuity Do not interpolate endpoints So we repeat end points

Interpolation Multi Strand Interpolation Clump Based Interpolation

Interpolation Clump Based Interpolation ti Each interpolated strand is defined by 2D offset that is added to the guide strand in the direction of its coordinate frame. Pre-computed and stored in constants Clump radius which h changes along the length of the guide strand Multi Strand Interpolation Each strand is defined by 3D weights which we use to combine the 3 guide strands

Interpolation Multi strand Interpolation Clump Based Interpolation Combination

Interpolation Multi strand Interpolation Clump Based Interpolation Combination

Modulate density across scalp Red: Local density of hair For example in this demo Multi strand based hair has higher density near the center of the head Multi Strand Interpolation Clump Based

Process Create a tessellated t dummy hair and render it N times, where N is the number of final hairs In the VS, load from Buffers storing simulated strand attributes Constant attributes: strand texcoords, length, width etc Variable attributes: vertex positions, coordinate frames

Process Stream out the data after each stage to minimize i i re-computation Tessellate the simulated strands and Stream out Interpolate the tessellated strands and Stream out Render final hair to shadow map Render final hair for rendering Each stage uses data computed and streamed out from previous stage

Indexing Tessellated Master Strands N B Interpolated Final Hair N N N N N N N B B Indirection Buffer

Using Dx11 Tessellation Engine

Tessellation Pipeline Direct3D11 extends Direct3D10 with Input Assembler support for programmable tessellation Vertex Shader Two new shader stages: Hull Shader (HS) Domain Shader (DS) One fixed function stage: Tessellator (TS) Hull Shader TS Domain Shader Geometry Shader Setup/Raster

ISO Lines Output from the tessellation engine will be a set lines of equal number of segments We can either render these directly Or we can expand these to triangles in the GS

ISO Lines Input an arbitrary patch For each patch output a number of lines with many segments per line The number of lines output per patch and the number of segments per line are user controlled and can be different per patch The positions of the vertices of the line segments are shader evaluated

Interpolating and Tessellating hair With Tessellation engine we can create tessellated and interpolated hair on the fly Benefits: Easy and intuitive More programmable Can create geometry only where needed Reduce detail where not needed Continuous LOD

Pipeline Input Output HS TS DS GS PS Calculate LODs Generate topology Calculate vertex attributes Expand lines to quads Shade Tessellated, Interpolated, Rendered Hair Patch of Simulated Guide Hair

Clump Based Hair Tessellation and Interpolation Input Patch (sub set of guide hair) Output: Tessellated And Interpolated lines Hull Line Density + Line Detail TS Domain Line Detail Line Density Single Pass on GPU

Alternative Pipeline HS TS DS SO Simulated Guide Hair Calculate LODs Generate topology Calculate vertex attributes HS TS DS GS PS Tessellated Guide Hair Calculate LODs Generate topology Calculate vertex attributes Expand lines to quads Shade

LOD Can use the distance of patch from camera to decide on the LOD Low LOD levels would use less number of lines thicker lines less segments per line less complex shading

LOD LOD can be procedural For LOD 0.5 render only 50% of lines in a given patch LOD can also be artist defined Artists can create density/width maps for different LOD of the hairstyle Near The Hull Shader can lerp between appropriate LOD textures to decide on the line density, and line thickness Far

Rendering

Rendering Lines have issues: No floating point line width No textures across line These are useful for simulating the look of many hair Rendering hair with complex color variations Render camera facing triangle strips Can either expand lines to strips in the GS Or can render instanced triangle strips

Shading: Kajiya and Kay Kajiya and Kay [Rendering fur with three dimensional i textures t (SIGGRAPH 89)] Diffuse = sin(t,l) =sqrt(1 T. L 2 ) Specular = [T. L * T. E + sin(t,l) sin(t,e)] p = [T. L * T. E + sqrt(1 T. L 2 ) sqrt(1 T. E 2 )] p Ivan 2006 fake dual specular highlights primary highlight shifted towards tip secondary highlight hli ht shifted towards root

Tangents Need to have smooth tangentst 2 0.5 1 0.5 t x( t) = [ T0 T T ] 1 1 0.5 t 1 2 Calculate tessellated and 0.5 0 0 1 interpolated tangents Add jitter to tangents in order to break strong highlights Randomly a per strand constant bias to tangents towards or away from root Add per pixel noise to tangents

Shadows Material Model: Opaque hair Essential Requirements No flickering, smooth shadows Soft Shadows Do PCF with multiple taps 1 tap tshadowmap.samplecmplevelzero(shadowsampl er, texcoord, z, int2(dx, dy)); Helps reduce temporal/spatial aliasing Calculate l shadows in VS and interpolate t across hair length to further reduce aliasing 36 taps

Shadows Material Model: Translucent Hair If hair is semi-transparent then we need volumetric shadows [Yuksel and Keyser 08], [Kim and Neuman 01], [ Lokovic and Veach 01] discritize the space into layers Opacity Shadow maps Deep Shadow Maps [Images courtesy of Yuksel 08]

Shadows We do absorption weighted PCF Similar to [Halen 06] Weigh the PCF sample by 1 - exp(g_sigmaa g * d) d is the difference between the depth of the current shaded point and the closest point to the light No absorption weighting With absorption weighting

Antialiasing Human hair is very thin Typically alpha blending is used to hide aliasing i Requires sorting geometry which is time consuming No Alpha Blending Can use depth peeling [Everitt 01], [Bavoil and Myers 07] Scalable: can decide to render only the first 4 depth layers for example Or [Sintorn and Assarsson 08] With Alpha Blending With Alpha Blending [Sintorn and Assarsson 08]

Antialiasing Can also use Alpha To Coverage Does not require sorting Does require MSAA Need depth pre-pass to get earlyz We use a combination of MSAA and SSAA 8xMSAA 2xSSAA with 5 taps

Add random deviations to hair Pre bake and store deviations which h are added to interpolation offsets along the length of the hair Most hair deviate towards the tips Some very deviant and thin hair Other Taper hair width towards the hair tip Randomize width per-hair strand

Thank you!