Introduction

POVRay is a raytracer that reads a scene description file and renders images. This page describes a room scene that I created in POV Ray.
The scene consists of a room, a table, a chair, apples, a wineglass with water, a knife, and grass outside. Each of these entities are defined in their own files and included into the main scene. No external resources were used in making the scene (except for the POVray documentation).





Download the source files here

To render the image, at the command prompt, type:
$ povray +W800 +H600 +p +A0.1 -Imain.pov -Oroom.png

Scene Parameters

The above scene may take forever to render. Consider turning off some of the more expensive options this way:

"main.pov":

#declare DRAFT_MODE=0;
//Set this to DRAFT_MODE=1; to enable Draft mode. This is the fastest way to render the image, but produces the least quality image.

"parameters.pov":

#declare PHOTONMAP=1;
//Enables Photon Mapping. Disable this to get a small speed boost. The glass will no longer cast caustics on the table.

#declare RADIOSITY=1;
//Enables Radiosity calculations. Disable this to get a Large speed boost.


#declare AREALIGHT=1;
//Enables Area Lighting. This will cause hard shadows due to light from the window.


#declare FOGMEDIA=0;
//Enables a foggy atmosphere in the room. Enable this to 'see' the light coming through the window. Disable this to get a massive speed boost.



Image without Media Effects (50 Minutes Render time)


Image with Media Effects (6 Hours Render time)

Note: Measured render times at 1024x768 on a 2.2 ghz Core2Duo machine.

How-To

The room:
The room is constructed from CSG (Constructive Solid Geometry). Subtract a small box from a bigger box to make a basic hollow box. Subtract from this, another small box to make the window hole. This process is similarly used to make the window frame, and the buffer region between the tiles and the walls. The room floor is a set of squashed superellipsoids forming the tiles.


Floor Tiles


Furniture:
The table is a union of simple shapes. The chair is a not so simple CSG (Constructive Solid Geometry) object. Each backrest piece is made by subtracting a cylinder and a box from a slightly larger cylinder. The Seat is a cylinder with 3 cylinders and a box subtracted from it along the edges.


Chair


Apple:
The apples are isosurfaces made using 8 spheres and a cylinder. Imagine the frustum of a square pyramid. Place 4 large spheres on the corners of the larger square plane, and 4 smaller spheres on the corners of the smaller square plane. This forms the base shape of the apple. The small depression on the top of the apple is a cylinder with negative potential.


Apple


Wineglass:
The wineglass is a lathe object. So is the water in the wineglass. It is produced by drawing the outline of the wineglass as a spline, and revolving it to get the surface of revolution


WineGlass


Grass:
Each blade of grass is a triangle mesh (the level of detail of the grass blades can be modified in grass.pov). There are 10000 blades of grass with randomized color, orientation, scale and position.


Grass