Results 1 to 8 of 8

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

  1. #1
    prian
    Guest

    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.

  2. #2
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

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

    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

  3. #3
    prian
    Guest

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

    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

  4. #4
    Member
    Join Date
    Feb 2005
    Location
    San Jose, CA
    Posts
    63

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

    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

  5. #5
    prian
    Guest

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

    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.

  6. #6
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

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

    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
    Code :
    <bind_vertex_input semantic="CHANNEL1" input_semantic="TEXCOORD" input_set="1"/>
    to
    Code :
    <bind_vertex_input semantic="CHANNEL1" input_semantic="TEXCOORD" input_set="0"/>

    Change
    Code :
    <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
    Code :
    <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

  7. #7
    prian
    Guest

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

    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),

    Code :
     
          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

  8. #8
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •