Tag Archives: 3D

Alternativa Class Generating AIR App

Through my recent experience with Alternativa, I can say hands down that getting your model out of the 3DS file format and into AS classes is simply the way to go. Yes, having classes that are thousands upon thousands of lines of nothing but vertex creation is kind of lame; but the performance gain from it is completely worth it. Especially when you consider that complex models take on the order of 10 seconds or more just to load from 3DS into your scene. I’ve seen some of these models load from AS classes in a third of the time.

So we have a function given to us in the API to generate a class from a mesh object, the generateClass() method. It creates a string which represents the entire class written out. But for models with multiple meshes contained in a hierarchy, it would be nice to have something create these classes automatically. So, I created an AIR app that does just that. Given a directory and a 3DS model, it will take the 3DS model, parse all of the meshes, and allow you to edit mesh names. Once you are ready, it writes the files out to the directory you choose. It will (hopefully) ignore all non-mesh objects, and will even create directories for multiple meshes contained within a parent mesh. Its a free app, do what you want with it. Just remember that you use it at your own risk, there is no warranty and though I will do what I can to help those with problems I may not have the time to fix every issue.

Now then, with that out of the way… To use it, simply install the AIR app (download the AIR or zip file here). Once you’ve installed and opened it, click the choose directory button:

Open Directory Image

After you’ve chosen the directory, click the Choose 3DS File button:

Choose 3DS File Image

Once you’ve chosen both, you can edit mesh names and then export your files by clicking the Create Classes! button. Here is a short video showing how it works:

Example of Alternativa Class Generator

Papervision3D Rubik’s Cube!

To use this swf, just click on the arrows to turn the faces of the cube, and drag the mouse to turn the whole cube:

A friend of mine and I were joking one day that the least accessible interface around would require you to solve a Rubik’s cube before you could click a button or interact with it. Later that day I read an article on Papervision3D and the idea came to me to create a Rubik’s cube in Papervision3D. I thought it would be a great way to learn more about Papervision3D and something fun to work on. I had arrows for the top and bottom face of the cube, but it was just too much on the screen and was difficult to see much in the 3/4 overhead view with those arrows in too.

I ended up learning more about coordinate systems and arrays than I did about Papervision, but it was still a blast. At any rate, I plan to keep adding to it over time. I’d like to have the initial configuration load from XML and I also plan on writing a class to check to see if the cube has been solved after each move. All of that will have to wait though, since I just got my invite into Google’s Appengine and I’m really psyched to learn some more about it!