Hi,
I am fighting the known z-sorting issue using alphaBlending. Is there a way to set z indicies by hand? That way I could determine myself how the objects are ordered (its pretty simple in my case).
Thanks
Manual sorting for alphaBlendingSoftware: Away3D 4.x |
||
rewb0rn, Newbie
Posted: 07 November 2011 02:34 PM Total Posts: 8 Hi, I am fighting the known z-sorting issue using alphaBlending. Is there a way to set z indicies by hand? That way I could determine myself how the objects are ordered (its pretty simple in my case). Thanks |
||
theMightyAtom, Sr. Member
Posted: 07 November 2011 07:51 PM Total Posts: 669 [ # 1 ] Unfortunately it’s not quite as simple to control z-sorting in 4.0 as it was in previous versions, as it’s controlled automatically on the GPU rather than in AS3. Use alphaThreshold instead of alphaBlending. It gives a harder edge, but otherwise works as you’d expect. There are other threads explaining what happens with alphaBlending. Good Luck! |
||
|
||
|
||
mwoodman, Newbie
Posted: 26 September 2012 04:58 PM Total Posts: 4 [ # 4 ]
It’s a brute-force workaround, but you can offset positions in subgeometries away from the Mesh’s position. It doesn’t change the apparent view distance, but the underlying offset forces the z-ordering to be what you want. It won’t work for all situations, but in my use cases it works like a charm. Code posted here: |