[Papervision3D] BitmapMaterial/BitmapFileMaterial + DAE() = Black/Borked UV's??

Tim Knip tim.knip at gmail.com
Mon Jun 29 05:35:16 PDT 2009


Hi,

Not sure what's going wrong.

Make sure the material-names you pass match the <material> elements in
the COLLADA file.
The material-name to use is the @id attribute of the <material> element.
If that fails: try the @name attribute.

If still fails: please send me the COLLADA + textures so I can have a look.

Thanks,
Tim Knip

2009/6/29 Jarrad Hope <me at jarradhope.com>:
> My DAE loads and renders textures perfectly, until I use with
> BitmapMaterial and BitmapFileMaterial with the _same_ textures. When I
> add them, they show fragements of the texture but the rest of the
> model is BLACK. Incase my attachment does not work, please see.
> http://i44.tinypic.com/2efuk3m.png
>
> Now I try to use MaterialList to replace the textures with embedded.
> _dae.materials says there are only 2 materials.
>
> There is no lights.
>
> I am using latest papervision stable. I am exporting with blender
> collada 1.4, my textures are 512x512 each.
>
> I dont understand why the DAE class displays textures perfectly when
> they are loaded by the DAE class, but are black & weird when
> BitmapMaterial is used.
>
> When I use ColorMaterial the materials are replaced correctly.
>
> This leads me to the conclusion that everything is correct BUT
> something to do with bitmapmaterial/bitmapfilematerial.
>
>
> [Embed(source="TestWorld_ground.jpg")] private var TestWorld_ground:Class;
> [Embed(source="Man.jpg")] private var TestWorld_man:Class;
>
> //.... in my init
>
> var groundTexture:BitmapFileMaterial = new
> BitmapFileMaterial("TestWorld_ground.jpg");
> //var groundTexture:BitmapMaterial = new BitmapMaterial(Bitmap(new
> TestWorld_ground()).bitmapData);
> var manTexture:BitmapFileMaterial = new BitmapFileMaterial("Man.jpg");
> //var manTexture:BitmapMaterial = new BitmapMaterial(Bitmap(new
> TestWorld_man()).bitmapData);
> manTexture.interactive = true;
> var mats:MaterialsList = new MaterialsList();
> mats.addMaterial(manTexture, "SolidColor_005");
> mats.addMaterial(manTexture, "SolidColor_004");
> _dae = new DAE();
> _dae.addEventListener(FileLoadEvent.LOAD_COMPLETE, loaded);
> _dae.load(XML(new TestWorld()), mats); // <-- Textures are black, but
> still showing on some faces, weird?
>
> //_dae.load(XML(new TestWorld())); // <-- Textures display perfectly!
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>



More information about the Papervision3D mailing list