Post on 15-Jan-2016
transcript
X-Toon: An Extended Toon ShaderX-Toon: An Extended Toon Shader
Pascal Barla, Joelle ThollotARTIS GRAVIR/IMAGE INRIA
Lee MarkosianUniversity of Michigan
OutlineOutline
IntroductionIntroductionTone DetailShape DetailDiscussion and Future Work
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
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
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
OutlineOutline
IntroductionTone DetailTone DetailShape DetailDiscussion and Future Work
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)
OutlineOutline
IntroductionRelated WorkTone DetailTone Detail
Depth-based attribute mappingDepth-based attribute mappingOrientation-based attribute mapping
Shape DetailDiscussion and Future Work
““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
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
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
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
Depth-based LOD EffectsDepth-based LOD Effects
smooth out the shading with distance
mimic a discrete LOD behavior
make a receding shadow effect
Focus-based Detail MapFocus-based Detail Map
blurred texture
a texture where contrast and opacity are decreased
Aerial PerspectiveAerial Perspective
OutlineOutline
IntroductionTone DetailTone Detail
Depth-based attribute mappingOrientation-based attribute mappingOrientation-based attribute mapping
Shape DetailDiscussion and Future Work
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)
Near-silhouette Abstraction & BacklightingNear-silhouette Abstraction & Backlighting
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)
HighlightsHighlights
OutlineOutline
IntroductionTone DetailShape DetailShape DetailDiscussion and Future Work
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
Four Types of Abstracted ShapeFour Types of Abstracted Shape
OutlineOutline
IntroductionTone DetailShape DetailDiscussion and Future WorkDiscussion and Future Work
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
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
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