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 pretty > decent shape now as of r1235, although I am still having some problems > with 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. 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. 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 enabled you will see the correct set of faces, with correct texture coordinates. Without backface culling you get the wrong result. See attached images. > Aside from the texture loading, I think that there is a pretty > significant memory leak in the COLLADA loader or in COLLADA DOM. I can > only 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. kind regards, gerrit
<<attachment: cap_culled.jpg>>
<<attachment: cap_notculled.jpg>>
------------------------------------------------------------------------- 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
