Z Buffer File
5 messages in this thread
I need to find a way to access the z buffer information that is
created during rendering in 3DS. Ideally, I would like this
information written to a file during rendering, rather than the
normal RGB color information. Can anyone help?
There's no way to get this explicitly written to a file, but you can infer it
by using the atmosphere function. Here's how.
Turn off all lights except ambient. Set that to 255. Make all objects
white255. Set atmosphere on, with the near range being right at the camera and
the far range being just at the far extent of your scene. When you render this
scene to a file, the resulting file will be a grey-scale representation of the
z-buffer.
– G
Thanks for the tip to get a representation of the z-buffer – it sounds like it
will work fine.
Only one question – does the ambient light dissipate linearly or geometrically,
or is this a choice that can be set by the user?
If the ambient light does not dissipate on a linear scale, then special
considerations would have to be made in order to truely calculate the z values.
The ambient light will dissipate linearly.
(this is a function of the fog being linear, more than the light itself, which
doesn't dissipate at all unless fog is on)
I'm out of here for a month. If you've got any more questions for me, they'll
have to wait till December.
– G
Hi Michael,
This question was asked a few weeks ago and Gary Yost responded.
Gary proposed a work around to get a psuedo z buffer based on
range info. (???) I hope someone on ASOFT saved that reply and could
repost it.
Jonas[ADESK]