[Papervision3D] BitmapMaterial/BitmapFileMaterial + DAE() = Black/Borked UV's??
Jarrad Hope
me at jarradhope.com
Sun Jun 28 19:20:54 PDT 2009
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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 33.png
Type: image/png
Size: 50257 bytes
Desc: not available
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090629/82744fb8/attachment-0001.png>
More information about the Papervision3D
mailing list