manual z-sort?

In my game, the player controls a tractor and leaves behind a trail of plowed soil, which I’ve been accomplishing by adding planes periodically.

The planes have to overlap somewhat, leading to the situation where the plane closest to the camera is rendered first, even though it might be under planes that are further away. The problem is that the comparative distance from the camera can change, leading to an effect where one plane suddenly “pops” on top of another one when driving by them.

Does anyone have any ideas about how to fix this? What I basically want is a way to fix the relative z-depth of each plane. Is there a good way to accomplish this?


Thanks.

Are they opaque? The added planes don’t need to be alpha-enabled, do they? If they don’t, then you can just use Opaque for the face settings (and no transparency on the material, either).

Faces that share the same position or nearly the same position (and facing the same direction) are always problematic.

Better avoid them as much as you can.

As a really hacky work-around, you could perhaps add a small z axis displacement IPO on the part adding the planes, so they don’t overlap, you could put it down to vibrations from the engine :smiley:

Haker’s idea sounds like a good one that’s worth trying out.

As a really hacky work-around, you could perhaps add a small z axis displacement IPO on the part adding the planes, so they don’t overlap, you could put it down to vibrations from the engine http://bafull.cgcookie.netdna-cdn.com/images/smilies/sago/biggrin.gif
I had already done that, and it prevented the “shimmery” effect when two planes exactly coincide, but the z-sorting of the planes would still change depending on the position of the camera.

Are they opaque? The added planes don’t need to be alpha-enabled, do they? If they don’t, then you can just use Opaque for the face settings (and no transparency on the material, either).
This fixes the problem. But… it looks better if the planes are transparent so I can blur the borders… Oh well.