CompuServe Thread

#IPAS – Z-Buffer

5 messages in this thread
#54476From: Westwood StudiosAug 23, 1993 3:34 PM
I've just started using the 3DS IPAS toolkit. I am attempting to write an IPAS routine that will extract Z buffer information on a frame by frame basis from an animation. The only IPAS hook I can see would allow me to do this is he AXP hook. However this only gives me access to the currently selected object. and each of the objects including the camera appears to have it's own set of normalised coordinates. The only way I can see to approach this is to effectively render the seen into a depth buffer, Only being able to access one object prevents me from doing this. I could link all of the objects in a scene, but this limits me to 65500 vertices, The image currently has 200000+ vertices and is expected to contain more. The Z buffer information is the crux of a new system we are currently working on, any help you can give would be much appreciated. Can anyone suggest a possible solution to this problem? Rob@Westwood Studios
#54478From: doug wolfgramAug 23, 1993 3:53 PM
Can you just generate alpha channel directly into a series of TGAs then access them directly?
#54494From: Yost GroupAug 23, 1993 6:20 PM
Very interesting question… IXP's give you all the info about the view you need for the z-buffer, but they don't give you access to object information. There's really no way to do it in R2. In R3, you could attach an AXP to each object and each object would dump out it's transformed world coordinates and face information to a disk file. An IXP could then process it with the view information to turn it into a z-buffer. What you _really_ want is access to our internal z-buffer, but since we don't keep it around (to save memory), it's not available. However, you've already given me some bad ideas for R4… Thanks, – G
#54621From: Westwood StudiosAug 24, 1993 12:50 PM
Actually I have a bodged solution to the problem. I delete all lights from the image, set ambient light to maximum, set depth cueing on, rerender the animation using flat shading no antialiasing etc. with an IXP which just dumps out the gun value for each pixel to a file. This only gives 8 bits for the Z buffer but hopefully it will be enough for my current purposes. Of cause all this relies on a linear fall off for the distance cue which I haven't checked yet. It occurs to me that Z buffer information would be very useful when writing IXP's, as one could vary effect based on object depth within the image, maybe an extended pixel type with the additional depth information in a future release. Thanks for confirming that what I wanted to do was impossible it saves me wasting more time on it. Rob@Westwood Studios.
#54755From: Yost GroupAug 25, 1993 10:16 AM
Nice trick… using distance cue (which is linear falloff) should give you a decent 8-bit z-buffer. Regarding giving folks access to the internal z-buffer in the future… that's a great suggestion for IPAS4. Too bad you didn't suggest it 6 months ago! – G