comp870 - Assignment 4

Overview

This assignment was to implement or modify some renderman shaders. For this assignment, I used the light bulb example from The Renderman Companion.

The new code for each example is available below.

Original


image
This is the original scene from The Renderman Companion.

Wavy glass

Changed file: bulb.sl

image
The surfrace normal is perturbed based on a cosine function and the surface position. While this would work better as a displacement shader, I wanted to keep the same scene across all examples.

Lit bulb

Changed files: bulb.sl filament.sl glow.sl metal.sl

image
This was added later, after I thought these were too boring. The bulb glow comes from mixing a bright yellow with the ambient and diffuse terms based on surface normal.

Cell "toon" shading

Changed files: bulb.sl filament.sl glow.sl metal.sl

image
The model is shaded in steps of color, based on the light intensity. The outline is added to locations where the surface normal begins to point away from the camera.