#Shadow Masks
19 messages in this thread
I'm working on a large architectural model and it is taking a **long** time to
render (about 90 min/frame). I've been looking at the manuals to see what I can
do to speed things up, but I did notice something that I was wondering about.
In the model the only thing that moves is the camera, and the renderer seems
to spend a lot of time calculating shadow maps for each frame. (I have the
system maxed out at 32 MB of RAM and it generates a 22 MB swap file on this
model. Replacing the CPU card and adding more memory isn't an option right now,
particularly in light of our current budget/staffing problems)
Why does it keep calculating new maps for every frame (or maybe field)? Do
they change from one to another if only the camera moves?
Chris
– Chris Johnston, Written 28-Feb-1995 @ 21:19:12
Using: Windows NavCIS PRO 1.5
Chris:
/_______________________From your message________________________\\
it is taking a **long** time to render (about 90 min/frame).
__________________________________________________________________
90 minutes, yikes! A couple of ideas:
What size shadow maps are you using? I had luck on a project which was swapping
all over the place by changing to raytraced spot lights – believe it or not.
Since I eliminated the swapping the render times actually dropped. By the way,
how many light sources do you have? Do they all need to cast shadows? A
sure-fire way to cut time down is to cut out some of the complexity in the
geometry. OPTIMIZE would help alot but you can manually delete a few million
faces without it. All of those back sides and hidden faces which never see the
light of cyber space are all candidates for the axe.
Bob
Bob: There are 3 shadow casting light sources in the scene, one outside acting
like the sun and two inside the basement of the building in one of the interior
rooms. I've turned off the two inside lights so there should be only one shadow
casting light – at least for the first 600 frames.
I thought about going to raytraced shadows in the hopes that I could reduce
the size of the swap file, but so far I haven't tried it.
I have reduced the complexity a lot, but there are probably still a lot of
faces that never get seen. There are complicating factors like transparent
glass windows in the interior doors, but those are hidden for the first half of
the animation.
Thanks,
Chris
– Chris Johnston, Written 02-Mar-1995 @ 22:56:53
Using: Windows NavCIS PRO 1.5
Chris:
/_______________________From your message________________________\\
There are complicating factors like transparent glass windows in the interior
doors, but those are hidden for the first half of the animation.
__________________________________________________________________
I think Dave and others may have hit on a possible culprit for such long render
times, the Hide keys on certain objects. The SHADOW-BIAS-ABSOLUTE parameter in
the 3DS.SET file may be worth a look. Do you have any automatic reflections
being calculated for your glass? The render times you posted are just the kind
of things that made me try the rendering with raytraced shadows.
Bob
Bob: I'll have to look at SHADOW-BIAS-ABSOLUTE and see what effect it has. The
windows don't have automatic reflection maps, but I've noticed that any
transparent material really slows down the rendering time.
I'll look at raytraced shadows, but I don't want to change the shadow setup
now that I've rendered my way part of the way through the animation.
There is another half of the animation still coming up and maybe I'll try it
there.
Chris
– Chris Johnston, Written 04-Mar-1995 @ 22:48:41
Using: Windows NavCIS PRO 1.5
Chris:
I thought of one more thing which may help as you mentioned that you have some
of the frames already rendered. If you have parts of your animation which are
very different in nature (ie. an exterior fly by turning into an interior
walkthrough) you may see render times drop if a particular sequence of frames
can render without swapping to disk. In other words, if you have any segment
which could potentially render without swapping render that segment separately.
Why? Once a machine swaps to disk it will always swap, even if the scene is
relatively simple.
Bob
Bob: Thanks, I've been rendering in pieces anyway, partly to allow a section
not to swap to disk if it doesn't need to. My 486 at work crashes often enough
anyway that I get to restart it every day or so anyway! <g>
Chris
– Chris Johnston, Written 07-Mar-1995 @ 21:35:24
Using: Windows NavCIS PRO 1.5
Chris:
If there are ANY keys for ANYTHING other than the camera (as far as I can
tell), then you'll have re-calc'ed shadows. I have, for instance, a project
where I hide (with hide-keys) a couple non-shadow-casting objects 'cause the
camera would pass too close to them (I hide and unhide them as the camera
approaches/departs them). This seems to cause shadow re-calcs. Now, as I type
this, I'm thinking, "hey, I don't have shadow-bias-absolute set on, so hiding
these things changes the scene size, so that _should_ cause a re-calc."
Gary or Jonas? Can you answer this: Do keys for non-shadow-casting objects
cause shadow-map recalculations for each frame if shadow-bias-absolute is ON?
(If so, I "WISH" they wouldn't.) Also, I assume that keys for a dummy to which
the camera/target is linked DON'T cause recalc's if there are no other object
keys, right?
Dave
Hi Dave,
<< Do keys for non-shadow-casting objects cause shadow-map recalculations for
each frame if shadow-bias-absolute is ON? (If so, I "WISH" they wouldn't.)
Also, I assume that keys for a dummy to which the camera/target is linked DON'T
cause recalc's if there are no other object keys, right? >>
I searched for any recent posts on this and found…
"If you've got hide keys for objects that are not visible, but still in the
scene, that could easily explain it (since the shadows are computed based on
all the objects in the scene). Here's something you can try… add a line to
your 3DS.SET file (if it's not already there) that says:
SHADOW-BIAS-ABSOLUTE = YES
When this is set to YES, the bias values for shadows won't be recomputed on
every frame, so hiding an object in the middle of an animation won't change the
shadow bias. (No is the default)
– G"
Great! Thanks, Jonas!
Dave
Dave: In fact, I have a number of hide keys in an attempt to simplify the
geometry enough to keep my main 486 machine from blowing up. There are a set at
frame 0, and another series at frames 600-605.
Chris
– Chris Johnston, Written 02-Mar-1995 @ 23:01:43
Using: Windows NavCIS PRO 1.5
Chris, I've had problems with this one also. If the camera is really the _only_
ting moving then shadows won't be computed past the first frame. Even an
animated opacity map will trigger shadows. Make sure you've got no light
movement, etc. Good luck finding the cause.
DM
David: I've got a whole set of hide keys clustered at frame 0 and another set
between frame 600 and 605. The only piece of the geometry that moves is a set
of elevator doors that open and close at the very end of the sequence – about
frame 1100 of 1200.
Chris
– Chris Johnston, Written 02-Mar-1995 @ 23:04:38
Using: Windows NavCIS PRO 1.5
Well, there ya go. If you've got objects moving you'll get shadows recomputed
on every frame.
DM
But the only objects that move, except for the camera, is a pair of elevator
doors that move around frame 1100 out of 1200. Before that there is nothing in
the model that moves, and no animated texture maps. There **are** some hide
keys.
Chris
– Chris Johnston, Written 07-Mar-1995 @ 21:32:54
Using: Windows NavCIS PRO 1.5
Chris, You can ask Gary to verify this but I'm almost positive that if you've
got position keys _anywhere_ in your animation that aren't a cameras you will
trigger shadows.
Good Luck.
DM
Correct, David.
– G
Dave:
>> I'm almost positive that if you've got position keys _anywhere_ in your
>> animation that aren't a cameras you will trigger shadows.
Unless you turn off the shadow-casting attribute of the object… This trick
has saved us many hours of rendering time if you can get away with it!
Greg Pyros
David: Thanks. That sounds a little strange – I don't see how the presence of a
position key stuck in the end of an animation could affect the shadows in the
beginning.
Chris
– Chris Johnston, Written 09-Mar-1995 @ 21:20:06
Using: Windows NavCIS PRO 1.5