Realtime Hair Simulation And Rendering - Nvidia

1y ago
22 Views
2 Downloads
2.45 MB
44 Pages
Last View : 24d ago
Last Download : 3m ago
Upload by : Eli Jorgenson
Transcription

Real-Time HairSimulation andR d i onRenderingthe GPUSarah TariqLouis Bavoil

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

Results 166 simulated strands 2.1Million triangles Stationary: 24fps Moving:g 17.5fpsp 8800GTX, 1280x1024, 2x SSAA, 8XMSAA

Main Contributions A systemtthatth t runs entirelyti l on ththe GPU– Simulation on GPU– Tessellation and interpolation on GPU Robust inter hair forces Detection and avoidance of interpolant haircollisions D3D11 tessellation based implementation

Previous work A numberb off peoplel hhave ddone andd are ddoingiimpressive things in realistic real time hair: Dual Scattering Approximation for Fast Multiple Scattering inHair. Zinke and Yuksel A practical selfself-shadowingshadowing algorithm for interactive hairanimation. Bertails et al. Algorithms for Hardware Accelerated Hair Rendering. TaeYong Kim Real-Time Approximate Sorting for Self Shadowing andTransparency in Hair Rendering.Rendering Sintron and Assarsson Deep Opacity Maps. Yuksel and Keyser

ProcessImport Guide HairSimulate GuideHairTessellate andInterpolate GuideHairRender Final Hair

SimulationSu at o

Simulation HairH i simulatedi l t d as a particleti l constraintt i t systemt– Hair vertices are simulated as particles– Links between hair vertices are treated as Distanceconstraints these constraints maintain hair length– Angular forces at each hair vertex maintain hair shape WeW haveh2D angularl forcesf(ignoring(ii ththe ttwisti t didimension)i )– Collision constraints keep hair particles outside obstacles

Representationp All theth guideid hairh i verticestiare appendedd d ttogetherthto form one Vertex Buffer (VB)Guide hair 0Fixed vertex (root)Guide hair 1Fixed vertex (root)Fixed vertex (root)

Dynamicsyon the GPU SimulationSi l ti iis ddone usingi ththe VVertext ShShaderd andd StStream OOutputt t– write directly from the Vertex Shader to another Vertex Buffer, skippingrasterization Ping-Pong between two guide hair VBs– Bind VB1, run a vertex shader on it, Stream Out the vertices to VB2– Bind VB2, run next vertex shader on it, Stream Out to VB2– Continue

Example:p Distance Constraints A distancedi tconstraintt i t DC(P,DC(P Q) betweenb ttwotparticles P and Q is enforced by moving themaway or towardstd eachh other:thQPPQP QDistanceat rest

Example:p Distance Constraints ToT satisfyi f a distancediconstrainti we needd tomove the positions of two vertices Use Geometry Shader– Input two vertices– Output the modified positions of these verticesafter satisfying their distance constraint

Example:p Distance ConstraintsSince particlesSiti l are subjectbj t ttomultiple constraints wecannot satisfy them all inparallelFirst batch of constraintsSSeconddbbatchh off constraintsiIterate

Example:p Distance ConstraintsRenderGeometry ShaderStream OutRenderGeometry ShaderStream Out

Example:p Inter-hair collisions Inter-hairI t h i collisionslli iddealtlt withith iin gridid bbasedd fframeworkk HairH i strandst d andd obstaclesb t l (lik(like hhead/body)d/b d ) voxelizedli d iintot a llowres grid Hair vertices pushed out of high density areas

Example:p Inter-hair collisions Force is applied in the direction of the negative gradient of the density– blur the voxelized density, then for each vertex falling in a high densityarea find the gradient of the density field at that point This approach tries to achieve volume preserving quality of inter-haircollisions

Inter-HairInterHair Collision ForcesVisualizing densityBeforeAfterFinal RenderingBeforeAfter

Wind Forces WindWi d fforces simulatedi l t d usingisemi-lagrangian fluid simulationon a coarse grid Voxelized hair and mesh alsoadded to ggrid as obstacles towind

Tessellation andI tInterpolationl ti

TessellationSimulated VerticesSmoothly Tessellated Hair

InterpolationMulti Strand InterpolationClump Based Interpolation

InterpolationpMulti strand InterpolationClump Based InterpolationCombination

Curlyy Hair Encode additional curloffsets into constant buffers These offsets are added tothe clump offsets Can either be createdprocedurally,py, or artists cancreate example curls andthe offsets can be derivedfrom those

Modulate density and thicknessacross scalpl Green: Local density of hair– For e.g. Clump based hair has higherdensity near the front of the scalp Red: Local thickness of hairMulti Strand– For e.g. Clump based hair has lessthickness of hair near the front of the scalpClump Based

Process CreateC t a ttessellatedll t d ddummy hhairi andd renderd it Ntimes, where N is the number of final hairs In the VS,, load from Buffers storingg simulatedstrand attributes– Constant attributes like strand texcoordstexcoords, lengthlength, widthetc– Variable attributes like vertex positionspositions, coordinateframes etc

Process StreamStoutt theth datad t afterft eachh stagettot minimizei i ire-computation– Tessellate the simulated strands and Stream out– Interpolate the tessellated strands and Stream out– Render final hair for shading to shadow map– Render final hair for rendering Each stage uses data computed and streamedout from previous stage

Additional Optimization details ToT gett a nicerilookl k you use AlphaAl h tto CCoverage, hhowever– using it disables earlyZ if you are also writing and reading depth– To get earlyZ do a depth pre pass before, and during the finalrendering just test depth without writing it Don’t use the GS for creating hair strands– Can use the GS for expanding the lines to triangles butperformance gain depends on pipeline load

Avoidingg interpolatedphair collisions InterpolatingIl i bbetweenmultiple guide strands canlead to some hair goingthrough collision obstaclesInterpolated hair intersect collision volumesFixing collisions without doing extra simulation

Avoidingg interpolatedphair collisionsInterpolated hairInterpolated hairCollision objectSimulated HairSingle Hair InterpolationMulti-Hair Interpolation

Avoidingg interpolantpcollisionsBlending zonewhere bothmethods areuseddSnap thesevertices totheir clumpbasedpositionsNo Collision AvoidanceModifying only penetratingverticesOur Method

Avoidingg interpolatedphair collisions

Avoidingg interpolatedphair collisionsM iMaximumnumberb offinterpolated hair perpatchRender eachinterpolatedhair strand toone pixel 3 2 2 3 Output thevertex ID if thevertex iscolliding, elsea largenumberTotalnumberofpatchesUse Minimumblending 3 2 2 3

Renderinge de g

Shadows MaterialM t i lMModel:d l OOpaque hhairi Essential Requirements– No flickering, smooth shadows– Soft Shadows1 tap Do PCF with multiple taps in VS– Help reduce temporal/spatial aliasing– Calculate shadows in VS and interpolateacross hairh i llengthth tto ffurtherth reducedaliasingli i36 taps

Shadows MaterialMi lMModel:d l TTranslucentlHair [Yuksel and Keyser 08], [Kimand Neuman 01]01], [ Lokovic andVeach 01]No absorption weighting WeW dod absorptionbti weightedi ht d PCF– Similar to [Halen 06]– Weigh the PCF sample by thedistance to occluderWith absorption weighting

LOD CanC use theh sizei off a projectedjd segment todecide on the LOD– Low LOD levels would use less number of lines,less segments per line, and thicker lines

LOD CanC alsol use artisti ddefinedfi d LOD– Artists can create different looks for differentLOD off theth hairstyle.h i t l For example a lower LOD can have large stripsjust on the top of the head along the part of thehair.Near– These LODs can then be transcribed intotextures– The Hull Shader will lerp between appropriateLOD textures to decide on the line density, andline thicknessFar

Using Dx11esse at oTessellationEngine

Tessellation Pipelinet3D11 extendst d Dit3D10 withith DiDirect3D11Direct3D10support for programmable tessellationInput AssemblerVertex ShaderHull Shader Two new shader stages:– Hull Shader (HS)– Domain Shader (DS) One fixed function stage:– Tessellator (TS)TSDomain ShaderGeometry ShaderSetup/Raster

ISO Lines InputIt an arbitrarybitpatcht h For each patch output a number of lines withmany segments per line– The number of lines output per patch and the number of segmentsper line are user controlled and can be different per patch– The positions of the vertices of the line segments are shaderevaluated Render as lines, or expand in the GS

Interpolating and Tessellating hair WithWi h TTessellationll i enginei we can createtessellated 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

PipelineInputOutputHSCalculateLODsSimulated Guide tesExpandlines toquadsShadeTessellated, Interpolated,Rendered Hair

Alternative PipelinepSimulated Guide alculatevertexattributesSOGSPSTessellated Guide HairExpandlines toquadsShade

Thanka youyou!

Modulate density and thickness across scalp Green: Local density of hair - For e.g. Clump based hair has higher density near the front of the scalpdensity near the front of the scalp Red: Local thickness of hairRed: Local thickness of hair Multi Strand - For e.g. Clump based hair has less thickness of hair near the front of the scalpthickness of hair near the front of the scalp

Related Documents:

So, what is better with strand-based rendering? Strand based rendering, where hair fibers are modelled as individual strands, or curves, is the current state of the art when rendering hair offline. And it can look something like this image generated using Arnold. Modelling hair as strands has a lot of benefits for physics and rendering since it .

In the past, real-time hair rendering could only be done with a mesh representation of the hair on which a material was applied. Figure 1: Hair rendering of Ruby by [Scheuermann 2004] One attempt to put hair on a human mesh was done by [Scheuermann 2004] of ATI Research and presented at Siggraph 2004. Scheuermann's approach is based on the hair

The part of the hair seen above the skin is termed the hair fiber and, inside the skin, the hair follicle is the live part of hair from which the hair grows and where the hair fiber is generated [12,13]. 2.1. Hair Morphogenesis Hair follicles initially form in the skin of a human embryo as invaginations of the epidermis

Hair dyes add color to the hair, which can be lighter or darker depending on the type of hair coloring product used. Hair bleaches only lighten the hair without adding a new color to it. Hair bleaches remove the hair color through a chemical reaction. They can be used alone or in combination with permanent hair colors.

ibility using only a portion of the hair strand segments. 1 Introduction Rendering fur and hair has long been a challenge for computer graphics. Early methods used texturing techniques [Kajiya and Kay 1989; Goldman 1997] to avoid rendering of high complexity hair models. These models often consist of more than ten thousand hair

Figure 1: Our method allows the simulation of every hair strand in real time. From left to right: 47k hairs simulated at 25 fps including rendering and hair-hair repulsion. Long hair composed of 1.9m particles at 8 fps. Curly hair using visualization post-processing. cally based techniques in that it introduces a certain amount of artificial .

Features Covered in This Section Adding the Hair And Fur modifier. Using a sub-object level to control hair placement. Modifying hair settings, including material properties. Rendering hair. Creating a Centurion Helmet In this tutorial, you will use the Hair And Fur modifier to grow hair onto

Fjalët kyce : Administrim publik, Demokraci, Qeverisje, Burokraci, Korrupsion. 3 Abstract. Public administration, and as a result all the other institutions that are involved in the spectrum of its concept, is a field of study that are mounted on many debates. First, it is not determined whether the public administration ca be called a discipline in itself, because it is still a heated debate .