Online Example::Papvervision 3D Renderable Spline with Path Following

This example uses methods in the Phunky branch of the Papervision 3D SVN. Working with the source code requires a bit of prior knowledge of how to use PV3D with FlexBuilder.

Sometimes it is useful (if not required) to visualize an actual path in 3D space. The new Lines3D and Line3D classes have been incorporated into a PV3DSpline class that extends the Singularity P3D.BezierSpline class. This allows the BezierSpline to remain generic. In addition to spline drawing methods, the new class has an orient() method that automatically orients an object to the path.

What is not yet available is detailed roll control. A better path animation method is something on my 'to do' list and will probably involve Frenet frames. This will also require a more detailed understanding of Papervision 3D internals (too many background projects ... too little time).

A MaterialsList material is applied to a cube (oriented along the z-axis) to mark the top (blue) and front (green). This allows easy visualization of the object's orientation as it is animated around the path.

The spline path is drawn in 3D space after reading the xml path data. Click the 'Animate' button to watch the object move along the path.

This example requires the Flash™ 9 player.

You need to upgrade your Flash Player

This example requires the Flash™ 9 player.

This example is designed to use splines exported from 3ds max. The circlepath.xml file used in the above demo is included in the Singularity download. Place it in the bin file of your Flex project.

For further reading,

:: Path Animation from 3ds max .

:: Spline to XML Maxscript .

Source Code. Download the Singularity package (this example is in Singularity/demos/P3D/RenderableSpline.mxml). You must install the PV3D code (Phunky branch) and make sure the Canvas3D.as file is in the org.papervision3d.flex folder.