VizualPV3DLoader – a class for loading VizualPV3D scenes into Papervision3D projects


If you haven’t yet seen it, VizualPV3D is the excellent GUI interface from Juxt Interactive for creating 3D scenes using Papervision3D. It’s currently in alpha, but definitely worth checking out as it already has loads of great features and makes creating complex 3D scenes in Flash very easy indeed.

Having played around with the program for a while I then wanted to import the scenes I’d created into a new AS3 project but couldn’t find any classes included to do that. I think these features may be added in a future version, but for now I wanted something simple and reusable to try and get the geometry and materials of the scene imported quickly, so I wrote a basic class to do just that.

The class is called VizualPV3DLoader and currently supports the following: basic primitive shapes (cube, cylinder, cone, sphere and plane), basic materials (wireframe, flatshade, cellshade, gourad and phong), external BitmapAssetMaterial’s, positioning elements in the 3d scene and grouping elements together within empty DisplayObject3D containers.

The class itself extends DisplayObject3D, so you can add it straight into your main scene. From there you can access all the groups and objects in it by name. I’m looking at adding in a few more features in the future, including: more materials, text3D support and maybe event integration with a physics library.

Usage is fairly easy…

//include the class
import me.pv3d.VizualPV3DLoader;
//elsewhere add it to your papervision3d scene
var vLoader:VizualPV3DLoader = new VizualPV3DLoader('assets/', light);

The constructor takes a couple of parameters, the first is for the assets directory (where your external textures are stored) and the second is for an instance of PointLight3D for use with any shaded materials. You can also add a listener for a VizualPV3DEvent.SCENE_READY event, which might be useful if its a really complex scene that takes a while to process.

Below is a screen grab of a simple demo I made with the class and a link to view the demo and download the source code, maybe someone will find it useful.

VizualPV3DLoader - View Demo and Source Code

View Demo and Source Code


3 thoughts on “VizualPV3DLoader – a class for loading VizualPV3D scenes into Papervision3D projects

  1. Brady Georgen

    Excellent start. I really want to get Vizual into my workflow and this helps a lot. I’m sure to be extending the functionality of this class, I’ll let you know what I come up with if you’d like.


    • Matt

      Thanks Brady! Glad to hear people are finding this stuff useful, would be great to see what else is possible with a bit more development time too.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s