View Full Version : shake super question

12 December 2003, 12:54 PM
Hi there,this post is going to be a little long,so please be patient!!
I've been thinking about that for a long time and I hope you all can help me.First things first,I'm not a professional shake user,so maybe there's something that I'm doing wrong.
As you all know an iff image,or similar,can contain a z channel,but it's an aliased channel,with a very poor grey gamma,which results in something really useless for highend composites.
There are a few workarounds for that,like creating an external z,rendering a 3d scene with a depth shader,or maybe with fog or with a black to white ramp projected in Y or....there are a thousand ways to achieve a good depth tga or tiff file.
I've created a quick example for this:
here are the color files:
and here are the depth images:
Ok,here the composition I've done:
With a reorder node,I've added the red channel of the depth images to themselves as z,and with a copy node I've added the new z channel of the depth files to the color files.
Result:I have a color file with an antialiased and beautiful z channel!! am I right?
ok,so here's the problem,and the name of the problem is that:
why do I always have jagged edges???????
look at this tree:
I've created an over node and layered the left file with the floor.Obviously it's perfect,as always in shake....but look at that:
Here I compare the over node and the zcompose node.
as you can see,the composition with the zcompose node is absolutely aliased,as if the image were a tipical iff with z.
Then,why did I render the depth files if i cannot have a perfect z composition?
I though that everything would be great doing a separate z,but I cannot get rid of these artifacts.
So,let me finish with this:
Is there a way on earth to work with good resolution files,with a good resolution z,and compose them all with a good z compositing?????or having jagged edges and artifacts is the price to pay for using depth images?...mmmm,sorry,I don't belive that!!
what's the trick?

12 December 2003, 05:46 PM
Have you checked out the depth compositing tutorial that comes with shake? It's Lesson Three - the NYC blimp one.

12 December 2003, 08:07 PM
I'm not familiar with shake, but generally the second you add any antialiasing to your z image, it'll be wrong. By anti-aliasing you are pushing and pulling the edges of the objects around.

What you Ideally need is a z-coverage channel, which will allow you to specify how much of that pixel gets merged or used. I don't know all the math behind it, but it may be a starting point for you to research.

12 December 2003, 03:20 AM
First, (maybe a dumb question, but I have to ask), are you Z compositing this scene just to give an example of the aliasing your getting in another scene? Because there is no point in Z compositing a scene like that.

Second, when you rendered your software Z, did you render in 8 bit or 16 bit? 8 bit will only give you 256 levels of grey which is not usually enough colors to give you a nice antialiased edge.

Third, try using a higher antialiasing setting in your 3d software when you render out the software Z. The edges on that software Z you showed looks aliased in the first place.

Fourth, try using the blur Z depth macro off highed, or just add your own blur to the b&w Z files that you are creating. Play with the blur setting till you get what your looking for.

12 December 2003, 08:26 AM
Phred42: Yeah,I checked this tutorial,that's how I know how to add an external z channel to an image.

Jayk2k:what is a z-coverage? it's the first time I hear about it

beaker:Yeah,I know there's no point z composing this,but it's a good example of what I mean: You can have antialiased images in color and depth,but after z composing them,the antialias goes away. It's not a 3d problem,because the images are ok,is a compositing problem.And blurring images is not a solution because what i want is not to loose edge accuracy.

12 December 2003, 03:27 PM
Discreet has the z coverage channels in it's RPF file format. Maybe you can ask one of the guys in the max forum to output a sample for you. Again, I don't really know the math behind it, but DF and I assume Combustion use it to smooth out the edges of a z-comp.

CGTalk Moderation
01 January 2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.