On May 25, 2008, at 12:51 AM, Gerrit Voss wrote:
Hi, On Thu, 2008-05-22 at 10:56 -0500, Patrick Hartling wrote:The COLLADA loader on the fcptr_stable_jun07 SVN branch is in prettydecent shape now as of r1235, although I am still having some problemswith texture loading. My suspicion is that the textures are somehow malformed, but Open Scene Graph does not have the problems with them that OpenSG does. Would anyone be able to take a look at the model in the ZIP archive below and give me some hints about what might be preventing the textures from applying correctly?You dug up a really interesting case and as far as I can tell a rather strange model.
Yes, most of the models that I was testing could be called strange. Stronger language could be used, but I digress. :)
Well, there were two bugs inside the collada integration. 1) If any texture was set, no corresponding color was set, so when modulating the texture everything was black. 2) I interpreted the transparency value wrongly. There is more than one value. The colour carries an alpha value and there is a separate transparency value. Unfortunately they collide with some models setting it to 1 and some to 0. I guess the safest way for now is to take the colour value and not the separate one. I'll fix these in the trunk, I will also apply your branch changes to the collada loader so they are in sync again.
Fantastic! Thank you very much. I will test your fixes as soon as I can.
And now for the model weirdness. You must render it with backface culling enabled. There seem to be duplicated faces with wrong texture coordinates, all of which are backfacing. So with face culling enabledyou will see the correct set of faces, with correct texture coordinates. Without backface culling you get the wrong result. See attached images.
This isn't terribly surprising. I have other models that exhibit similar--or worse--behavior. I don't know if the COLLADA exporter for SketchUp needs work or if the people posting the models just don't realize that these problems exist in the source SketchUp data. With free models, you certainly get what you pay for.
Aside from the texture loading, I think that there is a prettysignificant memory leak in the COLLADA loader or in COLLADA DOM. I canonly load about 25 models before my application runs out of memory. This is frustrating, but for my purposes it is not a show-stopper. I probably will not have time to look into this for a while.At least for the trunk it was the collada_dom. That was the original reason why I looked into the later dom version.
OK, that's what I suspected. I guess it's a good thing that the purpose of my application is to convert COLLADA to OSB. We would be hurting pretty badly if we had to load all the COLLADA files simultaneously.
Thanks again! -Patrick -- Patrick L. Hartling Senior Software Engineer, Priority 5 http://www.priority5.com/
PGP.sig
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
