Computer Graphics, Spring 2013

Ray Tracing Examples


Notice that these examples were created using a (somewhat) feature complete code. Your output may be different if some features were not implemented yet (e.g. specular highlights, shadows).


Ray-Primitive and Ray-Scene Intersection

sphere
A sphere
raypro sphere.scn sphere.jpg
box1
A box
raypro box1.scn box1.jpg
box2
A box
raypro box2.scn box2.jpg
tri
A triangle
raypro tri.scn tri.jpg
ico
A mesh
raypro ico.scn ico.jpg
teapot
A mesh
raypro teapot.scn teapot.jpg
cylinder1
A cylinder
raypro cylinder1.scn cylinder1.jpg
cylinder2
A cylinder
raypro cylinder2.scn cylinder2.jpg
cone1
A cone
raypro cone1.scn cone1.jpg
cone2
A cone
raypro cone2.scn cone2.jpg
fourspheres
A scene
raypro fourspheres.scn fourspheres.jpg
sixtriangles
A scene
raypro sixtriangles.scn sixtriangles.jpg
mixedprimitives1
A scene
raypro mixedprimitives1.scn mixedprimitives1.jpg
mixedprimitives2
A scene
raypro mixedprimitives2.scn mixedprimitives2.jpg

Lighting and Shadows

diffuse
Diffuse
raypro diffuse.scn diffuse.jpg
specular
Specular
raypro specular.scn specular.jpg
shininess
Shininess
raypro shininess.scn shininess.jpg
dirlight1
Directional light
raypro dirlight1.scn dirlight1.jpg
dirlight2
Directional light
raypro dirlight2.scn dirlight2.jpg
pointlight1
Point light
raypro pointlight1.scn pointlight1.jpg
pointlight2
Point light
raypro pointlight2.scn pointlight2.jpg
spotlight1
Spotlight
raypro spotlight1.scn spotlight1.jpg
spotlight2
Spotlight
raypro spotlight2.scn spotlight2.jpg
materials
Materials
raypro materials.scn materials.jpg
hardshadow
Hard shadows
raypro hardshadow.scn hardshadow.jpg
forShadow
Hard shadows
raypro forShadow.scn forShadow.jpg
softshadow
Soft shadows
raypro softshadow.scn softshadow.jpg

Scene transformations

sphere_transform
A transformed sphere
raypro sphere_transform.scn sphere_transform.jpg
sphere_transform2
A transformed sphere
raypro sphere_transform2.scn sphere_transform2.jpg
mixedprimitives3
Mixed primitives (using transformations)
raypro mixedprimitives3.scn mixedprimitives3.jpg
transform
More transformations
raypro transform.scn transform.jpg

Specular rays

specular0
raypro specular.scn specular0.jpg -max_depth 1
specular1
raypro specular.scn specular1.jpg -max_depth 1
specular2
raypro specular.scn specular2.jpg -max_depth 1
stilllife0
raypro stilllife.scn stilllife0.jpg -max_depth 1
stilllife1
raypro stilllife.scn stilllife1.jpg -max_depth 1
stilllife2
raypro stilllife.scn stilllife2.jpg -max_depth 1

Texture Mapping

texture
Texture Mapping (texture image)

raypro texture.scn texture.jpg

Camera Antialiasing

antialias1
raypro sphere.scn antialias1.jpg -antialias 1 -width 64 -height 64
antialias4
raypro sphere.scn antialias4.jpg -antialias 4 -width 64 -height 64
antialias16
raypro sphere.scn antialias16.jpg -antialias 16 -width 64 -height 64
antialias256
raypro sphere.scn antialias256.jpg -antialias 256 -width 64 -height 64

Debugging

sphere
Intersect with a sphere

rayview sphere.scn d_sphere.jpg
cylinder
Intersect with a cylinder

rayview cylinder1.scn d_cylinder.jpg
cone
Intersect with a cone

rayview cone1.scn d_cone.jpg
teapot
Intersect with a teapot

rayview teapot.scn d_teapot.jpg