[Papervision3D] z-ordering issue

Nikos Chagialas nikosgroups at gmail.com
Thu May 21 07:20:17 PDT 2009


Thanks Paul,
I excluded the back-face of the cube and that solved it.

I know..I started like that, having a cube and later on I decided that I am
gonna use some interactive content so the first thing that came into my mind
was to use a plane. I realised it afterwards, but had already done most of
the interactive bit..and was a bit lazy too to change it!

thanks for your help
nikos

2009/5/21 Paul Tondeur <paul at paultondeur.nl>

> Hi Nikos,
> First of all, why don't you add the image and text to one of the sides of
> the cube, instead of having the cube and very close in front a plane with
> the text and an image. By having the two faces so close to each other, you
> are asking for z-sorting issues.
>
> Beside adding the image as a texture for the back-face of the cube, you can
> also mark the back-face of your cube as an excluded face. This can be
> achieved by using the last parameter at instantiation of the cube: varcube:cube =
> new Cube(mat,500,500,500,1,1,1,0,Cube.BACK);
>
> ViewportLayers can also be used to solve your issue. Just add the planes to
> 1 viewportlayer and leave the cubes as they are. Performance wise this isn't
> the best solution, as Papervision3D will first draw the cubes and then the
> planes in front. It would be a waste of capacity to first draw the back face
> of a cube and then draw the plane above it and never see the cubes
> back-face.
>
> Paul
>
> On May 21, 2009, at 2:29 PM, Nikos Chagialas wrote:
>
> Hi,
> I know this probably has been talked a lot in the list, but I can't seem to
> find any solution.
>
> I 've got a scene with some floating Panels. Each panel contains a cube as
> the basis and a plane for the content (image, text), which is placed -8
> pixels in the z axis.
>
> http://www.devgallery.com/test/pv/1/
>
> I have used viewport.getChildLayer(obj, true).layerIndex = ++topDepth; for
> sorting out the depths on rollover, etc.
>
> However, even though the content plane is set to have a greater depth than
> the cube and also placed in front, a diagonal black line is displayed in the
> content-image when animating.
>
> I have tried useOwnContainer=true but didn't help. If I use it for all
> objects it produces the same bug, where if I use it only in the content
> plane it fixes the line but breaks the z-ordering.
>
> Any ideas?
>
> thanks for your time
> nikos
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090521/26699599/attachment-0001.html>


More information about the Papervision3D mailing list