370 likes | 876 Views
WYSIWYG NPR: Drawing Strokes Directly on 3D Models Robert D. Kalnins Lee Markosian Barbara J. Meier Michael A. Kowalski Joseph C. Lee Philip L. Davidson Matthew Webb John F. Hughes Adam Finkelstein Princeton University Brown University Outline Related Work Introduction Objective
E N D
WYSIWYG NPR:Drawing Strokes Directly on 3D Models Robert D. Kalnins Lee Markosian Barbara J. Meier Michael A. Kowalski Joseph C. Lee Philip L. Davidson Matthew Webb John F. Hughes Adam Finkelstein Princeton University Brown University
Outline • Related Work • Introduction • Objective • An Example • Paper • Toon Shaders • Stroke • Silleuette • Hatching • Results
Markosian et al. 1997 Salisbury et al. 1997 Deussen & Strothotte 2000 Meier 1996 Related Work 1/2 • NPR approaches • Producing still images
Markosian et al. 2000 Praun et al. 2001 Related Work 2/2 • NPR approaches • Producing still images • Interactive rendering (with temporal coherency)
Introduction • Direct WYSIWYG painting [Hanrahan & Haeberli 1990] • Directly painting texture maps onto 3D models
billboard bridge ground strokes terrain editing Introduction • Providing direct drawing interfaces for creating stylized scenes [Cohen et al. 2000]
Objective • A system that Provides direct drawing interfaces for creating stylized scenes • Starting with a 3D model, and • Drawing directly on it
Loading a model. Displaying the model in a silhouette style. An Example
Choosing a toon shader. Creating background color and texture. Adjusting the lighting. An Example
Choosing a brush. (black pencil) Selecting silhouette style. Drawing creases. An Example
Adding a label by drawing decal strokes. An Example
Drawing hatching. An Example
Choosing a toon shader. Creating background color and texture. Adjusting the lighting. Where we are…
Paper 1/2 • Background color or image
at h = 1, t(a) = clamp(2a) at h (0, 1), t(a) = h clamp(2a) + (1 – h) clamp(2a – 1) at h = 0, t(a) = clamp(2a - 1) Paper 2/2 • Media simulation for a paper effect • Paper texture encoding a height field, h [0, 1] • Compositing incoming color into the framebuffer with transparency t(a)
Generating texture coordinates from L . n Toon Shaders • Drawing each patch of the object • Using custom 1D texture maps [Lake et al. 2000]
Toon Shaders with Media Simulation • Rendered over a coarse paper texture
Where We Are… Crease strokes Decal strokes Silhouettes
Strokes 1/2 • Stroke primitive • [Northrup and Markosian 2000] • Represented as a Catmull-Rom spline • Elements under user control: • Color • Alpha • Width • Degree of taper at endpoints • “halo”
Strokes 2/2 • Visibility • Using an ID reference image: [Northrup and Markosian 2000] rendering mesh faces, crease edges, silhouette polylines – each in a unique color
this work [Hanrahan & Haeberli 1990] Decal Strokes • For drawing directly onto a surface • Represented as spline curves • Benefits: • No necessity for a parameterization of the surface. • No sampling artifacts • Consistent screen-space width of strokes
Crease Strokes • Creases: • Chains of mesh edges following sharp features • When a crease is oversketched, … • Recorded as a crease path + a set of displacements Base Path
Stylized Strokes • Rubber Stamping • Repeating a sequence of example offsets • Synthesizing by example • Adopting ‘video texture’ to generate less repetitive offsets [Schödlet al. 2000]
Silhouettes 1/4 • Applying a sketched prototype stroke to all silhouettes • Issues: • Silhouette detection • Temporal coherency
nv nv v v cv cv f(v) = nv. cv Silhouettes 2/4 • Silhouette detection: • Checking randomly sampled faces • Tracing neighboring triangles containing any silhouette
Silhouettes 3/4 • Temporal coherency • Silhouettes are view-dependent
Silhouettes 3/4 • Temporal coherency • Using arc-length parameter of the previous frame
Silhouettes 4/4 • Scaling • Scaling magnitude of the offsets • Only when zoomed out
Where We Are… Hatching
Hatching • Structured hatching • A group of roughly parallel strokes • Automatic LOD control User specified strokes Start transition
Hatching • Free hatching • Building LODs explicitly by the artist
Hatching • Mobile hatching • Hatching moving on the surface ex) the shade and the highlight
a mobile hatching group Hatching • Mobile hatching • Inferring light direction • Assume “diffuse highlights” or “dark light” • How… • 1. Projects the strokes into uv-space • 2. Computes their convex hull • 3. Finds its centroid c and records the normal nc nc c v u
n(u) a mobile hatching group T Hatching • Mobile hatching • Creating a mobile hatching group at each local maximum in l(u) • Using a threshold T • T=1/2 • Avoiding popping effect • Fade out as l(u) approaches T l(u) = nc.n(u) c v u
Results • Environment: • 1.5GHz Pentium IV CPU / GeForce3 GPU
Conclusion and Future Work • A system for drawing stroke-based NPR styles directly on 3D models • Extending to • Styles such as stippling and pointilism • Object-to-object interactions