[Papervision3D] Masking an object but not its children

Suki allmandring at googlemail.com
Mon Jul 6 12:59:55 PDT 2009


Hi guys,
I'm new to this stuff and have been hoping for a little help with my problem
;-)

What I basically have is a sphere with some other children objects attached
to it rotating around it (if it helps you picture its - its a planet with
asteroids rotating around it). And what I'd like to do is mask the sphere
with a circle mask (to smooth out the edges) but still have the other
(child) objects rotating around it (no matter the mask). Any ideas?

I've had mixed success with:
viewport.containerSprite.getChildLayer(sphere, true, false).mask = mymask;

This does mask the sphere but I guess it doesn't copy the children to the
layer. So I've tried to apply it twice - like so:
viewport.containerSprite.getChildLayer(sphere, true, false).mask = mymask;
viewport.containerSprite.getChildLayer(sphere, true, true).mask = mymask;

But that doesn't work.

Does anyone know how would I accomplish this best (and not impact the
performance too much)? So selectively mask out an object/sphere in my scene?

Also - would it be possible to mask out the sphere before rendering it out?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090706/01f7a4b8/attachment.html>


More information about the Papervision3D mailing list