What is Renderman?
Actually, Renderman consist of two things, Renderman Interface and
Renderman Shading Language. Renderman interface is a set of protocols,
which describe how a modeling application translates data into rendering
program (note, rendering program can be software implementation, device
or rendering algorithm). This means that geometry and scene from modeling
program has to be described in a certain way described with this protocol.
Main goal of Renderman is to provide compatibility between different
modeling programs and rendering programs. Think of it as a Postscript
for 3D. As you can print from all your programs to any kind of printer
with Postscript, in theory you can render from any 3D application
with any rendering program if they are Renderman compatible. Since
there are a great variety of rendering methods (i.e. Z-Buffer, Raytracing,
Scanline…), Renderman only describes how things should move from 3D
application into render program. In a way, Renderman describes what
the output should be, but not how it should be done in render program.
Renderman compatible programs should follow syntax and idioms written
by Pixar. Pixar issues a document, which is called RISpec (Renderman
Interface Specification), in which they describe the whole Renderman
protocol.
What Renderman consists of?
SCENE DESCRIPTION - RIB
All data translated from 3d application into renderman compatible
renderer is kept in something called a scene description. Think
of it as a big file (or files) that keep everything you've exported.
File that keeps all this info is also referred to as RIB (Renderman
Interface Bytestream). RIB files contain metadata, which is a fancy
word for "data about data". RIB files are text files so
they may (and do) get pretty large, although they can be compressed
etc. This scene description file keeps information about "things"
(or metadata from now on) in the scene. These things are geometry,
lights, cameras, particles and everything else you might have in
your scene. Each scene description also holds information about
the final output, like what kind of resolution is needed for output,
what kind of Anti-Aliasing is setup for output, etc. Important thing
to notice is that for each frame in the scene, RIB file starts from
the beginning. So, you might say that for each frame exported you
get an independent scene description. Without going into too much
detail for now, let me just point out that RIB file can be nested,
so you can have multiple frames in one RIB file and you can have
parts of it in separate RIB files which are referenced in the main
file. To explain this a little further, let's say you have a RIB
for one frame of the scene, which contains a sphere. This sphere
can be in a separate RIB file, and when the scene RIB needs this
sphere it will look into RIB that contains that sphere. Enough said,
let's look at what RIB can hold:
SCENE ITEMS
Items of the scene are anything not geometry related. This may be
camera, lights etc.
DESCRIPTIONS
Each item in RIB file can hold metadata about itself. To simplify,
each data (item or geometry) can hold some kind of attachment, which
further descript and/or complement the data itself. This may sound
confusing, but it's really one of the fundamental things in Renderman
and any other programming language. Let's examine a hypothetical
situation. You want a sphere in your scene. Sphere as a procedural
primitive has its creation parameters, for example radius. So, when
you add a sphere into the scene, you may attach description, which
tells what sphere's radius is. These kinds of descriptions are called
input and/or creation parameters (duh), but there is also one other
kind of descriptions, which have spread the fame about Renderman.
Enter Shaders. Shader is a description attached to a surface (another
word for geometry) or item. Shaders can have their own creation
parameters too. With shaders you attach a description, which tells
the renderer what will the surface or item behave in the process
of rendering. Shaders are not a part of RIB; they are separate pieces
of code written with RSL (Renderman shading Language) syntax, which
is another part of RISpec. In a word, shaders are separate files,
which are not written with language like RIB.
GEOMETRY
Geometry can be anything from low-level primitives like vertices,
polygons, and curves to high-level primitives like quadrics, bicubic
patches, trimmed NURBS, CSG and others. Primitive objects by themselves
are fundamental building blocks of 3D geometry. Difference between
low-level and high-level primitives is in that low-level primitives
are the lowest form of geometry presentation, and high-level primitives
are just a compound "things" of low-level primitives.
So, high-level primitive has a special type of binding low-level
primitives into a more complex type of primitive object.
SHADING LANGUAGE
Shaders are written with RSL (Renderman Shading Language). These
descriptions tell the renderer what to do when it needs to render
the surface or light that has a shader attached. In order to use
shaders you can give them input parameters (for example what color
is the surface) and shader will return it's values to the surface
it is attached to in order that renderer can proceed with it's rendering.
Input parameters for shaders are something you describe when you
write a shader. You can have shader receive color of the surface,
but if none is given to it, shader can have its default color, which
you can also describe. This is how shaders work. You give them input
values, and they give you output values. These output values are
what renderer uses for rendering. There are several types of shaders,
each one with it's own usage. Shader types are: Surface, Displacement,
Volume, Light and Imager Shaders. Let's have a look at what each
type of shader is used for.
Shaders
Surface shaders -Surface shaders are
attached to geometry. These shaders describe optical properties
of geometric object. Simply said, Surface shaders tells the renderer
what will the surface look like when it is hit by the light. Consider
this shader, as the one that describes what will the object look
like
Displacement shaders - These shaders
change the topology of the surface. In order to change the topology,
Displacement shader can do one of two things. It can do REAL displacement,
which moves the actual geometry, or it can move the surface normals,
which produce the infamous BUMP effect. These shaders are also attached
to the geometry.
Volume shaders - Volume shader changes
the color of the light ray as it travels through volume. Volume
can be one of several things. For one, it can be geometry. If light
ray travels through geometry and it has volume shader attached,
this shader will modulate light ray's color in a way you've described
in shader. Secondly, volume can be light item. This means that you
can have, for example, Spot Light's cone represent the volume through
which light ray's will be modulated by a volume shader (volumetric
lights). As for the third type of volume, if volume shader isn't
attached to anything, it will be considered as atmospheric volume
shader. Consider fog, myst and similar effects.
Light shaders - This shader represents
the light source. With light shader you describe the emission of
light rays from the source (item that has the light shader attached)
to the destination point, which is the surface being illuminated.
These shaders generally give control over light color, shadows,
intensity, falloff with distance, barn doors etc. Light shaders
are shaders with which you control light sources. Important to note
is that light source to which this shader can be attached to is
either light item or geometry.
Imager Shaders - Imager shaders
operate on image just prior to the final output. When renderer is
finished with calculating pixel colors for the image output, this
shader operates on these pixels. Look at this kind of shaders as
MAX Render Effects. It's a post-process shader, but with access
to scene data (just like MAX Render Effects).
Benefits of Renderman
INDUSTRY STANDARD - This may not
be obvious at first, but with lots of studios working with this
Standard, general support is widely available. The fact that the
world largest CG Animation studio stands behind it saysA lot. Lots
of pioneers in CG field worked on the standard, it has a proven
track of record, and it is widely regarded as THE render platform.
IT IS A STANDARD - This means that
any RISpec compatible renderer can render out the scene from any
Rispec compatible exporter. This means that renderers are generally
compatible between them, and if one is not suitable for your need,
you can switch to other with very small amount of pain. Shaders
are generally compatible between renderers also. In this way, you
can switch shaders from render to render without too many problems.
PROGRAMABILITY - RISpec defines
two languages, RIB description format, and RSL. With both you can
achieve anything you like. For example, you can add your own geometric
primitive, or you can import your own particle data, for example.
With surface shaders, you can describe the surface to behave exactly
how would you like it to behave. RISpec offers several ways to access
data; one way is via RIB and Shaders. The other way is via C binding
API. This means that you can have control over RIB scene and shaders
from within a C style program. This offers a great amount of control.
IMAGE QUALITY - With Rispec being
a technical document describing what is and what isn't Renderman,
you get something you wouldn't expect to see in this kind of document.
Rispec actually describes what the final quality of the generated
image should be! With this, you can be sure that any RISpec compatible
renderer will generate a superb quality image. Quality relates to
Anti-Aliasing method, color range etc.
|