Z-Sortin Bug?!?

0 views
Skip to first unread message

Aleksandr Makov

unread,
Nov 25, 2009, 5:34:32 AM11/25/09
to away3d.dev
Hey guys.

I'm new to away3D! And THANKS for such a great product.

However, following guidelines, examples and tutorials have led me to a
problematic scenario. Here's the link to the SWF: http://clients.berkana18.ee/sunair/3dwp/

In short: I've made a carousel of planes and put them into
ObjectContainer3D, arranged planes so that they form a circle. Now,
whenever I move the Plane in the front closer to the camera by Z axis,
it looks it doesn't look so. It looks like that Plane is being
stretched at it's place - behind the other Planes. But when I apply
rotationY to the ObjectContainer3D - it immediately renders it
correctly.

Is it a bug or I have missed something?

Thanks in advance.

Jensa

unread,
Nov 25, 2009, 7:53:02 AM11/25/09
to away3d.dev
It's kind of hard to see the sorting since your planes use an alpha
less than 1, but you're doing this the right way. To sum it up:

1. make ObjectContainer3D
2. make Plane and addChild to the ObjectContainer3D
3. Change Z of Plane
4. Change rotation of ObjectContainer3D

That'll give you fully working sorting + simple to adjust/position
planes.

Rather than rotating all the planes, it's also easier to just let the
planes stand still and move the camera.

J

Aleksandr Makov

unread,
Nov 25, 2009, 8:02:34 AM11/25/09
to away3...@googlegroups.com
Thanks for the information Jensa.

Well, yes I agree that it's better to rotate the camera. I just don't know how to do it, since my cam is not in the center of the carousel. I assume I need to use Targeted Camera. Anyway - i'll give it a try if I get lucky enough to discover the syntax pretty fast.

Thanks Again.

Aleksandr Makov

unread,
Nov 25, 2009, 9:04:45 AM11/25/09
to away3...@googlegroups.com
Hm. Z-Sorting is completely wrong if only plane.z manipulated:  http://clients.berkana18.ee/sunair/3dwp-z/
however, if I manipulate camera.rotationY simultaneously - it works perfectly: http://clients.berkana18.ee/sunair/3dwp-zr/

Jensa

unread,
Nov 26, 2009, 8:19:27 AM11/26/09
to away3d.dev
Hi Aleksandr,
That's very odd. I'm sure there must be something else as well?

Have a look at this example to see how I'd do this:
http://www.flashgamer.com/workshop/ffk09/NavigationSimple.as

J

Aleksandr Makov

unread,
Nov 26, 2009, 8:46:08 AM11/26/09
to away3...@googlegroups.com
Hello Jensa.

I actually found what was causing problem - "ownCanvas" property of the plane. If it's set to true - it behaves as shown. But problem is - that I cannot apply alpha property to a plane now...hmm.

I'll dig more and report.

Thanks for help! Much appreciated!   

Jensa

unread,
Nov 26, 2009, 8:48:14 AM11/26/09
to away3d.dev
Apply the alpha to the material and not the Plane and you're set ;-)

ownCanvas enables filters, but removed Z-sorting.

J

Aleksandr Makov

unread,
Nov 26, 2009, 9:38:14 AM11/26/09
to away3...@googlegroups.com
Jensa,

Thank you VERY much - it worked. Finally!!!!!

:)
Reply all
Reply to author
Forward
0 new messages