[Papervision3D] Collada MaterialsList Problem (PaperVision3D)
oskar.mohar at elektroncek.eu
Sun May 25 03:10:51 PDT 2008
i think you have to name your material the same as you named your material in
maya (or max)..
check your DAE file for line like:
<material id="lambert8" name="lambert8">
then name your material the same.. like:
materialsList.addMaterial( colorMaterial1, "lambert8" );
> 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
> // 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;
> 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 above:
> 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.
View this message in context: http://www.nabble.com/Collada-MaterialsList-Problem-%28PaperVision3D%29-tp17441557p17456389.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D