[Papervision3D] Z-fighting/clipping issue with plotting objects on a globe (sphere)
Paul Tondeur
paul at paultondeur.nl
Thu Jul 2 15:44:07 PDT 2009
Hi Aaron,
The sorting on your globe can perfectly solved with viewportLayers.
The globe can be rendered at layer 1 and the planes at layer 2, so
they will appear always on top.
An example implementation of this looks as follows:
var globe:Sphere = new Sphere();
scene.addChild(sphere);
var plane:Plane = new Plane();
scene.addChild(plane);
var globeLayer:ViewportLayer = viewport.getChildLayer(globe);
var planeLayer:ViewportLayer = viewport.getChildLayer(plane);
globeLayer.layerIndex = 1;
planeLayer.layerIndex = 2;
viewport.containerSprite.sortMode = ViewportLayerSortMode.INDEX_SORT;
This is just one of the ways you can use viewport layers. I hope this
helps.
Paul
On Jul 3, 2009, at 12:18 AM, Aaron Meyers wrote:
> Hello,
>
> I am starting work on a project where objects will be plotted on the
> earth. I've put together a quick test and found that when i position
> objects around a sphere, I have some clipping problems with the
> polygons of these objects. I put together an example to show what
> I'm talking about:
>
> http://aaron-meyers.com/globetest/
>
> You can click to change from plotting planes to cubes. I've actually
> offset the planes a bit away from the radius of the sphere, but the
> clipping problem is still pretty severe. I once encountered
> something similar in an OpenGL project and it turned out to be z-
> fighting and after adjusting the near clip and far clip distance on
> my projection matrix, it was fine. I suspect something like this
> might be the cause of my problem, but I don't really understand the
> inner workings of the Papervision3D transformation pipeline.
>
> Does anyone know how to get around this? Any tips? Thanks for any
> help.
>
> -Aaron
> _______________________________________________
> 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/20090703/b930acad/attachment-0001.html>
More information about the Papervision3D
mailing list