CompuServe Thread

Z Buffer File

5 messages in this thread
#64001From: Hector SilvaOct 28, 1993 7:12 PM
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?
#64141From: Yost GroupOct 29, 1993 11:43 AM
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
#64483From: Hector SilvaOct 31, 1993 6:35 PM
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.
#64522From: Yost GroupNov 1, 1993 12:21 AM
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
#64144From: Jonas Ruikis [ADESK]Oct 29, 1993 11:48 AM
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]