Z-Sorting and Perspective Projection in AS3 and Flash Player 10

In Flash Player 10 one can literally ‘build’ 3D objects by placing their elements in the 3D space.
Such objects can be rotated easily. The z-sorting, however, has to be done ‘by hand’.
In this tutorial, we show that with the effects of perspective projection, sorting
by the z-coordinate does not work very well. Instead, we sort with respect to the distance
from the observer.

You Might Also Like...

  • Z-Sorting and Perspective Projection in AS3 and Flash Player 10

    728 readersIn Flash Player 10 one can literally 'build' 3D objects by placing their elements in the 3D space. Such objects can be rotated easily. The z-sorting, however, has to be done 'by hand'. In this tutorial, we show that with the effects of perspective projection, sorting by the z-coordinate does not work very well. Instead,

  • 3D Photo Gallery in Flash CS4

    461 readersA stunning 3D gallery of outer space images! The new 3D ActionScript 3 methods available in Flash Player 10 and Flash CS4 make it possible to literally 'build' complex 3D objects by positioning their

  • Depth-Sorting of a 3D Card and the Projection Center in Flash CS4

    1258 readersIf a card rotating in 3D is not located near the projection center, determining which side should be visible by looking at the angle of rotation may not work. We show a depth-sorting method that works

  • Depth-Sorting of a 3D Card and the Projection Center in Flash CS4

    291 readersIf a card rotating in 3D is not located near the projection center, determining which side should be visible by looking at the angle of rotation may not work. We show a depth-sorting method that works in every case by using a normal vector to a card and a vector toward the observer. We present

  • Getting Started with 3D Methods in Flash Player 10

    311 readersIn this new tutorial at flashandmath.com, we show how to use a few simple 3D features of Player 10, rotationX, rotationY, fieldOfView, to perform free rotations of bitmaps in 3D with perspective and texture mapping. Amazing. And

  • Observer Pattern Actionscript 3

    344 readersOne of the most useful design pattern when you don’t want to work with framework like Swiz, Cairngorm, Mate or PureMVC but you’d like to work with a comfortable utility to manage events in your application or web site is Observer Pattern. The definition from Wikipedia is: The observer pattern (a subset of the publish/subscribe

  • 3D Display Cube with a Versatile Custom AS3 Class in Flash CS4

    1888 readersEach instance of the DisplayCube class accepts any DisplayObjects as sides, it revolves in 3D, its sides respond to clicks. Moreover, the cube drops shadow in 3D! We show an application with three Bitmap cube menus

  • 3D Display Cube with a Versatile Custom AS3 Class in Flash CS4

    755 readersEach instance of the DisplayCube class accepts any DisplayObjects as sides, it revolves in 3D, its sides respond to clicks. Moreover, the cube drops shadow in 3D! We show an application with three Bitmap cube menus that drop dynamic shadows on the floor beneath as they rotate. Correct depth-sorting regardless of position and projection settings.

  • Using Adobe Flex 4 and spark.effects to create a cool star-field

    369 readersWas working with the 3D features of Flex 4 specificallyspark.effects.move3Dspark.effects.rotate3Dspark.effects.scale3DFor a presentation at the Melbourne Flex User Group and decided to create a 3D star-field. This worked out well for my demo, it allowed me to demonstrate something real.You can control the star-field, the controls, top-bottom arePerspective Projection XPerspective Projection YSpeed of effectSize of StarDirection of

  • Flex 4: UIComponent.depth

    566 readersDo you remember using MovieClip.getDepth() & MovieClip.swapDepths(target:Object) in AS 1.0 and 2.0. This was how we used to work with the z-sorting of MovieClips. Oh the joy! With the release of AS 3.0 depths went out the window and the display list was introduced, the index of the child denoting the z-sorting of the DisplayObjects.

'>How to create a top quality logo for your company
  • Remove a Section of Your Photo
  • Subscribe to RSS headline updates from: GurusUnleashed
    Powered by FeedBurner

  • Design & Career Resources

    Open design job and RFQ/RFP listings for Thursday, 29 July Courtesy of Design Jobs Live!
    The latest resources and free stuff (like textures, fonts, Photoshop brushes, scripts, plug-ins, and much more!) from workflowFreelance.com. Read more!
    The latest headlines from workflowFreelance.com. Read more!
  • Popular Search Terms

    Curious what others are searching for? Below are the most popular search terms over the last 30 days.