The REYES Architecture
Offering the utmost flexibility,
REYES is fast, efficient and
sometimes the perfect tool for the job.
The Secret of the REYES Architecture
The original cornerstone of RenderMan, the REYES algorithm, offers exceptional memory management, which means the renderer is able to handle an astonishing amount of geometry, texture maps, shaders, and anything else you can throw at it. This ability to efficiently manage and render large amounts of data means that the REYES Algorithm is able to create images with unparalleled complexity and beauty. Often this efficiency is accomplished by using "cheats" like pre-passes (shadow maps and point clouds).
RIS offers powerful single-pass workflows involving intensive ray tracing, but it's good to know that the hybrid REYES architecture is available to provide an entirely different approach to any given production problem.
So How Does REYES Work?
A rather technical discussion ...
At the heart of Pixar's RenderMan is the REYES algorithm (which stands for Renders Everything You Ever Saw), and it's a the source of RenderMan's power. What follows is a rather geeky discussion of what exactly RenderMan does when it renders a scene for those who want to learn more about what makes RenderMan tick.
Rendering with REYES
Do you know your REYES from your rays? Well, forget rays for the time being, we are here to talk about REYES — the algorithm that processes the geometry for Pixar's RenderMan renderer. Production rendering is all about processing geometry, lots of geometry. RenderMan, by design, does this exceptionally well, and understanding how RenderMan takes geometry from your scene — be it nurbs, polygons or a subdivision surface — and processes it into shaded micropolygons is important to harness the full power of RenderMan. Understanding the REYES geometry-processing engine is fundamental to leveraging the power that RenderMan gives you.
So at the start of the rendering pipeline we have geometric primitives from an animation package like Autodesk's Maya or Side Effects' Houdini. This 3D data is delivered to RenderMan in RIB files (this translation is hidden when rendering with RenderMan internally in Maya, but the RIB is exposed if rendering with RenderMan Pro Server). The RIB files are parsed and fed into Pixar's RenderMan. This processing pipeline has been described many times in varying degrees of complexity. To help you understand it at a high level, we will use an analogy of the REYES engine as a big, mechanical robot consuming and digesting your scene.
Send the Geometry to REYES
The first step, in rendering an image with RenderMan, is getting the geometry into the mouth of the rendering robot. Geometry arrives as a banquet platter of RIB which is passed to the mouth of the beast. The mouth is equivalent to the viewing area (viewing frustum) that your camera has of your scene: some things are visible and get processed; and some things are not, so they are culled and discarded. Already we are gaining memory advantages by discarding objects that are simply out of view.
Splitting and Dicing Geometry
Next Bound and Split the Geometry
To determine what fits in the viewing frustum, the REYES machine looks at the size of each primitive during a process called bounding. RenderMan checks the bounding box of each primitive, and everything entirely outside of the mouth is trivially discarded, but some primitives are half-way in and half-way out the mouth and must be split into smaller pieces. Once in the mouth, the primitives must be chewed into smaller pieces so they can be swallowed. This iterative process of breaking geometry into smaller, bite-sized sub-primitives (e.g. a nurbs model primitive is split into many small nurbs patch primitives), is known as splitting. The REYES robot chews the primitives until they are small enough to swallow and digest. Essentially all primitives split until they fit completely within a single bucket. Just before being swallowed they are sorted front to back. When a split primitive is swallowed it is subdivided into a cluster of subpixel-sized micropolygons in a process called dicing. These groups of micropolygons are called grids. You'll notice that RenderMan does not pre-tessellate geometry, rather the geometry is tessellated in relation to pixel space.
Then Dice and Shade the Geometry
These grids are the same size as the small swallowed primitive, only they have been diced into small, pixel-sized micropolygons. The grids of micropolygons move further into the stomach and get shaded together (displacement, surface shading, atmospherics). Once RenderMan is finished shading the grid it is busted into individual micropolygons, each is tested one last time for visibility and then sent to the screen to make pixels (via sampling and filtering steps). Note that displacement shaders are rendered fast and efficiently due to how RenderMan dices geometry.
With REYES displacement shaders are fast and efficient
Voila! The Final Picture
RenderMan divides the entire image into groups of pixels called buckets. Once all the pixels in a bucket are rendered, RenderMan moves on to the next bucket. During this process only the minimum data required for a single bucket is loaded into memory. When all the buckets are rendered the image is done!