# Upcoming transparent objects in proper depth order?

Let’s say I have 10 Geo COMPs, some transparent, some not. Do I then have to set the number-of-passes in the render TOP to 10 so that it always renders all transparencies correctly? If so, does this mean it’ll take 10 times longer to render the scene?

Another example.
Geo1: z = -1
Geo2: z = -5 (transparent)
Geo3: z = -6
Geo4: z = -10
Geo5: a sphere sourrounding all

Does this mean I need to set the number of passes at least to 3
1 to render Geo1
2 to render the transparent Geo2
3 to Geo3,4,5

And what happens if Geo4 is animated, going from -10 >0 >-10?
Will this introduce another necessary pass, as at some point in time there are now two geometries (Geo1 Geo4) before the transparent geometry (Geo2)?

The feature is a pixel based approach, not object based. So it’s not directly related to the # of objects, but rather how they are layered.

This feature uses a technique called Depth Peeling. First you render the normal frame. On your next render you peel away all of the pixels you saw in the first frame, and reveal the pixels underneath them. The next frame you do the same, peeling away the pixels you could see from the 2nd render. And so on. Once all of the renders are done, you re composite each layer Over the other, starting at the farthest back layer.

So if you take a sphere for example, you’ll need to do 2 passes, the first one for the front of the sphere, and then 2nd will be the inside of the sphere.
If you have 10 spheres, one behind the other. You’ll need 19-20 passes to get the correct image.
If you have 10 spheres, each next to each other across the screen, you’ll only need 2 passes.

In reality though you will only need 3-5 passes to get an image that’s acceptable. It may not be 100% correct, but it’ll look pretty close to correct.

Yes, each pass is a full render, so each pass adds significant overhead.

Going forward there is a dual-depth peeling technique that peels from the front and the back at the same time, that’s quite a bit faster. But I haven’t implemented that yet.

thanks for the nice explanation malcolm. looking forward to play with it