Jeff's RENDER2

After building my first raytracer, I learned many things, some of which could not be easily retrofitted. Thus, when I decided to do a raytracer for my CS488 class project, I took advantage of the oppurtunity to build the raytracer the RIGHT way. RENDER2 was then born.

Capabilities Matrix:

Ability Degree Implemented Comment
Primitives Spheres, Extrusions, Planes, Bezier Patches, Boxes Only non-rational beziers supported
Shaders Constant, Lambertian, Plastic, Glass None
Materials Anything you like None
Trimming Of planes, with polygons, circles, and squares Alternating rule used
Description Language Support for DEFINEs and INCLUDEs. Hierarchial in nature. No forward references
Geometry Import Can import Houdini style GEO files Only supports Bezier surfaces, Polygons, and Spheres.
Cameras Pinhole, with variance based antialiasing None
CSG Intersection, union, inverse difference, difference, A, B All primitives work.
Optimizations BBox for trims, and objects. Automatic spatial hierarchy generation. None
Miscellaneous Reflections, transparencies, transparency falloff with depth None

Bezier Intersections

Two forms of bezier intersections are provided. One can either use bezier clipping (which is fast and accurate), or Algebraic Pruning, which is not fast, nor particularly accurate. Needless to say, the former is the suggested method.

Materials

Rather than work with predefinied material types, one can create ones own materials procedurally. This is done by specifying a series of "projections", each which describes how to alter the description of the intersection point or the material colour at that point. Thus, such features as bump mapping can be added by tweaking surface normal based off intersection position. Or, a normal shader can be created by taking the absolute value of the surface normal and setting the material colour to that value.

To give some indication of the flexibility available, a partial listing of projectors is: PROJ_LOAD, PROJ_CHECKER, PROJ_MOVE, PROJ_ADD, PROJ_MULT, PROJ_ABS, PROJ_MIX, PROJ_CLIP, PROJ_NORMALIZE, PROJ_HASH, PROJ_NOISE, PROJ_DNOISE, PROJ_TURBULENCE, PROJ_MAPPROJ_LUT, PROJ_BITMAPPROJ_DIST, PROJ_BUMPMAP, PROJ_SIN, PROJ_TRIPLICATE.

Screen Shots

Yeah, what you really came here for.

Some of these have been reduced to 256 colours to save space. Some have lost quality in JPEG saving for the same reason. The provided source text is not guaranteed to work with the latest version of my ray tracer, but was used to generate the image.

While all images in the previous raytracer could be recreated, there is no point relisting them here. Instead, only new images are shown. Also, while many of these make reference to external geometry files, such files are not included as they would consume inordinate amounts of disk space.

Coffee!

320x240 160x120, AntiAliased 160x120, Point sampled
A mug of that life giving compound,
Coffee. Smaller version, with variance antialiasing Smaller version, no antialiasing
The marble table is a solid texture, and the mug done with a texture map. Note the increasing opacity of the cofee with depth, as shown with the stir stick. Click here for the source

An Evil Slug

A standard slug, purple in
colour with yellowed fangs and horn, and green spines down its back

It's a SLUG, damnit. Not a worm! Note the bumpmaps just about everywhere, and the excessive use of geometry. The horn and fangs, furthermore, are a mottled yellow, not a solid colour. Click here for the source


Back to Jeff's Homepage