Stylized Shadows

34
Stylized Shadows Stylized Shadows Christopher DeCoro Princeton University Forrester Cole Adam Finkelstein Szymon Rusinkiewicz

description

Stylized Shadows. Christopher DeCoroPrinceton University Forrester Cole Adam Finkelstein Szymon Rusinkiewicz. Recreating an Artistic Example. Consider this portion of John Vanderlyn’s panorama of the Palace and Garden of Versailles Note the abstracted shadow cast from the planter - PowerPoint PPT Presentation

Transcript of Stylized Shadows

Page 1: Stylized Shadows

Stylized ShadowsStylized ShadowsStylized ShadowsStylized Shadows

Christopher DeCoro Princeton UniversityForrester ColeAdam FinkelsteinSzymon Rusinkiewicz

Page 2: Stylized Shadows

Recreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic Example

• Consider this portion of John Vanderlyn’s panorama of the Consider this portion of John Vanderlyn’s panorama of the Palace and Garden of VersaillesPalace and Garden of Versailles

– Note the abstracted shadow cast from the planter

– The object is the focus – the shadow exists to provide cues

• Our goal is to provide the same stylization to rendered shadowsOur goal is to provide the same stylization to rendered shadows

Page 3: Stylized Shadows

Recreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic Example• The planter appears to float without a shadowThe planter appears to float without a shadow

– The shadow provides an essential cue to anchor it to the ground

Page 4: Stylized Shadows

Recreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic Example• The planter appears to float without a shadowThe planter appears to float without a shadow• However, an accurate shadow provides extraneous detailHowever, an accurate shadow provides extraneous detail

– The planter has a handle in silhouette, yet the shadow does not

– Perhaps the artist decided this detail was distracting

Page 5: Stylized Shadows

Recreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic ExampleRecreating an Artistic Example• The planter appears floating without a shadowThe planter appears floating without a shadow

• However, an accurate shadow provides extraneous detailHowever, an accurate shadow provides extraneous detail

• We allow a We allow a stylized shadowstylized shadow, providing for greater artistic control, providing for greater artistic control

Page 6: Stylized Shadows

Examples of Stylized ShadowsExamples of Stylized ShadowsExamples of Stylized ShadowsExamples of Stylized Shadows

6

• Artwork from the Metropolitan Museum of Art in New YorkArtwork from the Metropolitan Museum of Art in New York

• The two left examples use simplified shadows to provide cuesThe two left examples use simplified shadows to provide cues

• The right examples use discrete penumbrae for effect The right examples use discrete penumbrae for effect

Page 7: Stylized Shadows

• Identification of a set of useful stylization controlsIdentification of a set of useful stylization controls

– Inflation

– Softness

– Brightness

– Abstraction

• A framework for rendering stylized shadowsA framework for rendering stylized shadows

– Establishing stylization parameters that are controlled at a high level

– Interactive visualization

Our ContributionsOur ContributionsOur ContributionsOur Contributions

Accurate Stylized

Original Inflation Brightness Softness Abstraction

Page 8: Stylized Shadows

Stylization ParametersStylization ParametersStylization ParametersStylization Parameters

• Inflation (and deflation) Inflation (and deflation) ii

– size of the shadow relative to original

Page 9: Stylized Shadows

Stylization ParametersStylization ParametersStylization ParametersStylization Parameters

• Inflation (and deflation) Inflation (and deflation) ii

– size of the shadow relative to original

• Softness, Softness, ss

– width of transition from lit to occluded

Page 10: Stylized Shadows

Stylization ParametersStylization ParametersStylization ParametersStylization Parameters

• Inflation (and deflation) Inflation (and deflation) ii

– size of the shadow relative to original

• Softness, Softness, ss

– width of transition from lit to occluded

• Brightness, Brightness, bb

– maximum amount of occlusion

Page 11: Stylized Shadows

Stylization ParametersStylization ParametersStylization ParametersStylization Parameters

• Inflation (and deflation) Inflation (and deflation) ii

– size of the shadow relative to original

• Softness, Softness, ss

– width of transition from lit to occluded

• Brightness, Brightness, bb

– maximum amount of occlusion

• Abstraction, Abstraction, αα

– smoothness of the shadow contour

Page 12: Stylized Shadows

Algorithm DescriptionAlgorithm DescriptionAlgorithm DescriptionAlgorithm Description• Start with hard shadow visibilityStart with hard shadow visibility

1. Visibility

Accurate Shadow

Page 13: Stylized Shadows

Algorithm DescriptionAlgorithm DescriptionAlgorithm DescriptionAlgorithm Description• Start with hard shadow visibilityStart with hard shadow visibility

• Compute distance transform of visibilityCompute distance transform of visibility

1. Visibility 2. Dist. Transform

Accurate Shadow

Page 14: Stylized Shadows

Algorithm DescriptionAlgorithm DescriptionAlgorithm DescriptionAlgorithm Description• Start with hard shadow visibilityStart with hard shadow visibility

• Compute distance transform of visibilityCompute distance transform of visibility

• Apply Gaussian blur Apply Gaussian blur

1. Visibility 2. Dist. Transform 3. Blur

Accurate Shadow

Page 15: Stylized Shadows

Algorithm DescriptionAlgorithm DescriptionAlgorithm DescriptionAlgorithm Description• Start with hard shadow visibilityStart with hard shadow visibility

• Compute distance transform of visibilityCompute distance transform of visibility

• Apply Gaussian blur Apply Gaussian blur

• Apply transfer function Apply transfer function

1. Visibility 2. Dist. Transform 3. Blur 4. Threshold

Accurate Shadow

Page 16: Stylized Shadows

Algorithm DescriptionAlgorithm DescriptionAlgorithm DescriptionAlgorithm Description• Start with hard shadow visibilityStart with hard shadow visibility

• Compute distance transform of visibilityCompute distance transform of visibility

• Apply Gaussian blur Apply Gaussian blur

• Apply transfer function Apply transfer function

• Light using modified visibility bufferLight using modified visibility buffer

1. Visibility 2. Dist. Transform 3. Blur 4. Threshold 5. Light

Accurate Shadow

Page 17: Stylized Shadows

Inflation and DeflationInflation and DeflationInflation and DeflationInflation and Deflation

• Implemented by taking isocontours of distance transform, Implemented by taking isocontours of distance transform, D(V)D(V)

– Inflation for D(V) > 0, deflation for D(V) < 0, original at D(V)=0

• Apply a threshold transfer function Apply a threshold transfer function f( ) f( ) to to D(V)D(V)

– Allows interactive changes without recomputation

• Analogous to inflating the original objectAnalogous to inflating the original object

Visibility, V(x) Dist. Transform, D(V(x))

Page 18: Stylized Shadows

Inflation ExamplesInflation ExamplesInflation ExamplesInflation Examples

Accurate Shadow

Inflation, i=20 Deflation, i=-10, s=5

Page 19: Stylized Shadows

World-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged Distance

• Screen space distance does not account for foreshorteningScreen space distance does not account for foreshortening

Screen-space Euclidean Dist.

Page 20: Stylized Shadows

World-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged Distance

• Screen space distance does not account for foreshorteningScreen space distance does not account for foreshortening

• We compute world-space distance using stored world positionsWe compute world-space distance using stored world positions

Screen-space Euclidean Dist. World-space Euclidean Dist.

Page 21: Stylized Shadows

World-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged Distance

• Euclidean distance has sharp changes in isocontour curvatureEuclidean distance has sharp changes in isocontour curvature

Screen-space Euclidean Dist. World-space Euclidean Dist.

Page 22: Stylized Shadows

World-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged DistanceWorld-space and Averaged Distance

• Euclidean distance has sharp changes in isocontour curvatureEuclidean distance has sharp changes in isocontour curvature

World-space Euclidean Dist.World-space Averaged Dist.

Page 23: Stylized Shadows

LLpp-averaged Distance Metric-averaged Distance MetricLLpp-averaged Distance Metric-averaged Distance Metric

• Euclidean metric determines minimum distance to contourEuclidean metric determines minimum distance to contour

• Instead, we use the average distance to the contourInstead, we use the average distance to the contour

– Originally presented by [Peng et al. 2004] for mesh inflation

• Parameter p allows tradeoff between smoothness and accuracyParameter p allows tradeoff between smoothness and accuracy

– We empirically found that p=8 is a reasonable compromise

Page 24: Stylized Shadows

Softness & BrightnessSoftness & BrightnessSoftness & BrightnessSoftness & Brightness

• Instead of a hard threshold, we use a Instead of a hard threshold, we use a smoothstep with width smoothstep with width ss

• Scale range from [0,1] to [Scale range from [0,1] to [bb,1],1]

– No upper bound, w/out loss of generality

– Allows combination of multiple functions

• Smoothness of Smoothness of D(V)D(V) allows smooth penumbrae allows smooth penumbrae

• Width can be changed without additional explicit blurringWidth can be changed without additional explicit blurring

Page 25: Stylized Shadows

Softness & Brightness ExamplesSoftness & Brightness ExamplesSoftness & Brightness ExamplesSoftness & Brightness Examples

Accurate Shadow Moderate Softness, s=20

Discrete Umbra and Penumbra

Page 26: Stylized Shadows

AbstractionAbstractionAbstractionAbstraction

• Defined as a limit on the curvature detail of shadows (isocontours)Defined as a limit on the curvature detail of shadows (isocontours)

• By blurring distance transform, it can be shown that curvature By blurring distance transform, it can be shown that curvature detail decreases away from medial axisdetail decreases away from medial axis

• Analogous to smoothing the original objectAnalogous to smoothing the original object

Distance Transform, D(V) Blurred, G D(V)

Page 27: Stylized Shadows

Abstraction ExamplesAbstraction ExamplesAbstraction ExamplesAbstraction Examples

Accurate Shadow

Moderate Abstraction, α=10 i=10 High Abstraction, α=70 i=10

Page 28: Stylized Shadows

Non-constant Stylization ParametersNon-constant Stylization ParametersNon-constant Stylization ParametersNon-constant Stylization Parameters

• Parameters can be a function of other propertiesParameters can be a function of other properties

– Such as time, surface geometry, or distance to shadow casters

• We define parameters as quadratic functions of approximate We define parameters as quadratic functions of approximate distance to the shadow-casting object distance to the shadow-casting object

– Allows for hardening of shadows (left) or selective detail preservation (right)

Accurate Shadow α = 13+4d-8d2, i = -2d2, s = 12-4d2

α = 10 s = 20d2

Page 29: Stylized Shadows

Monte-Carlo FilteringMonte-Carlo FilteringMonte-Carlo FilteringMonte-Carlo Filtering

• Both distance transform and blur evaluate an integral over screenBoth distance transform and blur evaluate an integral over screen

– We reduce computation by random Monte Carlo sampling

• Allows a time-quality tradeoff when moving light or camera Allows a time-quality tradeoff when moving light or camera

– Automatically decreases samples when necessary for frame rate

• Not necessary to compute when only changing stylizationNot necessary to compute when only changing stylization

– Abstraction only changes blur, which is very fast

24 Samples30 FPS

50 Samples18 FPS

120 Samples8 FPS

Page 30: Stylized Shadows

More ExamplesMore ExamplesMore ExamplesMore Examples

Accurate Shadow α = 20, i = 4, s = 1 α = 7, i = −4, s = 5 α = 20, i = 10, s = 25

Accurate Shadow α = 13+4d−8d2, i = −2d2, s = 12−4d2

α = 5, i = −4, s = 10 α = 20+10d, i = 5+10d, s = 50

α = 20, s = 20 α = 50, s = 50 i = 20, s = 50

Page 31: Stylized Shadows

Future WorkFuture WorkFuture WorkFuture Work

• More efficient (or low variance) dist. transformMore efficient (or low variance) dist. transform

• Investigation of additional stylistic parameters Investigation of additional stylistic parameters and variation functionsand variation functions

• Continuous (non-binary) visibility buffers Continuous (non-binary) visibility buffers

• Effective stylization for multiple lights and objectsEffective stylization for multiple lights and objects

• Control over shadow topologyControl over shadow topology

Page 32: Stylized Shadows

ConclusionsConclusionsConclusionsConclusions

• Our parameters allow for a range of stylization Our parameters allow for a range of stylization effects corresponding to traditional artistryeffects corresponding to traditional artistry

• Our method provides a flexible and efficient Our method provides a flexible and efficient framework for interactive stylization of shadowsframework for interactive stylization of shadows

• Variation with occluder distance generalizes Variation with occluder distance generalizes parameters to recreate natural phenomenaparameters to recreate natural phenomena

Page 33: Stylized Shadows

AcknowledgementsAcknowledgementsAcknowledgementsAcknowledgements

• Partially supported by the Sloan Foundation, and Partially supported by the Sloan Foundation, and NSF Grants CCF-0347427 and IIS-0511965NSF Grants CCF-0347427 and IIS-0511965

• Christopher DeCoro is supported by an Christopher DeCoro is supported by an ATI/AMD Technologies Research FellowshipATI/AMD Technologies Research Fellowship

• Models provided by UC Berkeley, AIM@Shape Models provided by UC Berkeley, AIM@Shape and DeEsponaand DeEspona

• Thanks especially to everyone at Princeton GFX Thanks especially to everyone at Princeton GFX that gave feedback during the development of that gave feedback during the development of this workthis work

Page 34: Stylized Shadows

QuestionsQuestionsQuestionsQuestions