Question

So i've been learning how to develop stuff in 3D with Flash using the Away3D engine, whilst i'm getting to grips with a lot of the techniques and methods of working with Away3D i've now hit a problem.

enter image description here

As you can see above, I have a rectangle with a texture on it, positioned 1 unit away from the rest of the objects, however when rotating about the y-axis on a fixed point; strange things start to happen.

I'd call it z-fighting, but that's only when two objects are at exactly the same depth correct?

Either way I need a way to combat this issue, or some pointers on what to use or where to research, the issue being im not too familiar with Away3D so I don't know where to start.

Any help would be much appreciated :)

Was it helpful?

Solution

That's exactly Z-Fighting, both objects are at exact same depth in depth buffer.

A. Increase Depth buffer precision (from 16bit to 24bit)

B. Make sure you use your depth efficiently (e.g. if your objects are within 5 .. 5000 range then it is a waste to use 0.01 .. 5000 depth range)

C. in most complicated cases you might use 2 pass render with 2 depth ranges for distant and close objects separately.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top