PROBLEM LOAD TEXTURE (jpg, png) in PV of a collada model

well… this is my problem

when i export a collada model, that have a texture with a bitmap assign in the diffuse map, I try to load the .dae in papervision (FLASH), i can load the model, but this have a problem with the texture, the model is black and doesnt have the texture, the debugger say me that it cant load the texture.

its all… i will be really happy if we can help me.

What tools do you use to export the models?
Does Papervision display the right color if you only give it a diffuse color instead of texture?

Herbert

to export the collada model i use colladaMax 3.04C, when i open the collada file with a explorer this have <COLLADA version=“1.4.1”>…

Yes if i choose a color, this works, but i need to give it a texture… and i know that it is can.
Pls, this is very important to me, if you can help me i will give you thank you.

Pablo

You can try the coherencytest here and see if it catches any errors.
http://sourceforge.net/project/showfile … _id=229663

If there are no errors, then you might want to concentrate on your texture.
Try using a dummy squared texture like 512x512 rgba in tga or bmp.

Hope this help you.

Thanks,
Herbert

okey, i thinks that i give low information, here you have more…

i have downloaded a example, is here(example.rar); in the example you can open with a text editor and find this:

“<library_images>
<image id=“texture0” name=“texture0”>
<init_from>./vaca.png</init_from>
</image>
</library_images>”

well… you can change the image name or use the same image, put all files in the same folder, after, load dae file, and you can see that this dae works with the texture and you can change the imagen…

I create a model in 3d max and generate a collada file, well with this i cant load the texture i don know why?, if you see fine you can see a difference between the dae file in the example and my dae file … i want to know:

¿ how can i do to generate a file same to example ?
¿ what is wrong in my dae file ?

Remember that i need load the texture…
thanks for all…

PD: you can download the example and my test here.

Pablo,

the attached files seem to be OK and I can both load them with the proper texture.
This suggests that papervision can not handle the way the texture is assigned in your example.

I see two differences that may be the cause of the problem:
-mytest is using a non-power of two image, where vaca.dae is using a power of two image
-mytest is using textureset 1, where vaca.dae is using texture set 0

Try to the following by manually manipulating the dae.

Change

<bind_vertex_input semantic="CHANNEL1" input_semantic="TEXCOORD" input_set="1"/>

to

<bind_vertex_input semantic="CHANNEL1" input_semantic="TEXCOORD" input_set="0"/>

Change

<input semantic="TEXCOORD" source="#scout-mesh-map-channel1" offset="2" set="1"/>
<input semantic="TEXTANGENT" source="#scout-mesh-map-channel1-tangents" offset="3" set="1"/>
<input semantic="TEXBINORMAL" source="#scout-mesh-map-channel1-binormals" offset="4" set="1"/>

to

<input semantic="TEXCOORD" source="#scout-mesh-map-channel1" offset="2" set="0"/>
<input semantic="TEXTANGENT" source="#scout-mesh-map-channel1-tangents" offset="3" set="0"/>
<input semantic="TEXBINORMAL" source="#scout-mesh-map-channel1-binormals" offset="4" set="0"/>

Roland

i find the problem… well… first, when i use the class Collada.as, i can load the texture, but when i use the class DAE.as, i cant. I understand something, you need to create a BitmapFileMaterial and MaterialsList, after, you put this in the cold to dae object (I thinghs that dae class have a problem to reference the path of the texture),



      var bitmapTexture:BitmapFileMaterial = new BitmapFileMaterial(nameTexture);  
      var mats:MaterialsList = new MaterialsList();
      mats.addMaterial(bitmapTexture, "mat0");

      fileDae = new DAE(iniciar);/* iniciar = irrelevant ( if you have a animation, this begin if you have how true ) */
      fileDae.load(name, mats);


ok… after if you test this in the .swf, you cant see anythings, this dont works, and say that this cant load the texture (image), but if you test in a explorer, ¡¡¡¡ this works !!!

now, in my last post i public two file, myTest and example, when i load the file that i have in my test, i cant see the model in the swf, but in the example, yes i can see the model in the swf…

i will continue testing and looking information… if you find anythings pls tell me…

Pablo

I’ve asked the ascollada maintainer to drop in on this thread. Stay tuned.