Assignment 1: Shading

Created by Jeffrey Dong and Roger Chen.

Click on the pictures for a larger image.

Diffuse only:

-kd 1 1 1 -dl -1 -1 -1 1 1 1

Specular only (directional light source):

-ks 1 1 1 -sp 8 -dl -1 -1 -1 1 1 1

Specular only (point light source):

-ks 1 1 1 -sp 8 -pl 1 1 1 1 1 1

Combined specular and diffuse shading:

-kd 1 1 1 -dl -1 -1 -1 1 1 1

Combined specular, diffuse, and ambient

-kd 1 1 1 -dl -1 -1 -1 1 1 1

Multiple light sources:

-ka 0.05 0.05 0.05 -kd 0.8 0.8 0.8 -ks 1 1 1 -sp 64 -pl 2 2 2 1 1 0 -pl -2 2 2 0 1 1 -pl 0 -2 2 1 0 1

Toon shader (with modified background color):

-ka 0.25 0.1 0.05 -kd 0.65 0.2 0.01 -ks 1 1 1 -sp 64 -dl -1 -1 -1 1 1 1 -ts 3 5 -bgc 0.25 0.25 0.25

Toon shader with thick red outline:

-ka 0.25 0.1 0.05 -kd 0 0 0.8 -ks 1 1 1 -sp 64 -dl -0.8 -1.3 -0.7 1 1 1 -ts 7 20 -bgc 0.1 0.1 0.1 -tsc 0.4 0 0.05

Anisotropic highlights:

-ka 0.1 0.1 0.1 -kd 0 0 0.8 -ks 1 1 1 -dl -0.8 -0.8 -1.2 1 1 1 -an 0.1 0.8

Anisotropic higlights + toon shading:

-ka 0.1 0.1 0.1 -kd 0 0 0.8 -ks 1 1 1 -dl -0.8 -0.8 -1.2 1 1 1 -an 0.2 3 -ts 4 5

Texture mapping, diffuse only:

-ka 0.1 0.1 0.1 -kd 0 0.6 0.3 -ks 1 1 1 -dl -0.8 -0.8 -1.2 1 1 1 -sp 64 -dtex texture_stone.png

Texture mapping diffuse and specular:

-ka 0.05 0.05 0.1 -kd 1 1 0 -ks 1 1 1 -dl -0.8 -0.8 -1.2 1 1 1 -dl -0.5 0.3 -1 1 1 1 -sp 64 -dtex texture_smile.png -stex texture_smile.png

Bump mapping:

-ka 0.05 0.05 0.05 -kd 0.75 0.75 0.75 -ks 1 1 1 -dl -0.8 -0.8 -1.2 1 0 1 -dl 0.8 -0.8 -1.2 1 1 0 -sp 128 -bump bump_shape.png

Bump and texture mapping:

-ka 0.05 0.05 0.05 -kd 0.75 0.75 0.75 -ks 1 1 1 -pl -1 -2 3 1 0.9 0 -pl -2 3 1 0 1 0.9 -pl 3 -2 1 0.9 0 1 -sp 128 -bump bump_grain.png -dtex texture_stone2.png

Texture credits:
texture_stone by texturelib.com
texture_stone2 by agf81
texture_smile downloaded from clipartpanda.com