[away3d] Whats Aways version of Papervison viewportLayers

2 views
Skip to first unread message

John Brookes

unread,
May 19, 2010, 4:54:49 AM5/19/10
to away3d-dev
I know theres pushback but can you sort objects like in Papervison by setting an index/sort order.How?

Also whats the away version of sorting by a triangles closest or furthest vertex
do3d.meshSort = DisplayObject3D.MESH_SORT_CLOSE; //MESH_SORT_FAR

Rob Bateman

unread,
May 19, 2010, 7:12:42 PM5/19/10
to away3...@googlegroups.com
I know theres pushback but can you sort objects like in Papervison by setting an index/sort order.How?

you can define layers similar to papervision by creating sessions (SpriteRenderSession is the default) and setting the screenZ property to something, then assign objects in teh scene to use this particular render session by doing:

myObject.ownSession = myRenderSession;

 this will force the contents of the object to render at the specified z-depth, with sorting being carried out in the usual way inside the layer.


Also whats the away version of sorting by a triangles closest or furthest vertex
do3d.meshSort = DisplayObject3D.MESH_SORT_CLOSE; //MESH_SORT_FAR

this is what pushfront does on a mesh object (for closest vertex) or pushback (for furthest vertex)


cheers


Rob



--
Rob Bateman
Flash Development & Consultancy

rob.b...@gmail.com
www.infiniteturtles.co.uk
www.away3d.com

John Brookes

unread,
May 20, 2010, 1:08:48 AM5/20/10
to away3...@googlegroups.com
Thanks Rob.
Did a search on SpriteRenderSession and got the Normal mapped mustang example.

Reply all
Reply to author
Forward
0 new messages