I've modified two files (attached) to parse library_nodes and assign texture
correctly. Guido, could you take a look at the code? I also moved some of
the xml calls like getelementbytagname("library_materials") out of the for
loop so that they're not called every time, as they should have the same
value every time.
I have tested this on 3 models (2 with library_nodes and one without). the
only one that didn't work completely was the model of a ferrari (the one
that I mentioned a month or so ago). i've gone through it with the
debugger, and it seems to parse the textures correctly and assign the
textures to faces. i confirmed this by using the info tool to see the index
of some faces' textures (they were not -1). However, on an initial view of
the model it appears black - when you zoom in and rotate it a bit, you can
see the red textures flickering, which seems to indicate that the textures
are correctly mapped, but for some reason not properly displayed (see file
www.akbars.net/ferrari.zip). This seems to be confirmed, because when I
saved the file in meshlab and opened it up again, the textures loaded
perfectly (see file www.akbars.net/ferrari_works.zip). any ideas?
i'm going to try debugging a call to the snapshot function to see what might
be obscuring the model... any thoughts?
thanks,
imran
|