Ray Tracing Primitves with Toon Shading and Feature Lines

By Emily O'Neal - CPE 473 - Fall 2020

Description: For my final project I added NPR style rendering features to my renderer. I added toon shading and feature lines on both spheres and meshes. To accomplish the toon shading, I added an extension to my original phong diffuse calculation. I calculated the intensity at the point of intersection using the normal of the primitive and the light direction. That intensity value was then used to determine what weight should be used. That weight, is then multiplied by the phong diffuse color. To create silhouette feature lines, I used two different approaches. For the spheres I used a simple calculation to find if the normal was perpendicular to the viewing direction. For meshes, I utalized multisampling to test if any sample rays hit a different object than the original ray.

Toon/Cell Shading on Spheres
example image example image

Toon/Cell Shading on Meshes
example image

Feature Lines on Spheres
example image

Feature Lines on Meshes
example image

Final Images
example image example image

References

Links to useful resources: Toon Shading Using Distributed Raytracing and Ray Tracing NPR-Style Feature Lines