|
Pixar Photorealistic RenderMan - Artist tools (RAT) Tutorials
Displacement power in Reyes mode.

Softwares used: Alias Maya 7.0.1, Pixar RAT 6.5.2,
Pixar Renderman server pro 12.5.2
Note: Although this article is written with PRman
displacement capabilities in mind, displacement method is not
limited to PRman and can be used in many other renderers as well.

Introduction
One of the things that the Renderman power lies behind is True
Displacement. Using Displacement we can add geometric surface
details, those ones that are difficult or impractical to build and
work on in the 3D scene. Displacement shaders move vertices in
render time based on parameters you can define in shader. These can
be as complex as shaping and forming an entire object to simple
things like bumps. However, the algorithm is not yet implemented
completely in Raytrace mode, thus we need to stick to Reyes mode if
we want to get good results in reasonable render time. Fortunately
it is possible to bake indirect illumination in Raytrace mode to be
used later in Reyes mode. Apart from speed, Reyes mode seems to
still give out a higher quality image than Raytrace mode. Pixar has
offered a new way to cache indirect illumination called brick maps
to use it later in Reyes mode. Mr. Eric Hanson the author of Maya
Killer Tips book has informed me that they used this technique in
the movie The Day After Tomorrow. Another payoff of using True
Displacement is that it will be much easier to have LOD (Level of
details) set for simple polygonal objects. The displacement shader
has some kind of built-in LOD itself since it uses mipmaps.
Examples of True Displacement
Once I was working on an underwater scene. In such
scenes objects have so much fine details that it's unwise to work on all of those tedious details in the 3D scene, even if you're using a
3D painting tool like ZBrush. So I decided to go with True
Displacement. The modeled objects were very light polygonal
objects with Pixar SubDivision applied on. Keep in mind that
although objects in 3D scene were very light and render time was
pretty fast, but True Displacement consumes lots of memory if the
displacement bounds are not set properly.
The scene here contains one spot light with shadow
on, one directional light, one MTOR coordinate system object and the
sample object with displacement shader assigned.
I've used a dual Xeon 2.6 GHz with 3 GB memory here for rendering.
Picture 1: Render time 18 seconds.

Map 1: One of the displacement maps which is used
in Picture 1

Picture 2: A rusted metal column rendered in 33
seconds.

Picture 3: Sample sea-bed portion rendered in 28
seconds.

Picture 4: A stone rendered in 31 second. An
incredible render time for such an object.
Actually two stone objects are defined as CSG (Constructive Solid
Geometry) primitives and then "difference" method is used.

Picture 5: Render time only 63 seconds.

How to
create Displacement maps?
For very fine details I suggest to stick to 2D painting
softwares like Photoshop. One thing to remember is that Displacement
uses Grayscale image or one channel image. Usually images have 3 RGB
channels and each channel has 8 bits which means every channel can
be an integer
number between 1 & 256. Since Displacement uses only one channel of
your map (or grayscale map which contains only one channel), you can have up to 256 different levels
in displacement of vertices. In other words in render time, every
micro-polygon on the object can be displaced for a maximum of 256
times of the smallest possible displacement which is set.
This is enough for most cases but in
some cases you need much more. For example in the cases that there
are both very big displacements and also very fine ones used on the same
object, (i.e. A flat surface is displaced into a cliff and then you
also want to add fine details like small cracks, bumps & etc.). In
such cases that 256 level is not enough.
-
Procedure1: You can either use 16
bit per channel pictures
-
Procedure2: You can have several layers of displacement and
several maps, some for big displacements and some for fine details.
Unfortunately Photoshop does not handle 16bit per channel pictures
very well and most of the effects are not available in this mode. I
personally stick to the second procedure when possible.
The other way around creating
displacement maps is 3D painting the displacement
details directly on the object in a program like ZBrush, extracting the
produced map and then using it as displacement map for render time
true displacement
in Renderman or other renderers. However you can not paint very fine
details with current 3D painting methods since the finer you paint,
the heavier model becomes till you run out of memory/cpu.
Current solution to this problem can be to 3D painting the big
displacements and then refining the extracted
map later in a 2D editing program.
Conclusion
As you can see the usage possibilities of True
Displacement is virtually unlimited. Although displacement is not a
new tool, it's usually forgotten by new comers to the 3D world. I
hope this article can encourage people to explore the exciting vast
usage possibilities of True Displacement which can make life easier
for modelers!
Sepehr Dehpour
Oct 13 2006
Director
Rich media designer

Copyright©2006 - Sepehr Dehpour - All right
reserved.
RenderMan is a registered trademark of Pixar.
CGTAL active media
|