A Sprite for a Plane?

View: New views
3 Messages — Rating Filter:   Alert me  

A Sprite for a Plane?

by Justin Lawerance Mills :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have come to the conclusion that I want to render each of my planes  
in a separate sprite but I am unsure of the best approach in Great  
White, would this relate to effects? I might be able to create 3 of  
my 'PaperVisionSetup' classes and switch visibility of planes between  
them but this is not an ideal approach, have used it for 'a flip' but  
in the past, so I know it can work especially if you switch render on  
and off as needed in each version.

Reasons for wanting to use a sprite per plane:

1) This will allow me to colour transform the container without  
having to update the bitmap for alpha changes (alpha lags the tweens  
and I am currently using a single tween to update all plane positions  
and only applying alpha when needed, maybe I should be turning  
interactive on and off but I believe alpha on transparent movie is  
not ideal)

2) I want handcursor and not sure it is supported.

3) If mouse does not move the virtual mouse does not map subseqent  
click properly when planes below have moved, but I believe some  
subsequent may get updates so I can only really know a plane has been  
clicked and it gets messy to calculate which one, I am currently  
overlying blend mode transparent buttons above my papervision layer  
as a work round.

4) Virtual mouse is an overhead a sprite per plane in my simple need  
would be more appropriate.  Do one of the other 3d engines provide  
this or can I get this to work in pv?

Cheers

Justin
   

_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: A Sprite for a Plane?

by Andy Zupko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://blog.zupko.info/?p=129

viewport.getChildLayer will create a new layer for you or return an  
existing one for that viewport if it already exists.  you can then  
tween, set useHandCursor, or do whatever you want.  or you can use  
useOwnContainer - but if you have alot of objects this can be slower.

On Jul 23, 2008, at 6:26 AM, Justin Lawerance Mills wrote:

> I have come to the conclusion that I want to render each of my planes
> in a separate sprite but I am unsure of the best approach in Great
> White, would this relate to effects? I might be able to create 3 of
> my 'PaperVisionSetup' classes and switch visibility of planes between
> them but this is not an ideal approach, have used it for 'a flip' but
> in the past, so I know it can work especially if you switch render on
> and off as needed in each version.
>
> Reasons for wanting to use a sprite per plane:
>
> 1) This will allow me to colour transform the container without
> having to update the bitmap for alpha changes (alpha lags the tweens
> and I am currently using a single tween to update all plane positions
> and only applying alpha when needed, maybe I should be turning
> interactive on and off but I believe alpha on transparent movie is
> not ideal)
>
> 2) I want handcursor and not sure it is supported.
>
> 3) If mouse does not move the virtual mouse does not map subseqent
> click properly when planes below have moved, but I believe some
> subsequent may get updates so I can only really know a plane has been
> clicked and it gets messy to calculate which one, I am currently
> overlying blend mode transparent buttons above my papervision layer
> as a work round.
>
> 4) Virtual mouse is an overhead a sprite per plane in my simple need
> would be more appropriate.  Do one of the other 3d engines provide
> this or can I get this to work in pv?
>
> Cheers
>
> Justin
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D@...
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

Re: A Sprite for a Plane?

by Justin Lawerance Mills :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andy 

Thanks

[quote]
viewport.getChildLayer will create a new layer for you or return an
existing one for that viewport if it already exists.  you can then
tween, set useHandCursor, or do whatever you want.  or you can use
useOwnContainer - but if you have alot of objects this can be slower.
[/quote]

Thanks I think I saw the link in my googles but did not realize its relevance, your explanation above clarifies everything.   

Is it messy to switch planes between 'useOwnContainer' or is it a toggle boolean setting?

For instance while tweening after a button response, planes are best rendered without their own container but when they need to interact with the mouse again they might be better rendered with their own container even if the scene is tweening, so is it like a render switch when the planes material renders, and any add/remove of required sprites is automatic  or is it make a decision when init or maybe use both and just toggle with visible. 

Thanks again, for the current small piece I may go have to go with the overlay buttons as they are working but I am definitely going to use this and I may need it for another part where I am running pv twice due to depth sorting....

Can I set new layers to always stay at a particular depth or is it always or never sorted? 

l Good stuff anyways.

Cheers

Justin  

On 23 Jul 2008, at 13:01, Andy Zupko wrote:

http://blog.zupko.info/?p=129



_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
LightInTheBox - Buy quality products at wholesale price