From: sevigny@vlsi.polymtl.ca (Benoit Sevigny)
Subject: RenderMan compatible library for Amiga
Organization: Ecole Polytechnique de Montreal
Date: Fri, 4 Sep 1992 03:19:20 GMT

For those who wanted information on my RenderMan implementation, here is its history along with some implemention notes.

This project started as a school project in a C.A.D. course.  We had to implement a set of functions compatible with the RenderMan Interface routines.  These routines allows you to build your sceene and to set all your objects attributes and this is what several software claiming a RenderMan script compatibility implement.  These routines are usually integrated in a high level language (usually C) but it can be embedded in any other language (Rexx support could be very interresting).

The other side of a _real_ RenderMan package is the Shader Language.  In my project, I had to implement a pseudo RenderMan kernel that supports most of the real kernel functionality.  The Shader Language is a lot like C but it provides several new types and statements dedicated to image rendering, so I used C++ along some esoteric macros to approximate the Shader Language syntax.  The result is a highly compatible system that can be compiled with any C++ compiler, so my RenderMan package is not an interpre




ter, its is a full C++ library and it is fast.  That side of RenderMan is not (to my knowledge) supported by packages other than the real thing and this is what makes RenderMan powerfull.  You can extend your rendering tool by implementing any shader you want as when you create new C libraries.  My library is so RenderMan-looking that I compiled the RenderMan Companion's examples seamlessly.

As an extension to my project (the course was then over), I reworked the kernel so you could integrate new shaders in a more convenient way and added support for better argument passing.

I would like to note that the whole thing is based on the specifications given by the RenderMan Companion.  It was originaly compiled on Sun3 using G++, but I once compiled it with Lattice C++ and it worked fine, so there should be no problems in porting it to other compilers.  There are very few syntax incompatibilities with the real thing but these can be eliminated using Texas Instruments' CPP.

I still don't know what would be the terms of the release, but expect it to be something like public domain though I also consider commercial offer (I'm listening to your offers $^|^$ ).  The idea is that I would like to see it completed by someone else instead of letting it rot on my hard disk.  It is usable but it still requires some work to make it a competitive rendering package.


The following features are implemented in the actual package:

	- An object oriented way of adding new kinds of shapes (I currently have implemented polygons, spheres and quadrics);

	- The kernel renders the scene using ray-tracing (reflection and refraction are supported);

	- During the rendering process, shaders instances make possible argument passing without using global variables :^)

	- New shaders can be integrated without modifying the kernel at all;

	- Complete mathematical library (vectors, matrices);

	- The package currently produces binary .r/.g/.b files;

	- Full support for all the intrinsic RenderMan types (float, string, point and color);

	- Arbitrary number of dimensions for colors.


What the package lacks:

	- Parametric surfaces (Bicubic patches, NURBS, ...);
	
	- Non-procedural bump and texture mapping;

	- Anti-aliasing and filtering;

	- Volume, Transformation, Displacement and Imager shaders;

	- Other coordinate and light space than cartesian and RGB;

	- Complete control over quadrics (zmin, zmax, thetamax);

	- Ajustable level of detail;

	- Aggregate objects;

	- Animation support.

	- The documentation is poor.


My suggestions:

	- A Rexx Interface would be great (It could become a RenderMan Server);

	- New shaders and objects implemented as dynamic link libraries;

	- Interface libraries for importing objects from other rendering packages;
	- Full reflection and refraction support for nested mediums;

	- Other shading techniques (radiosity, ...);

	- IFF, frame buffer and intuition bitmaps as image destination;

	- Oversampling and alpha channel support.


Here is a detailed list of what has been implemented:

(y) means that it has been implemented;
(-) means that it is not fully functional;
(*) means that it could be easily implemented using the kernel primitives;
(n) means that it has not been implemented.

RenderMan Interface routines:

RiAreaLightSource:         n
RiAtmosphere:              n
RiAttribute:               *
RiAttributeBegin:          y
RiAttributeEnd:            y
RiBasis:                   n
RiBegin:                   y
RiBound:                   y
RiClipping:                *
RiColor:                   y
RiColorSamples:            n
RiConcatTransform:         y
RiCone:                    *  See Quadrics
RiCoordinateSystem:        n
RiCropWindow:              y
RiCylinder:                *  See Quadrics
RiDeclare:                 n
RiDeformation:             n
RiDepthOfField:            n
RiDetail:                  n
RiDetailRange:             n
RiDisk:                    n
RiDisplacement:            n
RiDisplay:                 y
RiEnd:                     y
RiErrorHandler:            n
RiExposure:                n
RiExterior:                n
RiFormat:                  y
RiFrameAspectRatio:        y
RiFrameBegin:              n
RiFrameEnd:                n
RiGeneralPolygon:          *
RiGeometricApproximation:  n
RiHider:                   n
RiHyperboloid:             *  See Quadrics
RiIdentity:                y
RiIlluminate:              y
RiImager:                  n
RiInterior:                n
RiLightSource:             y
RiMakeBump:                n
RiMakeCubeFaceEnvironment: n
RiMakeLatLongEnvironment:  n
RiMakeShadow:              n
RiMakeTexture:             n
RiMatte:                   *
RiMotionBegin:             n
RiMotionEnd:               n
RiNuPatch:                 n
RiObjectBegin:             y  I support nested objects, Pixar does not.
RiObjectEnd:               y
RiObjectInstance:          y
RiOpacity:                 *
RiOption:                  n
RiOrientation:             n
RiParaboloid:              *  See Quadrics
RiPatch:                   n
RiPerspective:             n
RiPixelFilter:             n
RiPixelSample:             n
RiPixelVariance:           n
RiPointsGeneralPolygons:   *
RiPointsPolygons:          *
RiPolygon:                 y
RiProcedural:              n
RiProjection:              y
RiQuantize:                n
RiRelativeDetail:          n
RiReverseOrientation:      n
RiRotate:                  y
RiScale:                   y
RiScreenWindow:            y
RiShadingInterpolation:    n
RiShadingRate:             n
RiShutter:                 n
RiSides:                   n
RiSkew:                    n
RiSolidBegin:              n
RiSolidEnd:                n
RiSphere:                  y
RiSurface:                 y
RiTextureCoordinates:      n
RiTorus:                   *  See Quadrics
RiTransform:               y
RiTransformBegin:          y
RiTransformEnd:            y
RiTransformPoints:         n
RiTranslate:               y
RiTrimCurve:               n
RiWorldBegin:              y
RiWorldEnd:                y

I also have a general Quadric generator that provide complete control over the quadric matrix.


The Shader Language library:

ambient:                   y
area:                      n
bump:                      y
calculatenormal:           y
comp:                      y
depth:                     n
diffuse:                   y
distance:                  y
Deriv:                     n
Du:                        n
Dv:                        n
environment:               n
faceforward:               y
fresnel:                   y
length:                    y
mix:                       y
noise:                     -
phong:                     y
printf:                    y  of course!
refract:                   y
setcomp:                   y
setxcomp:                  y
setycomp:                  y
setzcomp:                  y
shadow:                    n
specular:                  y
spine:                     y
trace:                     y
texture:                   n
transform:                 n
xcomp:                     y
ycomp:                     y
zcomp:                     y

The standard shaders:

constant:                  y
matte:                     y
metal:                     y
plastic:                   y
ambientlight:              y
distantlight:              y
pointlight:                y
spotlight:                 y
depthcue:                  n
fog:                       n
show_st:                   *
checks:                    *
show_xyz:                  *
screen:                    -
dented:                    -
wood:                      -
eroded:                    -
granite:                   -
blue_marble:               -

The special statements:

illuminance:               y
illuminate:                *
solar:                     *

The global variables:

_Cs:                       y
_Os:                       y
_P:                        y
_dPdu:                     n
_dPdv:                     n
_N:                        y 
_Ng:                       y
_u:                        -
_v:                        -
_du:                       n
_dv:                       n
_s:                        -
_t:                        -
_L:                        y
_Cl:                       y
_I:                        y
_Ci:                       y
_Oi:                       y
_E:                        y
_A:                        n


Evaluating the remaining require work is very difficult, it depends on how close to the real thing you want to get and what Amiga specific feature you want to add.  With the previous information, you can better than me evaluate the amount of work required to achieve your goals.  I hope this will answer most of your questions but feel free to contact me if you still have any.

=
RenderMan is a trademark of Pixar.

Thanks,

Benoit W Sevigny,
       -
sevigny@info.polymtl.ca
--
===============================================================================
     /// Benoit Sevigny, software | Skipping every x86 lines in your sources
 \\\///  engineering student      | might remove both your most irreductible
  \\V/   sevigny@info.polymtl.ca  | bugs and bottlenecks :-)