Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Toy Story:raytracing renderman?

237 views
Skip to first unread message

coo...@ibm.net

unread,
Dec 27, 1995, 3:00:00 AM12/27/95
to
I was absent here when the movie Toy Story came out, so someone may
have already given the answer, but I still would like to know.

In Toy Story, Buzz Lightyear's helmet had reflections and refraction. There
were various reflective surfaces in the movie, some in various stages of blur.

If renderman is a scanline based renderer, how did they acheive ray traced
effects in the movie? Is it some totaly new custom made renderer ala BMRT?

Larry Gritz

unread,
Dec 28, 1995, 3:00:00 AM12/28/95
to
In article <4bs5cp$n...@news-s01.ny.us.ibm.net>, <coo...@ibm.net> wrote:
> If renderman is a scanline based renderer, how did they acheive ray traced
>effects in the movie? Is it some totaly new custom made renderer ala BMRT?

Pixar's PhotoRealistic RenderMan, the exact same package that Pixar
sells, was used to render all of Toy Story. It uses the "REYES"
algorithm, which is a scanline method (see the proceedings of Siggraph
'87 for details).

If by "ray traced effects" you mean simple reflections, it's quite
easy to do this with environment maps using PRMan. If you stare at
certain frames long enough, you'll notice that the reflections are
often not quite right. But you only get to look at each frame for
1/24 of a second, so the tiny imperfections are almost never worth the
5x or 10x performance penalty of ray tracing.

_The RenderMan Companion_ gives examples of both images and shaders
that do environment and reflection mapping. PRMan was used by ILM for
"The Abyss" and "Terminator 2" (among other projects), and you can see
refraction and reflection based effects in these movies, too.

-- lg

--
Larry Gritz Pixar Animation Studios
l...@pixar.com Richmond, CA

marc cardwell

unread,
Dec 29, 1995, 3:00:00 AM12/29/95
to
In article <4bujt1$q...@pixar.com>, l...@pixar.com (Larry Gritz) wrote:

> If by "ray traced effects" you mean simple reflections, it's quite
> easy to do this with environment maps using PRMan. If you stare at
> certain frames long enough, you'll notice that the reflections are
> often not quite right. But you only get to look at each frame for
> 1/24 of a second, so the tiny imperfections are almost never worth the
> 5x or 10x performance penalty of ray tracing.

larry, (or anyone who cares to jump in to answer a real basic question)


let me set this up, i am a mac user of rman (macromodel is what i have),
use a 68k mac (not a power mac), use mmodel and rman to render _still_
images for illustration that i sometimes tweak and otherwise mar in
photoshop. lastly, i am not a computer graphics guy like you and so many
others around here, i am an ok graphic designer, and a very good
illustrator (maybe damn good). have read some of the _companion_, but it
was over my head.


i know that macormodel is not the best way to interface w/ rman on the mac
(can't afford VIDI), but if i wanted to have an object reflect or refract,
i have to make an env. map by rendering up, down, left, right, in and out,
then turn the renderings into an env map, which i then specify in my
shader. let me tell you, i haven't even tried that because of the time in
making 6 renderings that will be used on a single obj. (the shaders that
use simulated reflection i do use, and theya re usually good enought).

when you say there is a 5 or 10x penalty for ray tracing, does that apply
when creating animations on killer machines like you guys use? for the
times when i do want a mirror reflection or refraction for still images,
would it make more sence to use a ray tracer?

thanks!

--
marc.c...@scarolina.edu

Michael B. Johnson

unread,
Dec 30, 1995, 3:00:00 AM12/30/95
to
In article <marc.cardwell-2...@cardwell.ara.sc.edu> marc.c...@scarolina.edu (marc cardwell) writes:
>>
>>when you say there is a 5 or 10x penalty for ray tracing, does that apply
>>when creating animations on killer machines like you guys use? for the
>>times when i do want a mirror reflection or refraction for still images,
>>would it make more sence to use a ray tracer?
>>

simple mirror reflections with RenderMan are probably best done
using BMRT's raytracer, unless you have modeling software that will
automatically generate the environment maps for you. Note you'll
need to use a shader that calls trace() for this to work.

Having said that, though, let me say a few words on environment
maps.

The relative costs of using "cheats" like reflection maps instead of
letting the renderer automatically generate reflections by ray casting
depend, obviously, on the contents of your scene. There are two main
reasons (off the top of my head) for using reflection maps instead
of raytracing, only one of which is relevant to a person involved in
generating stills (as opposed to animations):

(1) the ability to reflect objects that aren't "really" in the scene. A
shot I did for the independent film "Dizzy Horse" is a nice example -
go check out

http://wave.www.media.mit.edu/people/wave/02_February/Week3/dizzy.html

for that shot I wanted to integrate a CG ring (that was a "stunt double" for
a practical ring that was used in the film) with some live action footage.
I obviously didn't have a 3D model of the forest and actor to raytrace
against, so I shot 6 pictures with a 35mm still camera and scanned them
into the computer using PhotoCD. I then turned them into an environment map
suitable for handing into a shader by adding the line

MakeCubeFaceEnvironment "px.tiff" "nx.tiff" "py.tiff" "ny.tiff" "pz.tiff" "nz.tiff" "/tmp/forestEnvMap.tx" 90 "catmull-rom" 2 2

at the top of the RIB file. I then call it with the "shiny" shader from
page 381 from the RenderMan Companion:

Surface "RCShiny" "Ka" [ .75 ] "Ks" [ .8 ] "roughness" [ .25 ] "mapname" [ "/tmp/forestEnvMap.tx" ]

so that's reason #1 - the environment isn't available to raytrace against.
This is a reason that will is relevant to people doing stills, and one
that a raytracer offers no advantage over any other rendering method.

The second reason is relevant to animation only, and that's the fact
that I only needed to construct the environment map once for the whole
6 second (24fps * 6 == 144 frames) shot. Theoretically, I should be
changing the environment for each shot, but in practice, using the
same one (since the ring is turning end over end as it goes through
the air, and since it's motion blurred) is fine. With a raytracer,
I would have had to needlessly be calculating the reflection information
each time through. Note that if I wanted to, I could be changing the
environment every 6 frames or so; that still speeds things up
enormously.

Assuming you have Glimpse along with ShowPlace, it has some nice ways
of helping you massage TIFFs into environment maps into shaders via
the Looks stuff. If you have Typestry 2, look in the manual, Annabella
made several Looks that she applied to text using environment maps
she made using some of my rave photos - take a look at

http://wave.www.media.mit.edu/people/wave/StoneRave/StoneRave2/toc.html

for some good pics to play with as latlong environment maps.

since you're an illustrator, you really should play around with
applying your drawings as environment maps (or displacement maps or...)
- they're very powerful, and don't cost *that* much in rendering
time.

Another cool use is using them with lights - as cutouts to modulate
the light. For a personal project I'm working on this week, I'm
doing this with some of my own illustrations; this lets me
cast light and shadow in a nicely controlled manner (like the
venetian blinds light in ShowPlace/Typestry2). You might want
to play with this too - that's how the great Gingivitis shadow
was done in that early Listerine knight commercial was done - no
need for real geometry to be blocking the light when you can just
use an image...

good luck; hope the above is useful info.


--
--> Michael B. Johnson, SMVS, Ph.D. -- wa...@media.mit.edu|wa...@pixar.com
--> http://wave.www.media.mit.edu/people/wave/
--> alumnus, MIT Media Lab, Computer Graphics & Animation Group
--> Media Arts Technologist, Pixar Animation Studios (East Coast Office)

Michael B. Johnson

unread,
Dec 30, 1995, 3:00:00 AM12/30/95
to
So my last post inspired me to spend 10 minutes and come up with a little
example to show what I was talking about w/re: to using your own
illustrations with a light source shader. I took the "slideprojector"
shader from page 373 of the RenderMan Companion and modified it
so that instead of projecting the image, it uses it as a cutout,
so that the effect is (I think) more intuitive. Here's the new
shader:

light
WWFlagLight(
float fieldofview=PI/32;
float intensity=1;
color baseColor=1;
point from = (8, -4, 10),
to = (0,0,0),
up = point "eye" (0,1,0);
string flagName = "",
shadowname = "" )
{
uniform point relT, /* normalized direction vector */
relU, /* "vertical" perspective of surface point */
relV; /* "horizontal" perspective of surface point */
uniform float spread = 1/tan(fieldofview/2); /* spread of "beam" */
float Pt, /* projection of Ps on relT (distance of
surface point along light direction) */
Pu, /* projection of Ps on relU */
Pv, /* projection of Ps on relU */
sloc, tloc; /* perspected surface point */

/* Initialize uniform variables for perspective */
relT = normalize(to - from);
relU = relT ^ up;
relV = normalize(relT ^ relU);
relU = relV^relT;

illuminate(from, relT, atan(sqrt(2)/spread)) {
L = Ps - from; /* direction of light source from surf. point */
Pt = L.relT; /* coordinates of Ps along relT, relU, relV */
Pu = L.relU;
Pv = L.relV;
sloc = spread*Pu/Pt; /* perspective divide */
tloc = spread*Pv/Pt;
sloc = sloc*.5 + .5; /* correction from [-1,1] to [0,1] */
tloc = tloc*.5 + .5;
Cl = (baseColor * intensity) - (color texture(flagName, sloc, tloc));
if( shadowname != "" )
Cl *= 1-shadow(shadowname, Ps);
}
}

then, assuming you have some image named "WhiteEars.tx" that has both
transparent and opaque parts (if you need help creating such a texture,
let me know; the best way for you would be to save out an EPS from
Illustrator/FreeHand, import it to PhotoShop, export as TIFF, then
add a "MakeTexture" line to the top of the RIB file you render), you
can use the following RIB file to test out the shader:


##RenderMan RIB-Structure 1.0
##System NEXTSTEP
##Scene /u/wave/tmp/flagTest.rib
##Creator solidThinking Rel:2.4 Ver:199
##CreationDate Sat Dec 30 1995 02:59:59
##For wave
##CameraOrientation 0.755829 0.489591 -0.110763 0.074985 0.062793 0.025097
#
Shutter 0.0 1.0
Option "shadow" "bias0" [ .05 ] "bias1" [ .1 ]
Imager "clamptoalpha"
ShadingRate 1
FrameBegin 1
Display "flagTest.tiff" "file" "rgba"
Clipping .01 1000
ScreenWindow -1 1 -.766578 .766578
Projection "perspective" "fov" [ 60 ]
Transform [ .195688 -.513578 -.83543 0
0 .851901 -.523703 0 .980666 .102482 .166707 0 -.039285 -.017555 .906307 1 ]
Format 377 289 1
WorldBegin
Declare "intensity" "float"
Declare "lightcolor" "color"
Declare "from" "point"
Declare "to" "point"
LightSource "distantlight" 15 "intensity" [ .62 ] "lightcolor" [ .806894 .086657 .07625 ] "from" [ .439303 .561486 .088448 ] "to" [ .012876 .327286 0 ]
Declare "fieldofview" "float"
Declare "intensity" "float"
Declare "baseColor" "color"
Declare "from" "point"
Declare "to" "point"
Declare "up" "point"
Declare "flagName" "string"
Declare "shadowname" "string"
LightSource "WWFlagLight" 2 "fieldofview" [ 1 ] "intensity" [ .712 ] "baseColor" [ 1 .944609 .448592 ] "from" [ .085837 .261471 0 ] "to" [ -.287554 -.081821 0 ] "up" [ 0 1 0 ] "flagName" [ "WhiteEars.tx" ] "shadowname" [ "" ]
AttributeBegin
Attribute "identifier" "name" [ "Plane" ]
TransformBegin
Scale 1 1 1
Declare "Ks" "float"
Declare "Kd" "float"
Declare "Ka" "float"
Declare "roughness" "float"
Declare "specularcolor" "color"
Surface "plastic" "Ks" [ .5 ] "Kd" [ .5 ] "Ka" [ 1 ] "roughness" [ .1 ] "specularcolor" [ 1 1 1 ]
TransformEnd
TransformBegin
ConcatTransform [ 1 0 0 0
0 1 0 0 0 0 1 0 .019427 -.004306 -.039905 1 ]
TransformBegin
Rotate -90 1 0 0
Patch "bilinear" "P" [ -.487511 -.487511 0 .487511 -.487511 0 -.487511 .487511 0 .487511 .487511 0 ]
TransformEnd
TransformEnd
AttributeEnd
AttributeBegin
Attribute "identifier" "name" [ "Plane_1" ]
TransformBegin
Scale 1 1 1
Declare "Ks" "float"
Declare "Kd" "float"
Declare "Ka" "float"
Declare "roughness" "float"
Declare "specularcolor" "color"
Surface "plastic" "Ks" [ .5 ] "Kd" [ .5 ] "Ka" [ 1 ] "roughness" [ .1 ] "specularcolor" [ 1 1 1 ]
TransformEnd
TransformBegin
ConcatTransform [ 6.12303e-17 1 0 0
-1 6.12303e-17 0 0 0 0 1 0 -.343889 .159148 -.025434 1 ]
TransformBegin
Rotate -90 1 0 0
Patch "bilinear" "P" [ -.357776 -.357776 0 .357776 -.357776 0 -.357776 .357776 0 .357776 .357776 0 ]
TransformEnd
TransformEnd
AttributeEnd
WorldEnd
FrameEnd

Operator

unread,
Dec 30, 1995, 3:00:00 AM12/30/95
to


How can i test this using nextstep 3.3 and solidthinking modeler version
2.4.. I was going to ask giudo in italy on how to use pictures from
tiffany2 in my animations and 3d renderings. So maybe you could help me
save me some time instead of e-mail to italy.


Scott Turner
FirstSight INc.
1sts...@worldweb.net


marc cardwell

unread,
Dec 30, 1995, 3:00:00 AM12/30/95
to
In article <1995Dec30.0...@media.mit.edu>, wa...@media.mit.edu
(Michael B. Johnson) wrote:
...

> (1) the ability to reflect objects that aren't "really" in the scene. A
> shot I did for the independent film "Dizzy Horse" is a nice example -
> go check out...

good point, i have never had that need, but may in the future. cool.


> Assuming you have Glimpse along with ShowPlace, it has some nice ways
> of helping you massage TIFFs into environment maps into shaders via
> the Looks stuff. If you have Typestry 2, look in the manual, Annabella
> made several Looks that she applied to text using environment maps

> she made using some of my rave photos - take a look at...

i do have typestry2, and love it. is showplace something worth getting? i
realize its not a modeler, but something w/ a better interface (and less
expensive than VIDI)to rman than macomodel now provides would be
beneficial.


> Another cool use is using them with lights - as cutouts to modulate
> the light.

now THATS something i have wanted to do for a while (but not really
investigated) is to have a foliage-like shadow over objects. when i last
tried to substitute a T2 look that would do just that into a macromodel
generated rib, i got a rendering error (cannot remember what that was
now). what i would up doing was to make a tree-shape in macomodel and put
a light behind it. i found a small application called spit that will turn
a look into a shader. also i'll try your shader. i am definately a person
who does not have a full grasp of the in's and out's of rman, ribs, etc.
but i really love the output. rman images have a really hard to define
quality, call it warmth, that ray-traced images do not. RT images seem a
little too cold an perfect sometimes.



> good luck; hope the above is useful info.

it was indeed. thanks.

--
marc.c...@scarolina.edu

Michael B. Johnson

unread,
Dec 31, 1995, 3:00:00 AM12/31/95
to
In article <marc.cardwell-3...@cardwell.ara.sc.edu> marc.c...@scarolina.edu (marc cardwell) writes:
>>
>>i do have typestry2, and love it. is showplace something worth getting? i
>>realize its not a modeler, but something w/ a better interface (and less
>>expensive than VIDI)to rman than macomodel now provides would be
>>beneficial.

Typestry 2 is one of my favorite Mac applications. I'm less thrilled
with ShowPlace, but WavesWorld acts (for me) as a kind of uber-ShowPlace,
and I prefer to play atop NEXTSTEP anyway, which has solidThinking,
which has great RenderMan support. But if I wasn't a programmer,
and I was using a Mac, and using RenderMan, I would *definitely* want
ShowPlace. It lets you import RIB files and setup lighting and assign
shaders and such. It's not perfect, but it's pretty nice, and I've
seen people do very nice things with it (and its lighting controls
are actually really nice).

Macromodel has always had (sorry John...) miserable RenderMan support.
It's a rather uninspired modeler, but again, I've seen people do
very nice things with it. Your best bet might be to export your model
as RIB from macromodel and then read it into ShowPlace and set up
shading and lighting and such.

While Pixar has stopped selling ShowPlace, you still should be
able to find it from most of the Mac mail-order places (I would expect
this to be true; but don't hold me to it). I would expect it to be
a couple hundred dollars; maybe less.

>>
>>
>>> Another cool use is using them with lights - as cutouts to modulate
>>> the light.
>>

>>now THATS something i have wanted to do for a while (but not really
>>investigated) is to have a foliage-like shadow over objects. when i last
>>tried to substitute a T2 look that would do just that into a macromodel
>>generated rib, i got a rendering error (cannot remember what that was
>>now).

Hmm - I forget what the RIB syntax for Looks is. If you forward
the error, we can probably figure it out.

>>what i would up doing was to make a tree-shape in macomodel and put
>>a light behind it. i found a small application called spit that will turn
>>a look into a shader.

Interesting. I've not heard of spit - where did you get it?

weintz steven cortelou

unread,
Dec 31, 1995, 3:00:00 AM12/31/95
to
Sc...@localhost.ios.com (Operator) writes:

>In <1995Dec30.0...@media.mit.edu> Michael B. Johnson wrote:

[some very cool and helpful examples]

>How can i test this using nextstep 3.3 and solidthinking modeler version
>2.4.. I was going to ask giudo in italy on how to use pictures from
>tiffany2 in my animations and 3d renderings. So maybe you could help me
>save me some time instead of e-mail to italy.

It's really easy to get pictures into solidThinking. For this example you
can use the 'texmap' shader to create a texture from a TIFF you made with
TIFFany2:

1) Select an object or create a sphere

2) In the Attributes inspector, select and apply the 'texmap' shader.
(Click 'Set' to get a list of your installed shaders.)

3) In the Attributes inspector,
Select the 'texname' parameter in the browser, and click the 'TIFF'
button in the 'String Value' section. An Open Panel will appear;
choose the TIFF you want to use.

4) The 'Make Texture' Panel appears. The default settings are usually
fine, though you can adjust them if needed. (Make sure your TIFF is
24- or 32-bit.) Click the 'Make Texture' button. Choose which Textures
folder you want to save the texture in, give it a name, and click 'OK'.

5) Close the 'Make Texture' panel, and click 'Texture' in the 'String
Values' section. Choose the texture you just created.

The above process is just a nice front-end to the 'maketexture' command.
You can also simply use the TIFF file itself (steps 1-4, click 'Use File'
instead), but you have somewhat better performance with texctures,
I've found.

Use this process for anything you want to do with an image (displacement
shaders, surface shaders that use images, lighting shaders). It's
good for general environment mapping (choose 'environment map' in the
'Make Texture' Panel). For high-quality environment mapping, use the
command-line procedure for making a six-sided map that wave discussed.
(solidThinking appends the '.etx' extension to environment map textures.)


--
Steve Weintz * Partner, New Media, Ltd.
P.O. Box 742 * Urbana, IL 61801
st...@dave-world.net * 217.344.5303 * 217.344.8981 fax
Staff Visioneer, Beckman Institute Visualization Facility * in...@uiuc.edu

jd...@citynet.net

unread,
Dec 31, 1995, 3:00:00 AM12/31/95
to
In <1995Dec30.0...@media.mit.edu>, wa...@media.mit.edu (Michael B. Johnson) writes:
>automatically generate the environment maps for you. Note you'll
>need to use a shader that calls trace() for this to work.
A shader? Forgive my ignorance but is that a program which
calculates the light shading or is it slang for some beast of a program
which lurkes (hence the name) in the shades of memory until some
trigger sets it off?

Thanks!

weintz steven cortelou

unread,
Dec 31, 1995, 3:00:00 AM12/31/95
to
jd...@citynet.net writes:

>In <1995Dec30.0...@media.mit.edu>, wa...@media.mit.edu (Michael B. Johnson) writes:

>>automatically generate the environment maps for you. Note you'll
>>need to use a shader that calls trace() for this to work.

> A shader? Forgive my ignorance but is that a program which
>calculates the light shading or is it slang for some beast of a program
>which lurkes (hence the name) in the shades of memory until some
>trigger sets it off?

A nicely poetic interpretation, but your first guess is correct:

"SHADER. A part of the RENDERING program that calculates the appearance of
visible surfaces in the scene. In RenderMan, a procedure written in the
RenderMan Shading Language and used to compute a value or set of values
(e.g., the color of a surface needed during rendering."
-- The RenderMan Companion, p.436

marc cardwell

unread,
Jan 1, 1996, 3:00:00 AM1/1/96
to
In article <1995Dec31....@media.mit.edu>, wa...@media.mit.edu
(Michael B. Johnson) wrote:
...

> >>what i would up doing was to make a tree-shape in macomodel and put
> >>a light behind it. i found a small application called spit that will turn
> >>a look into a shader.
>
> Interesting. I've not heard of spit - where did you get it?

...

i found the link via one of the rman related sites:

http://www.shsu.edu/~stdjnd/pps.html

its a pixel putty related site, it had spit, as well as a fur shader,
niether of which i have done anything w/ yet...

bye...

--
marc.c...@scarolina.edu

Larry Gritz

unread,
Jan 2, 1996, 3:00:00 AM1/2/96
to
In article <marc.cardwell-2...@cardwell.ara.sc.edu>,

marc cardwell <marc.c...@scarolina.edu> wrote:
>when you say there is a 5 or 10x penalty for ray tracing, does that apply
>when creating animations on killer machines like you guys use? for the
>times when i do want a mirror reflection or refraction for still images,
>would it make more sence to use a ray tracer?

Well, remember that PRMan was designed specifically for animation.
The cost of generating shadow and environment maps is generally
amortized over tens or hundreds of frames, and sometimes they can even
be shared between separate shots. For a single frame with no shared
or precomputed elements, the ray tracing penalty is probably more like
a factor of 2-3, rather than the 5-10x advantage you might get for
an animation.

If your performance bottleneck is really rendering time, then it still
makes sense to use all the tricks of a scanline method. But if your
real bottleneck is human time (to set up the shot, get the lighting
right, figure out how to make shadows and reflections, etc.), then
yes, it may be that you'd save *your* time if you had a raytracer.

That being said, any good modeling/animation software should generate
basic shadow and environment maps for you automatically, so you need
to spend extra time only when doing something tricky or complex. I
know, lots of packages don't do this (and don't motion blur and
don't... etc.). Not a lot we can do about packages not fully
supporting RenderMan (except have users complain to their makers,
I suppose).

John Korchok

unread,
Jan 3, 1996, 3:00:00 AM1/3/96
to
As a bit of a shortcut for stills, I cheat on environment maps for
spherical and cylindrical objects by setting a camera in the middle
of the object to be mapped and aiming it at the camera which will be
used for the final shot. I set the view angle for as wide as possible
(you can usually get close to 180 degrees) and do just one render.
When this is mapped on it looks fine. I can tell the difference from
the 6-shot version, but not many others can.

John Korchok Partner in Art Lab Inc. (416)480-0306
Cross-platform graphics and fine 3D package prototypes
JohnK...@msn.com or 10225...@compuserve.com
"Fried Ice Cream is a reality" - George Clinton

John Dowdell

unread,
Jan 6, 1996, 3:00:00 AM1/6/96
to
Marc Cardwell writes on Dec 30, in context of MacroModel, "now THATS

something i have wanted to do for a while (but not really
investigated) is to have a foliage-like shadow over objects."

Nice to see you again, Marc. ;) There's a fast cheat that works in
some situations. It's particularly good if you're doing a camera
flythrough on a static scene, or if you wish foliage shadows without
necessarily shadowing moving objects, or if you have a still image
and wish to keep a library of different types of fake shadows
(called "cookies" or "gobos" in cinema). Fast drafts, too.

Make your foliage geometry near the light once, and render out this
scene with shadows on. You'll have a RIB file for each light source
and one for the camera. Render out the the lightsource RIB and keep
its .Z file, the shadowmap. Name it well and put it in a library.
Now, whenever you wish to use one of your stockpiled cookies, just
put this .Z file in the same directory as your main RIB and make
sure the file name matches the shadowmap that lightsource calls.
Doesn't shadow objects unique to that scene, but gives foliage.

Showplace is a good complement to MacroModel... no .PST files at
all. Check with The VALIS Group for sales. btw, Extreme 3D will
finally be arriving this month, and you'll get a mailing soon.

Regards, John Dowdell (works with Macromedia)

0 new messages