jPCT-AE - a 3d engine for Android > Support

transparent objects depth?

(1/3) > >>

Disastorm:
Hello is there any way to fix this? Depending on the camera angle certain polys of transparent objects seem to appear in front of things that they should be behind.


EgonOlsen:
No, there's no way to fix this except for splitting the objects into several smaller ones. Transparent objects will be sorted by depth and rendered back to front. But they can only be sorted by object, not by polygon which results in this kind of artifacts when seen from specific angles.

Disastorm:
That sounds like it would explain part of the grass showing up inside itself, but the grass, the bush, and the fog are 3 different objects though (they are all clones of other grass, fog, and bushes though, not sure if thats related)

EgonOlsen:
That's another, albeit related issue. The sorting has to use some point of the object to determine its depth. So it takes the center of the object transformed into camera space. As you can easily imagine, this sorting can never be perfect in all cases (if it where, nobody would need a depth buffer at all), which leads to these results. For special cases, you can tweak the sorting with Object3D.setSortOffset(), but that's most likely not suitable here.

EgonOlsen:
More information: http://en.wikipedia.org/wiki/Painter's_algorithm

Navigation

[0] Message Index

[#] Next page

Go to full version