Loading MD2 Models with Papervision

Code to load MD2 files below. Anyone out there want to help create simple MD2 models that work well with Papervision - or - does anyone know of a good resource to purchase already animated models? I just wanted to get a few for some blog entry's. Full credit would be given or course. I found several models this morning but after a few hours only 1 of them was of value. It happened to be the one tied to Clint Hannaford's example. :/

Once you have a good model here is the super simple code to load it:

Actionscript:
  1. var wireframeMat:WireframeMaterial = new WireframeMaterial(0x000000);
  2.  
  3. var md2:MD2 = new MD2(true); //if you get errors try using false - it may be a single frame file (no animation)
  4. md2.load("assets/test_4.md2",wireframeMat);
  5. //Add to your scene for rendering

Yeah I know.. That's it. The hard part is finding a model that doesn't suck.

4 Responses to “Loading MD2 Models with Papervision”


Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Follow papervision2 on Twitter

RSS Feed