Collada MaterialList Problem (PaperVision3D)

Hi Everyone,
I am trying to apply a material to a Collada model through ActionScript 3.0. I am having little to no success. I am able to change the texture by modifying the dae file directly by giving it the file in the <init_from>texture.jpg</init_from> field, but I need to do it through ActionScript so I can change the color of the model, add shaders, etc. Here is my attempt on getting one solid color material onto my sphere model:


   // LOAD MODEL HERE
   colorMaterial1 = new ColorMaterial(0x53F20D);
   colorMaterial1.doubleSided = true;
   
   var materialsList:MaterialsList = new MaterialsList(); 
   materialsList.addMaterial( colorMaterial1, "color1" ); 
   
   testModel = new Collada("checkeredSphere.dae", materialsList, 2.5);
   testModel.rotationY = 180;
   
   default_scene.addChild(testModel);

My model displays on the screen at the correct scale, but no material is shown. I just see the basic wireframe which is not even in the color I specified for the material.

See example using the code block above: http://www.scotspellman.com/test/Sphere/TestModel.html

Please help, I do not know what I am missing or doing wrong… I’ve been trying to resolve this issue for over a week now :*(.

Any help is always greatly appreciated,

Thanks in advance!

PS - Hopefully the code block above is enough to see my problem, if not I am more than happy to send over source files on request. Thanks again.

Solution: http://www.nabble.com/Collada-MaterialsList-Problem-(PaperVision3D)-td17441557.html

Thanks Nabble peeps, you rock! :bounce: