CompuServe Thread

#Zbuffer IXP in DL1

30 messages in this thread
#135450From: Yost GroupNov 12, 1994 11:05 AM
Hello all r4 mutants! You might've noticed that I uploaded the following IXP to DL1 a couple of days ago: SEEZ.ZIP/Bin Bytes: 24924, Count: 92, 09-Nov-94 Last:12-Nov-94 Title : Zbuffer IPAS IXP plugin for 3DSr4 from Yost Group Keywords: SEEZ ZBUFFER ACCESSOR IPAS IXP REQUIRES 3DSR4 YOST GROUP This zip file contains SEEZ.IXP, a public domain IPAS routine by Tom Hudson of the Yost Group that will let you access the z-buffer inside of 3DSr4 for interesting compositing effects in the Video Post system. It also includes the source code for the routine (SEEZ.C) for IPAS developers to use as a learning aid for accessing the z-buffer with their own applications. — If you hadn't noticed, and if you're interested in playing around with z-buffer effects, check it out. – G
#135455From: Jonas Ruikis [ADESK]Nov 12, 1994 11:20 AM
<< mutant alert! >> I'll put a copy into Software Dev Kits too. My thanks to Tom!
#135546From: Phillip L. MillerNov 12, 1994 7:44 PM
Now we just need Martin to compose an IXP sample script that accomplishes the same task <g>. – Phil
#135520From: MARTIN G FOSTERNov 12, 1994 3:10 PM
Gary, >> access the z-buffer inside of 3DSr4 for interesting compositing effects in the Video Post system. << sounds highly interesting. Any ideas what an end-user, video-post hack might use it for? Or is that for us to find out <g>?
#135545From: Phillip L. MillerNov 12, 1994 7:43 PM
Run it and you'll discover that it's the PERFECT tool for creating bump maps that relate to geometry, or an equally valuable method for creating a masking selection (that fades according to distance) for use in a paint package. – Phil Thanks for the upload!
#135575From: sanford kennedyNov 13, 1994 12:05 AM
Phil, <bump maps that relate to geometry> Does this imply that you could build real displacement maps using the Z-buffer? Sanford
#135605From: Phillip L. MillerNov 13, 1994 8:51 AM
What I meant was that you can "model" a bump map fairly easily. Say yuo wanted a bitmap that produced a bump of a series of balls around a clock face. Without too much thought, you could quickly make a cylinder and array a series of GSspheres around it, letting them intersect the cylinder as much as you want them to "bump" out in the map. Now go into video post (there's no need for lighting!) and render the perpendicular viewport. You now have grey scale map that corresponds to the distance the objects were from you – an bump map of balls pushing through a round face. Now I bet you were searching for a way to do true displacement mapping – actuallly changing the profile of a mesh. Well, in the hands of a good IPAS prograrmer that could be possible now that R4 gives them access to the Z-Buffer. For example, Digimation's new LenzEFX package effects glows around objects based upon the Z-Buffer – allowing you to exapand the glow as far as you wish from the surface of the mesh. – Phil
#135654From: sanford kennedyNov 13, 1994 3:01 PM
<true displacement map> Phil, Nothing would please me more! Its no fun to put a bump map on some object, and then have to look at a totally smooth edge. It ruins the illusion. Since 3D Studio gave up trying to output RIB files, we have no way to do displacement texture maps. The Displace ipas is more like a toy compared to Renderman's displacement maps which can wrap around the sides of any object. Boy, I wish I had taken more programming. But, when would I have the time to animate? Do you know anybody who can write a RIB spec file from a 3DS file? Sanford
#135902From: Glenn J MelenhorstNov 14, 1994 3:47 PM
Hey Phil, I loved your z-buffer/bump map trick! I have used it for the displace.ipas but not a bump. Glenn Zephyr
#135645From: MARTIN G FOSTERNov 13, 1994 2:36 PM
Phil, >> PERFECT tool for creating bump maps that relate to geometry, or an equally valuable method for creating a masking selection << cool stuff, indeed 🙂 I'm going to try it out.
#135612From: Yost GroupNov 13, 1994 10:30 AM
In addition to Phil's excellent technique for making bump-maps, the z-buffer gives you a depth mask that you can use for compositing, so you can do your own atmosphere-like effects. David Stinnett has this method down cold, so if he's around, he could explain it for ya. – G
#135644From: MARTIN G FOSTERNov 13, 1994 2:35 PM
Gary, >> In addition to Phil's excellent technique for making bump-maps, the z-buffer gives you a depth mask that you can use for compositing << that sounds _very_ useful. David Stinnett explains the manual method of this in the "3d Studio Special Effects" book.
#135646From: ALAN IGLESIASNov 13, 1994 2:37 PM
This stuff sounds great, Gary. I hope DavidS jumps in and elaborates a little for everyone… David? -Alan
#136110From: David StinnettNov 15, 1994 5:02 AM
>>I hope DavidS jumps in and elaborates a little for everyone… What, and spoil the suprise? Ok, time for a shameless plug… All the details are in chapter 12 of "3D Studio special effects" <g> Using the Z-buffer as a mask in video post, an object can be made to fade into the background or layer behind it. I think the best results would come from using a matte rendered with a white matte material and distance cueing, instead of the true Z-buffer image as derived from the Seez IPAS. (see my note to Gary). Sorry, I can't really go into much detail now, but I do go into extreme detail on this method in the book, so anyone interested should definately have a look. David
#136149From: ALAN IGLESIASNov 15, 1994 9:42 AM
Thanks, David… -Alan
#135901From: Glenn J MelenhorstNov 14, 1994 3:47 PM
Hi Gary, Is it me or is the resulting Z-Buffer image non-antialiased? I did a test render with the IPAS (Thanks very much for it BTW (G)) using balls.3ds and found the edges jaggy. Have I missed something. Thanks. Glenn Zephyr.
#136015From: Yost GroupNov 14, 1994 9:33 PM
I can understand your confusion, but it isn't you. There isn't supposed to be any antialiasing in a z-buffer. Consider this. In the z-buffer, a pixel can have any number of surfaces inside of it, but only the nearest surface's distance is recorded. How would antialiasing be possible? You could certainly have a finer-resolution z-buffer than 8-bits (since the z-buffer info is stored as a floating-point number), but you'd have to have an IXP that wrote it out in higher bit-depth (24, for example) and then an application that could use that extra info. – G
#136024From: Glenn J MelenhorstNov 14, 1994 9:43 PM
<<Consider this. In the z-buffer, a pixel can have any number of surfaces inside of it, but only the nearest surface's distance is recorded. How would antialiasing be possible?>> Doop! Of corse you gotta realise I had my zany swirling animator's bowtie on when I asked that stupid question. Thanks for the clarification Gary. Glenn Zephyr.
#136417From: SyndesisNov 16, 1994 10:24 AM
If you want "anti-aliased" Z-buffer values, you just interpolate between the depths between adjacent pixels. It's as good as most anti-aliasing…
#136444From: Yost GroupNov 16, 1994 11:31 AM
That would certainly be straightforward to do, in both an IXP or the upcoming IXP scripting language from KUB. – G
#136109From: David StinnettNov 15, 1994 5:01 AM
>>atmosphere-like effects. David Stinnett has this method down cold, so if he's around…. Hi Gary, I'm still checking in when I can (which isn't near as often as I would like). I DL'ed the Z-buffer IPAS and it seems it will -not- work for doing the comp effects you mentioned. For a matte (mask) to work properly, it really HAS to be anti-aliased, or else you end up with artifacts around the edges of the objects you are trying to composite, resulting in a bad looking image (doing a comp using an anti-aliased image with a non anti-aliased alpha channel just doesn't work). Aside from that problem, Is there any way to control what color values are used in the z-buffered image? I only played with it a bit, but it seemed (in a single object scene) that no matter how far away from the camera the object was, the closest parts of the object were still pure white. shouldn't the object fade out as it gets further from the camera? (in absolute space, not just from the start and end of the object). Unless there was control over that, trying to, for example, make an object dissapear into the clouds wouldn't work, because the object would never fade to black. Using the good ol' fashoned white matte material and distance cueing still seems like the best option for making a depth matte for use with compositing. (at this moment, anyway)
#136253From: Yost GroupNov 15, 1994 3:51 PM
Good point. What you really need for z-buffer compositing effects is an IXP that does some filtering around the objects. Here's what's actually going on in SEEZ. SEEZ takes the 'zmin' and 'zmax' values from the FrameParm structure, then normalizes the values between the z minimum and z maximum to range from 255-0. That's why SEEZ causes the nearest part of the objects in the scene to be bright white. If the code is altered with some arbitrary near/far values, the objects will get dimmer as they recede. (Tom wrote SEEZ this way so that he could mess around with random dot stereograms.) To summarize, each pixel's Z value reflects the distance from the camera to the nearest object fragment in that pixel. If the view is not a camera, then the Z value in the pixel is not the distance from the viewer (since the view is orthographic, there is no viewpoint) but the distance from the point being looked at. In orthographic views, Z values can be negative. True, this can cause aliasing to occur if simple compositing is done, and won't work well for transparent objects, but with some filtering, it can work very effectively. This is what the folks at Digimation are probably doing to get their depth-of-field zbuffer-based routine, and it's also why I put the source code to SEEZ in the zip file… so other developers could take the concepts and run with them (a la Digimation).
#137099From: David StinnettNov 20, 1994 4:48 AM
Thanks for the info on Seez and the Z-buffer. It's good to know that programmers can use the data and change it to suit their needs. I can't wait for some of these new routines to start popping up. David
#137124From: Yost GroupNov 20, 1994 10:44 AM
I'm _really_ looking forward to the new depth-of-field IXP. – G
#137154From: Aaron W. OstlerNov 20, 1994 4:57 PM
The depth-of-field Z focus from the Lenzfx package should be available in Decemeber. I finished most of the work for that a few weeks back and it looks great. You can focus in on any part of a scene, have the camera AUTO-FOCUS to its target, or track focus on an object (or dummy object) as it moves. Z focus also lets you set the F stop or depth of blur for the camera so you can define how quickly objects go out of focus based on distance from the focal point. It all adds great photorealism to renderings. Aaron
#137185From: Yost GroupNov 20, 1994 10:34 PM
Auto-focus? You're making me drool. Reaching for a kleenex, – G
#137155From: David StinnettNov 20, 1994 5:55 PM
Me too, but I hear it is very time consuming to process. I also hope the price is reasonable. I just found out the price of Rayman…. $1000! I guess I won't be getting that one. David
#137192From: Aaron W. OstlerNov 20, 1994 11:29 PM
The rendering times for the Z focus are dependant on how blurry the image is, and which of the two different blur algorithms is used, but they are pretty quick. Most of my test renderings are under 10-15 seconds. The longest I ever had was still under one minute (on a Pentimum 90). The price of Lenzfx is $295. Which includes the Z-focus, lens flare, aura and starlight effects. Aaron
#137200From: David StinnettNov 20, 1994 11:57 PM
Thanks for the info. David
#135630From: bruce gorenNov 13, 1994 12:38 PM
Thanks for the message posting ! I would not have seen this in the library for quite a while. Bruce N. Goren