Real-Time Hair Reede Gondering On The GPU - Nvidia

1y ago
9 Views
2 Downloads
2.40 MB
38 Pages
Last View : 10d ago
Last Download : 3m ago
Upload by : Aliana Wahl
Transcription

Real-Time HairRenderinge de g onothe GPUSarah TariqNVIDIA

Motivation AcademiaA d i andd theh moviei iindustrydhhave bbeensimulating and rendering impressive andrealistic hair for a long time We have demonstrated realistic real timeresults [Nalu, 2003] GPU iis powerfulf l andd programmablebl enoughhto do all simulation/rendering

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

Results 166 simulatedi l t d strandst d 2.1Million triangles 24fps 8800GTX, 1280x1024 8xMSAA 2xSSAA with 5 taps

InI thishi talklk I willill cover onlyl hhairi renderingd i Real Time Hair Simulation and Rendering onthe GPUSession: Lets get physicalThursday Room 502B. 1:45-3:30

Import Guide HairSimulate GuideHairTessellate andInterpolate GuideHairRender Final Hair

Tessellation andI tInterpolationl ti

TessellationSimulated VerticesSmoothly Tessellated Hair

Tessellation WeW use B-SplinesB S li– Uniform cubic b-splines Pre-compute and storepartial results– Automatically handlecontinuity– Do not interpolateendpoints So we repeat end pointsx (t ) 1[P06P1P2 1 3 3 3 6 0P3 ] 3 3 3 00 11 t 3 4 t 2 1 t 0 1

InterpolationMulti Strand InterpolationClump Based Interpolation

Interpolation ClumpClBBasedd IInterpolationtl ti– Each interpolated strand is defined by 2D offset that is added to the guide strand in the direction of itscoordinate frame. Pre-computed and stored in constants ClumpClradiusdi whichhi h changeshalongltheh llengthh off theh guideidstrand Multi Strand Interpolation– Each strand is defined by 3D weights which we use tocombine the 3 guide strands

InterpolationMulti strand InterpolationClump Based InterpolationCombination

InterpolationMulti strand InterpolationClump Based InterpolationCombination

Modulate density across scalp Red: Local density of hair For example in this demo– Multi strand based hair has higherdensity near the center of the headMulti StrandInterpolationClump 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: strand texcoordstexcoords, lengthlength, width etc– Variable attributes: vertex positions, coordinate frames

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 to shadow map– Render final hair for rendering Each stage uses data computed and streamedout from previous stage

Final HairNNNNBBIndirectionBuffer

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 OutputOfromftheh tessellationll i enginei willill bbe aset lines of equal number of segments We can either render these directly Or we can expand these to triangles in theGS

ISO Lines InputIt an arbitrarybitpatcht h For each patch output a number of lines withgpper linemanyy segments– The number of lines output per patch and the numbergpper line are user controlled and can beof segmentsdifferent per patch– The ppositions of the vertices of the line segmentsgareshader evaluated

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

topologyCalculatevertexattributesExpandlines toquadsShadeTessellated, Interpolated,Rendered HairPatch of SimulatedGuide Hair

Clump Based Hair Tessellationand sInput Patch(sub set of guide hair)HullLine Density Line DetailTSDomainLineiDetaililLine DensitySingle Pass on GPU

Alternative PipelineSimulated Guide alculatevertexattributesSOGSPSTessellated Guide HairExpandlines toquadsShade

LOD CanC use ththe didistancetoff patcht h ffrom camera totdecide on the LOD– Low LOD levels would use less number of lines thicker lines less segments per line less complex shading

LOD LOD can bbe procedurald l– 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 ofNearthe hairstyle– The Hull Shader can lerp between appropriate LODtextures to decide on the line density, and line thicknessFar

Renderinge de g

Rendering LinesLihhave iissues:– No floating point line width– No textures across line These are useful for simulating the look of many hair RenderingR d i hhairi withith complexl colorl variationsi ti 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[R d i furf withith threethdimensionaldiil ttexturest(SIGGRAPH ’89)] Diffuse sin(Tsin(T,L)L) sqrt(1 – T . L2)Specular [T . L * T . E sin(T,L) sin(T,E)] p [T . L * T . E sqrt(1 – T . L2) sqrt(1 – T . E2)] p Ivan 2006 fake dual specular highlights– primary highlight shifted towards tip– secondarydhihighlighthli ht shiftedhift d ttowardsd roott

Tangents NeedN d tto hhave smoothth ttangentst– Calculate tessellated andinterpolated tangents Add jitter to tangents in order tobreak strong highlights– Randomly a per strand constantbias to tangents towards or awayfrom root– Add per pixel noise to tangentsx (t ) [T0 T12 0.5 1 0.5 t T2 ] 1 1 0.5 t 0 1 0.5 0

Shadows MaterialM t i lMModel:d l OOpaque hhairi Essential Requirements– No flickering, smooth shadows– Soft Shadows Do PCF with multiple taps1 tap– tShadowMap.SampleCmpLevelZero(ShadowSampler, texcoord,td z, int2(dx,i t2(d ddy));))– Helps reduce temporal/spatial aliasing– CalculateC l l t shadowsh dini VS andd interpolatei tl t across hhairilength to further reduce aliasing36 taps

Shadows MaterialMi lMModel:d l TTranslucentlHHairi If hair is semi-transparent then weneedd volumetriclt i shadowsh dOpacity Shadow maps– [Yuksel and Keyser 08], [Kim andNeuman 01], [ Lokovic and Veach 01]– discritize the space into layersDeep Shadow Maps[Images courtesy of Yuksel 08]

Shadows WeW dod absorptionbi weightedi h d PCF– Similar to [Halen 06]– Weigh the PCF sample by1 - exp(g SigmaAp(g g* d))No absorption weighting d is the difference between the depth of thecurrent shaded point and the closest point tothe lightWith absorption weighting

Antialiasing HumanHhhairi iis very thithin Typically alpha blending is used to hidealiasingli i– Requires sorting geometry which is timeNo Alpha Blendingconsuming– Can use depth peeling [Everitt 01], [Bavoiland Myers 07] Scalable: can decide to render only the first 4 depthlayers for example– Or [Sintorn and Assarsson 08]With Alpha Blending[Sintorn and Assarsson 08]

Antialiasing CanC alsol use AlAlphah TTo CCoverage– Does not require sorting– Does require MSAA– Need depth pre-pass to get earlyZ We use a combination of MSAAand SSAA– 8xMSAA8 MSAA– 2xSSAA with 5 taps

Add random deviations to hair PreP bakeb k andd storetddeviationsi tiwhichhi hare added to interpolation offsetsalong 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

Thanka youyou!

Interpolation Cl B dIt ltiClump Based Interpolation - 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 Cl di hi h h l h l h f h idClump radius which changes along the length of the guide strand Multi Strand InterpolationMulti Strand Interpolation

Related Documents:

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.

SHAMPOO GINKGO BILOBA & SAW PALMETTO SHAMPOO Stimulates hair regeneration & fortifies. Revitalises Split ends. Repair damaged hair & hair loss. Vol: 750ml, 1500ml BUTTER CONDITIONER Rich nutrition that seals and smoothes hair cuticles. Argan Oil restores shine, Helps promote hair elasticity. Deep conditioning hair care treatment. Sulphate .

natural extracts formulations nourish the hair and give it volume, shine and softness. 500 ml Hair care NETTLE shampoo greasy hair WHEAT & GREEN TEA 2 in 1 dry hair ALOE VERA shampoo all hair types CALENDULA shampoo dry hair CALENDULA conditioner dry hair GREEN APPLE shampoo frequent use EGG & HONEY shampoo dry hair CHAMOMILE conditioner all .

Hair Types Natural hair comes in four main "types". Most black people have type four hair and this can be further broken down into: 4a, 4b, 4c. The type in itself does not matter.What does matter is the impact of type on how the hair should be handled. All type four hair is very kinky hair but type 4C is the most kinky and most vulnerable to breakage.

2. Hair Follicle Biology 2.1. Structure of the Hair Follicle Hair is a filament consisting mainly of dead, keratinized cells. The hair structure consists of two parts: the hair follicle and the hair shaft (Figure1). Int. J. Mol. Sci. 2020, 21, x FOR PEER REVIEW 2 of 13 The structure of the hair follicle can be divided into the upper and the .

o Chapter 2. Review Questions o Chapter 2: Bibliography o Activity 2-1. Locard's Principle of Exchange o Activity 2-2. Crime-Scene Investigation CHAPTER 3. HAIR ANALYSIS o Hair as Evidence o History of Hair Analysis o The Science of Hair Analysis The Functions of Hair The Life Cycle of Hair The Structure of Human Hair o Characteristics of Hair .

A First Course in Complex Analysis was written for a one-semester undergradu-ate course developed at Binghamton University (SUNY) and San Francisco State University, and has been adopted at several other institutions. For many of our students, Complex Analysis is their first rigorous analysis (if not mathematics) class they take, and this book reflects this very much. We tried to rely on as .