12 and Anton Kaplanyan 1 1 NVIDIA Research 2 Karlsruhe Institute of Technology Realtime Rendering of Procedural Multiscale Materials Previous Work Sparkly but not too Sparkly A Stable and Robust Procedural Sparkle Effect ID: 602069
Download Presentation The PPT/PDF document "Tobias Zirr" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Tobias Zirr (1),2 and Anton Kaplanyan 11 NVIDIA Research2 Karlsruhe Institute of Technology
Real-time Rendering of Procedural Multiscale MaterialsSlide2
Previous Work“Sparkly but not too Sparkly! A Stable and Robust Procedural Sparkle Effect” [Studio Gobo, SIG AiRTR 15]Procedural noiseDirect placement of individual sparkle pointsPurely phenomenological2Slide3
Microfacet TheoryStochastic model for rough microscopic surface structure3
Normal Distribution Function (NDF):
Slide4
Microfacet TheoryStochastic model for rough microscopic surface structure4
Slide5
Microfacet TheoryStochastic model for rough microscopic surface structure5
Slide6
Stochastic Models and CorrelationStochastic model assumes independent distributions6
More this:
Less this:Slide7
Stochastic Models and CorrelationStochastic model assumes independent distributions7
More this:
Less this:
Glint:
Local
aggregation of similar microsurface orientationsSlide8
Previous Work“Rendering Glints on High-Resolution Normal-Mapped Specular Surfaces” [Yan et al.14]Enumeration of reflecting ‘facets’ (texels) in footprintOrientation bounding hierarchy on normal mapTree pruning8Slide9
Previous Work“Discrete Stochastic Microfacet Models” [Jakob et al.14]Distribute arbitrary number of microfacets / ‘particles’Pseudo-random (deterministic), no need to store4D hierarchical stochastic distribution process (p, n)9
9Slide10
A Biscale Microfacet ModelIn Theory10Slide11
Multiscale Microfacets: MicrodetailsGeneral idea: NDF varies with locationModel microsurface by distribution of microdetails:“Randomly instantiate microdetail patches”11
Microdetails:
Randomized Instantiations of Microdetail NDFs/
“
MicroBRDFs
”Slide12
Relationship NDF, MDDF, MNDFEach microdetail represents a local microsurface with Microdetail NDF (MNDF):
Microdetails
are randomly oriented according toMicrodetail Distribution Function (MDDF):
The global microsurface consists of all microdetails with
NDF
:
Can decompose
any
NDF
into local and global DFs
to introduce correlated
clusters/glints!
12Slide13
Comparison to Previous Work“Almost Specular” MicrofacetsCount the number of reflecting microfacets per area[Jakob et al.]: Discrete Stochastic Microfacet Models ,[Yan et al.]: Rendering Glints on High-Resolution Normal-Mapped Specular Surfaces
Ours: Glossy MicrodetailsContinuum from max to min reflectivity per microdetail
13Slide14
Discretization of Microdetails“Almost Specular” MicrofacetsCount the number of reflecting microfacets per area[Jakob et al.]: Discrete Stochastic Microfacet Models ,[Yan et al.]: Rendering Glints on High-Resolution Normal-Mapped Specular Surfaces
Ours: Glossy MicrodetailsContinuum from max to min reflectivity per microdetail
Need to turn into discrete stochastic processTurn reflectivity of
into
probability
of
contributing with maximum (MNDF) intensity
14Slide15
Discrete Biscale Model EvaluationProbability
of
contributing with max intensity
Total probability mass
Expected number of contributing microdetails:
15
Slide16
Discrete Biscale Model EvaluationProbability
of
contributing with max intensity
Total probability mass
Expected number of contributing
microdetails
:
Multiply contributing fraction
by
:
Locally has dynamic range MNDF
(zoomed in)
Expected value equals global NDF
(zoomed out)
16
Slide17
Controlling Biscale NDFsPowerful artistic control:Local roughness / controls detail appearance
Global roughness /
controls distant appearance
(Microdetail distribution
implicitly defined by both)
17Slide18
A simplified proceduralreal-time ImplementationIn Practice18Slide19
Simplified Stochastic ProcessHierarchical multinomial process too expensiveSimplify to one binomial random variableTotal number of microdetails for a given areaProbability of microdetail contributing w/ max intensity19
Slide20
Coherent Stochastic ProcessIdeally one binomial draw per pixel, but footprints varyPer-pixel area in screen space unstable!Resort to stable texture-space power-of-two grids and proven methods of anisotropic texture filtering:One binomial draw per grid cellTrilinear interpolation20Slide21
View Dependency (Glistening!)21
Search space 4D:
Also need subdivision of microdetail orientations
Paraboloid half vector grid
Seed binomial using 4D index
Perturb half vector partitioning
using texture grid index to avoid
simultaneous change of sparklesSlide22
Multiscale Coherent Noise / SeedsSeed binomials with cell indicesProblem: Blending noise leads to smearing (averaging)Solution: Multi-level coherent seeds22(Generic multiscale noise also useful elsewhere!)Slide23
Multiscale Coherent Noise / SeedsSeed binomials with cell indicesProblem: Blending noise leads to smearing (averaging)Solution: Multi-level coherent seeds23
cellIdx
>>
findLSB
(
cellIdx
)
(Generic
multiscale
noise also useful elsewhere!)Slide24
Anisotropic MicrodetailsAnisotropic roughness equivalent toanisotropic scaling of BSDF by ratio
“
Understanding
the masking-shadowing function in
microfacet-based BRDFs” [Heitz14]
Scale texture-space grid accordingly
24Slide25
Microdetail Scale VariationVary microdetail density per texture grid cellSpreads grainy appearance across larger range of scales25Slide26
PerformanceGeForce GTX 980, 1080pMaximum anisotropy: 16xALU variance: 8-64 cells to shade412 static instructions, 204 within a loop for one cellNo texture fetches26
Scene
Polys
Isotropic footprint, ms
Grazing angle, ms
Full-screen pass
20.92.9Snow
32k
2.5
4.0
Dress
100k
1.4
4.4
Car (grooves)
570k
2.5
3.9
Crytek
Sponza
262k
3.0
5.9Slide27
Example Code / ShaderToyExample available online: https://www.shadertoy.com/view/ldVGRhSlide28
Variety of MaterialsSlide29
Thank you!Questions?ContactTobias Zirrtobias.zirr@alphanew.net Twitter: @alphanewAnton Kaplanyankaplanyan@gmail.com Twitter: @kaplanyan29