Warning: This may take a while to load. The models are over half a meg combined, and parsing them takes a little bit of time when the flash file gets loaded.
Now, as you can see, we finally have textures on the models. Simone and I finally gave up on creating textures in Maya and trying to save them in Collada format, and just textured the Boids inside Papervision. Would you believe that it's as simple as
var warmBody:PhongMaterial;
var warmWings:PhongMaterial;
var warmGlow:PhongMaterial;
warmBody = new PhongMaterial(light, 0xCCCCCC, 0x886600, 64);
warmWings = new PhongMaterial(light, 0xCCCCCC, 0xCC7700, 32);
warmGlow = new PhongMaterial(light, 0xFFFFFF, 0x444466, 0);
var WarmList:MaterialsList = new MaterialsList();
WarmList.addMaterial(warmBody, "body");
WarmList.addMaterial(warmWings, "wings");
WarmList.addMaterial(warmGlow, "glow");
warmFish = new Collada("bot1.dae", WarmList);
The whole mess of trying to load textures from the Collada file just got to be too much of a hassle.
The models and textures both need a little more fine tuning. You can see some static where polygons overlap and the renderer has to pick which one to draw. Boolean difference operations should fix all of those. The textures just need a little more tuning, maybe we'll try out gouraud shading for the next batch.
Also of interest, tonights flash file is actually built with FlashDevelop. My copy of Flash is about to expire, being the trial version, and I wanted to make sure I could rebuild everything with the free IDE and SDK. While I'll miss the default tweener, I think I can migrate everything else to the completely free system.
Showing posts with label PaperVision3d. Show all posts
Showing posts with label PaperVision3d. Show all posts
Monday, July 14, 2008
Sunday, July 6, 2008
Bots in PaperVision3D
Note: When debugging, always assume that the problem you don't know how to fix is what is causing trouble. In this case, it's the Collada files exported by Maya3d. For what ever reason, Papervision3D parses them as invalid. Importing the file into Blender and then exporting back to *.dae works just fine, however.
And now, on with the show.
I haven't applied color or shaders to the object yet, so all we are getting is a wire frame with randomly colored connecting lines. I think the shaders from Maya3D are what is causing the 'invalid file' error, and the next step I'll attempt is using Maya to just bake the textures to image files, and load from those.
Finally, for those who are interested in how this actually works, this demo was constructed from the tutorial located at Papervision2. When the time it takes to get the .dae file corrected is greater then the time it takes to write the code, you know you've found some great resources.
Total time invested in this one demo: 3 hours.
1 hour to find no bugs in Papervision3d while wondering why the file doesn't load.
1 hour to edit .dae files by hand. At least XML is better then a binary file format.
1 hour to install Blender and associated scripts to fix the file, then tune the Flash file for internet distribution.
And now, on with the show.
I haven't applied color or shaders to the object yet, so all we are getting is a wire frame with randomly colored connecting lines. I think the shaders from Maya3D are what is causing the 'invalid file' error, and the next step I'll attempt is using Maya to just bake the textures to image files, and load from those.
Finally, for those who are interested in how this actually works, this demo was constructed from the tutorial located at Papervision2. When the time it takes to get the .dae file corrected is greater then the time it takes to write the code, you know you've found some great resources.
Total time invested in this one demo: 3 hours.
1 hour to find no bugs in Papervision3d while wondering why the file doesn't load.
1 hour to edit .dae files by hand. At least XML is better then a binary file format.
1 hour to install Blender and associated scripts to fix the file, then tune the Flash file for internet distribution.
Subscribe to:
Posts (Atom)