Summary
Our project develops a stylized cel-shading pipeline that combines edge texture, a cartoon-style shader, and texture mapping to create expressive non-photorealistic 3D rendering. The project focuses on both visual quality and efficiency, with the goal of supporting interactive scenes with multiple objects and light sources.
Problem Description
Context
Cel shading (or toon shading) is a type of non-photorealistic rendering designed to make 3D computer graphics appear to be flat and hand-drawn (Wikipedia). The cel-shading effect includes three main components: edge texture, shader, and texture mapping. The edge texture provides the boundary of the geometries, the shader gives the flat-color effect, and texture mapping adds vivid details to present the materials.
Problem
We are trying to combine the three main components of the pipeline together, and produce a special rendering art style. This opens up more possibilities for game and movie production. Moreover, we hope to explore how to speed up the process, since real-time rendering is important for video games. Designing a shader that represents a certain art style is the most exciting — and challenging — part, as it requires exploring how the direction of light reflection influences the artistic style.
General Solution
- Edge texture: One strategy is to create object outlines by rendering expanded hidden back-faces as a black silhouette behind the normally shaded front-faces. We will experiment with this solution to see whether it naturally composes over multiple objects, or whether we will need a smarter way to handle z-buffering.
- Shader: We can stylize the rendered object by changing the model's normal direction (one potential method is modifying its object-space normal map), and then use the altered normals in shading to produce simplified, painterly lighting effects. An important question is how to decide the quantization thresholds for when certain colors should be solid. This is especially important when dealing with lighting, and we may need to treat the light/shadow value as separate from the texture color itself.
- Texture mapping: We can combine different texture maps (diffuse, opacity, specular, glow, and reflection) with our shader to control different material properties while keeping the stylized shading effect.
Goals & Deliverables
How We Will Measure Quality and Performance
- Performance: We will construct a set of reference scenes with increasing numbers of objects and triangles, and measure the time to render a frame.
- Visual quality: Mostly we will need to inspect these by hand.
- Robustness: We will construct scenes with harder settings, such as objects that overlap in multiple ways, or multiple light sources on the same object, and make sure that the renderer remains correct even in these settings.
What We Plan to Deliver
- A scene rendered with cel shading, implemented as a rendering pipeline built from scratch. The scene can consist of multiple potentially overlapping objects and multiple light sources. The cel-shaded output should have proper edge detection for each object, and instead of blended colors it will have distinct solid colors, including the light and shadow regions.
What We Hope to Deliver
- The scene can dynamically update as we move the camera around, or as objects in the scene move. We may add a system that automatically generates a texture map or a mesh. We will provide configurable settings to change the number of colors allowed, the edge width, and similar parameters. We can add a camera raycast so the user can highlight or move objects around. We can also implement stylized shadows (e.g. crosshatch shadows, dithered shadows).
- Another bonus is performance: we can try to parallelize the raycasting and rendering and get this to run on a modern GPU.
Schedule
Week 1 (April 6–12)
Set up the project repository and the basic rendering pipeline. Read and interpret mesh files, implement a perspective camera, and render solid shapes with outlines.
Week 2 (April 13–19)
Implement edge detection and a basic lighting system. Render a simple scene with cel-shading outlines visible. Prepare milestone deliverables (report, video, slides).
Week 3 (April 20–26)
Implement flat-color shading with hard color boundaries. Integrate edge detection, shader, and texture mapping into a unified pipeline. Test on scenes with multiple overlapping objects and run performance benchmarking across scenes of increasing complexity.
Week 4 (April 27 – May 3)
Polish the renderer and add bonus features — more complex scenes, automatic texture map creation, user-facing configurations, stylized shadows, and GPU parallelization. Prepare the final deliverables (paper, webpage, video).
Resources
Computing & Software
For computing and hardware, we can develop this on personal computers or the class machines. We will largely write the code from scratch, and use HW3 as a starting point for the renderer.
Information Resources
- CS284A_50CelShades — Project Repository. Our own GitHub repository and project page for the "Fifty Shades of Celluloid" final project. Hosts the source code, project webpage, and deliverables.
- Wikipedia — Cel shading. Overview of cel/toon shading as a non-photorealistic rendering style that makes 3D graphics appear flat and hand-drawn. Describes the two outline techniques we plan to experiment with — inverted back-face culling and Sobel-style edge detection on depth and normal buffers — and places the technique in historical context through games such as Jet Set Radio, The Wind Waker, and Ōkami, and films like Into the Spider-Verse and Arcane.
- Cel-shading tutorial video (YouTube). Reference walkthrough of a cel-shading shader pipeline — used as a starting point for how to structure the ramp-based lighting and outline passes.
- Stylized rendering tutorial video (YouTube). Additional reference on stylized toon rendering and outline techniques; we use it as a visual target for what our pipeline should achieve.
- Babylon.js forum — Creating beautiful outlines for meshes (cel shading). Community thread discussing practical pitfalls of mesh outlines: built-in edge renderers producing overly thick or flickering lines, post-process approaches creating dotted artifacts during camera motion, and suggested fixes using Sobel edge-detection post-processes, outline post-processes, toon shaders, and edge-width / epsilon tuning. Directly relevant to the outline-stability problem we flag in our goals.
- Texture-Based Wireframe Rendering (SIBGRAPI 2010). Paper on rendering wireframes / interior edges via texture-space techniques rather than geometric edge extraction. A useful reference for our interior-crease detection pass beyond silhouette outlines.
- Raul Reyes Luque — Cell-Shading Dissertation (2012). A final-project dissertation on cel-shading techniques, accompanying the author's animated short-film project that combines 2D character animation with 3D environments. Useful as a worked example of integrating cel-shading into a real production pipeline.
Contributions
| Team Member | Contributions |
|---|---|
| Kevin Frans | |
| Qijun Li | |
| Shaoyi Wang | |
| Tao Sun |