Manual sorting for alphaBlending

Software: 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

   

Avatar
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!

   

rewb0rn, Newbie
Posted: 09 November 2011 12:17 PM   Total Posts: 8   [ # 2 ]

Thanks,

yes I’ve read them all but using alphaTreshold gives unsatisfiying results in my case.. So absolutely no way to control the z index by hand?

   

rewb0rn, Newbie
Posted: 11 November 2011 11:47 AM   Total Posts: 8   [ # 3 ]

Noone has an idea? Not even a way to change the sorting algorithm or anything?

There must be a way, basically alphaBlending can not be utilized this way..

Thanks in advance

   

mwoodman, Newbie
Posted: 26 September 2012 04:58 PM   Total Posts: 4   [ # 4 ]
rewb0rn - 11 November 2011 11:47 AM

Noone has an idea? Not even a way to change the sorting algorithm or anything?

There must be a way, basically alphaBlending can not be utilized this way..

Thanks in advance

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:

http://away3d.com/forum/viewthread/2285/#10681

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X