Ink Line Rendering for Film Production Daniel Teece Walt Disney Feature Animation daniel.teece@disney.com
Introduction Coming up… Background Four routes to an ink line image Production examples
Ink Lines and NPR The bigger picture “Natural Media Emulation” Several commercial ‘toon renderers’ Research papers: Winkenbach Elber Gooch & Gooch Amongst others Books (Gooch & Gooch, Apodaca & Gritz)
Applications Why do we need to render lines? Outlines convey information minimally Simplicity of a line, variety of styles For Disney - merging with traditionally animated artwork Various uses, various approaches
Surface Shaders The shortest route Surface normal tested against view vector, and dot product compared to threshold value No rendering code needed (just a shader) Easy integration with rendering pipeline Able to take advantage of standard features in scanline renderer Difficult to control line width
Surface Shaders Shader example: float angle = abs(normalize(N) . normalize(I)); float border = 1 - step (0.3, angle); Ci = mix (Ci, color 0, border); (from [Apodaca, Gritz 00])
Image Buffers and Edge Detection An established and proven approach Sobel edge detection on reference images High resolution (often 4K or higher) Various render passes: Z Depth (one float per pixel) Surface Normal (one 3D vector per pixel) or N.I Object / Surface IDs (one or more ints per pixel)
Image Buffers and Edge Detection Strengths and Weaknesses Proven approach, production tested A lot comes “for free” - e.g. intersection lines, visibility Slow due to image size / multiple passes Finding threshold values can be difficult - limited fine-grain control
Technical illustration using edge detection Image Buffers and Edge Detection Technical illustration using edge detection
Image Buffers and Edge Detection Examples of production use Hercules - the Hydra Mulan - the Hun charge The Iron Giant - the Giant Osmosis Jones - Drix
Inverted Surface Outline Rendering A novel alternative Standard back face culling creates outlines from surfaces Each original surface has two surfaces, one flipped and slightly larger than original The offset between the surfaces is the line
Inverted Surface Outline Rendering A simple example
Inverted Surface Outline Rendering © Disney © Disney © Disney Images courtesy of Hiroki Itokazu, George Taylor and Lance Williams
Inverted Surface Outline Rendering Rendering can be completely off-the-shelf Focus shifts to modeling No line parameterization Surface intersections problematic
Geometry-based Ink Line Rendering Edge detection in object space Lines typically generated from polygonal data Rendering is more easily separated from line extraction NURBS edge extraction has also been explored [Gooch98] [Elber,Cohen90] Memory use shifts from image buffers to geometrical data structures
Geometry-based Ink Line Rendering Silhouette detection refinements Interpolation (edges across faces) Probabilistic Searching [Markosian et al 97] Edge buffer [Buchanan, Sousa 00] Other approaches: Dual Surface [Hertzmann, Zorin 00] Gauss Maps [Gooch et al 99]
Geometry-based Ink Line Rendering Strengths and Weaknesses Fast, but some computations are costly Vectorized lines can be used elsewhere Have to compute visibility Tessellation quality is critical Numerical precision issues Software development effort is larger
Case Study : Inka A hybrid ink line renderer Primarily a geometry-based approach Lines derived from tessellated geometry (not from NURBS as in Gooch / Elber) High level of localized control over lines Part of digital production pipeline Used for approvals / roughs and final art
Inka - Requirements Inka needed to support: Large models Faster render times High quality lines Controllability for LookDev TDs © Disney
Line Segment Generation Visibility Determination Inka - Process Attributes Attribute Parsing Geometry Surface Tessellation Camera Scan Conversion Line Segment Generation Line Refinement Visibility Determination Output Image Line Drawing Vector Lines
Inka - Attributes A text file providing ink line directives # Set line width and color width *object1* 1.5 color *object2* 0.6 0.5 0.4 1.0 # Turn off certain lines noLine *object1* vmin,vmax noLine *object2* trim # Visibility directives outlineZMin *object1* 0.0002 selfZBias *object2* 0.08
Inka - Tessellation NURBS / SubDs to triangles Can have significant impact on results View dependent / view independent Trims are supported Inventor format - pipeline standard
Inka - Line Segment Generation Line types: Silhouettes Boundaries Trims Surface Curves Space Curves Creases Intersections are computed separately
Inka - Visibility High resolution Z-Buffer Appel’s quantitative visibility [Appel67] was initial approach Z-Buffer is higher resolution than image (typically 2x - 4x) Line edges compared with scan-converted surface depth values Numerical precision can be an issue
zBias moves point towards viewer Inka - Visibility Issues zBias zBias moves point towards viewer ambiguous intersections
Inka - Line Drawing Merged lines are scan converted edge by edge Tapering and other effects may be applied Alpha accumulation is controlled by attributes and pixel compositing modes
Inka - Line Quality Line shaders allow user to control variation of color, width etc. Line tapering lends hand-drawn appearance, using screen-space algorithm Further extended by vector output - lines replaced by other drawing primitives (e.g. Sable stroke renderer)
Inka - Line Quality © Disney Tapering lines
Vector output in interactive viewer Inka - Vector Viewer Vector output in interactive viewer
Inka - Extra Features Simple paint layers Memory management (geometry groups) Animated attributes SWF export Line attenuation based on depth Width and opacity can vary with distance
Inka - Summary Geometry-based Highly controllable Part of production pipeline Film appearances: The Emperor’s New Groove (2000) Atlantis - The Lost Empire (2001) Lilo and Stitch (2002) Treasure Planet (2002)
Inka - Summary Inka software developers : Yun-Chen Sung Mike King Patrick Dalton Rasmus Tamstorf Joe Lohmar Ramon Montoya Vozmediano Daniel Teece
Conclusions Different approaches, each with merits and pitfalls Image quality over speed Controllability over interactivity Integration is important
Acknowledgements Hiroki Itokazu Tad Gielow Jack Brooks