x-toon: an extended toon shader pascal barla, joelle thollot artis gravir/image inria lee markosian...

27
X-Toon: An Extended Toon X-Toon: An Extended Toon Shader Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Post on 15-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

X-Toon: An Extended Toon ShaderX-Toon: An Extended Toon Shader

Pascal Barla, Joelle ThollotARTIS GRAVIR/IMAGE INRIA

Lee MarkosianUniversity of Michigan

Page 2: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

OutlineOutline

IntroductionIntroductionTone DetailShape DetailDiscussion and Future Work

Page 3: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

IntroductionIntroduction

Toon shading: simple but effectiveA dot product between a light vector and

surface normal1D texture

“dark” to “light” regions 2 ~ 3 constant color (comics, traditional animation)

Can be implemented efficiently via vertex and fragment programs on modern GPUs

Page 4: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

LimitationLimitation

Does not reflect the “importance” or desired level of detail of a surfaceDepth-of-field

View-independentView-dependent highlights,

view-dependent backlighting effectFull accuracy

A degree of abstraction so that small shape details are omitted

Page 5: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

X-ToonX-Toon

Supports view-dependentTone detail

Tone varies with depth or orientation relative to the camera

1D texture → 2D texture

Shape detailUsing a modified normal field defined by

interpolating between normal of the original shape and normal of a highly abstracted shape

Page 6: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

OutlineOutline

IntroductionTone DetailTone DetailShape DetailDiscussion and Future Work

Page 7: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Tone DetailTone Detail

Toon texture: 1D → 2DHorizontal: n‧l (lambertian shading)

Vertical: tone detailThis axis corresponds to its own 1D toon texture

Attribute maps Control the tone detail and provide functionsView-dependent attributes

Depth-based attribute mapsOrientation-based attribute maps( LODs, aerial perspective, depth-of-field, backlighting, specular highlights)

Page 8: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

OutlineOutline

IntroductionRelated WorkTone DetailTone Detail

Depth-based attribute mappingDepth-based attribute mappingOrientation-based attribute mapping

Shape DetailDiscussion and Future Work

Page 9: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

““Depth” of A Point in 3DDepth” of A Point in 3D

Distance between the eye and pDepth-of-field

Distance along the focal axisLODs, Aerial perspective

Page 10: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

User-specified ParametersUser-specified Parameters

zmin the distance at which the detail starts

decreasingr > 1

the scale factor that defines the coarsest detail at distance zmax = r*zmin

zmin

zmax = r* zmin

Page 11: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Perspective ProjectionPerspective Projection

Formula for detail mapping

min

min

max

min log1

log

log

1z

z

zz

zz

D r

rr

zmin

zmax = r* zmin

Page 12: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Depth-of-FieldDepth-of-Field

Formula for detail mapping

c

c

zz

zz

zz

zz

zz

zz

,

log

log

,

log

log

1

max

min

max

min

max

min

D =

minmax

minmin

rzzz

zzz

c

c

Page 13: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Depth-based LOD EffectsDepth-based LOD Effects

smooth out the shading with distance

mimic a discrete LOD behavior

make a receding shadow effect

Page 14: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Focus-based Detail MapFocus-based Detail Map

blurred texture

a texture where contrast and opacity are decreased

Page 15: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Aerial PerspectiveAerial Perspective

Page 16: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

OutlineOutline

IntroductionTone DetailTone Detail

Depth-based attribute mappingOrientation-based attribute mappingOrientation-based attribute mapping

Shape DetailDiscussion and Future Work

Page 17: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Near-silhouette Attribute MappingNear-silhouette Attribute Mapping

Attribute map based on the orientation of the surface with respect to the observerView-dependent effectFading of near-silhouette regions, or

brightening and coloring of near-silhouette regions to suggest a virtual “backlight”

Near-silhouette attribute mapping0,vn rD

r(controls the magnitude of the effect)

Page 18: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Near-silhouette Abstraction & BacklightingNear-silhouette Abstraction & Backlighting

Page 19: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Specular HighlightsSpecular Highlights

View-dependent effectModel various material highlights

Depending on the chosen 2D texturecontrol the profile of the highlight (smoothness, width,

alpha) so that it is correlated with the underlying tone

e.g., plastics or metalsHighlight attribute mapping (Phong highlight model)

1,rv sDs

(shininess coefficient)

Page 20: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

HighlightsHighlights

Page 21: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

OutlineOutline

IntroductionTone DetailShape DetailShape DetailDiscussion and Future Work

Page 22: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Abstracted ShapeAbstracted Shape

Geometric mapModify the surface normal fieldMap the input mesh to an “abstracted shape”

lower bound for shape detailhas a direct correspondence with the input surface

Blending parameterControls how the shader interpolates

Important propertyKeeping the original silhouettes of the model

Page 23: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Four Types of Abstracted ShapeFour Types of Abstracted Shape

Page 24: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

OutlineOutline

IntroductionTone DetailShape DetailDiscussion and Future WorkDiscussion and Future Work

Page 25: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

PerformancePerformance

Extensions to the original toon shader, aimed at retaining its simplicity while allowing more general behaviors

Model Size Resolution Toon X-Toon Ratio

Mech part10,000

20,000

640x480

1280x950

287

268

241

222

1.19

1.21

David26,051

49,998

640x480

1280x950

94

90

80

76

1.18

1.18

Terrain105,152

208,962

640x480

1280x950

33

32

28

27

1.18

1.19

Page 26: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Future WorkFuture Work

Extend to handle other attributesUse optical flow to assign less detail to

objects as they move faster in image spaceMultiple interpolation weights (geometric mapping)

HaloingLabeled importancePoints of interest

Page 27: X-Toon: An Extended Toon Shader Pascal Barla, Joelle Thollot ARTIS GRAVIR/IMAGE INRIA Lee Markosian University of Michigan

Future WorkFuture Work

Geometric mapping → multiple shapes

Control the shape of highlights

Tech. Rep. 2005

Multiscale Line Drawings from 3D Meshes

IEEE Comput. Graph. 2003

Stylized Highlights for Cartoon Rendering and Animation