On 12/17/2010 9:13 AM, Katharina Plugge wrote:
Hi,
MultiTexturing has still its problems. Now I tried the first time to use up to
3 textures. Converting to flt again lead to corrupted texture coords. I
attached an osg-file which can be used to reproduce the problem. Converting
this file to flt shows the effect.
Unfortunatly this time I have no idea what goes wrong. In
FltExportVisitor::writeUVList the texture coords for both channels are
determined correctly and written to _records. Somehow the texture coordinates
have to be corrupted later. In the resulting file texture coords from channel
one are mixed up with those from channel 2 and vice versa.
Would be great, if someone could help here.
Thank you!
I think I've identified the problem.
in expGeometryRecords.cpp lines 813-820, we write the UV list data incorrectly.
According to the FLT spec, the data should be grouped per-vertex, not per-layer.
We should have:
UV for vertex 0, layer 1
UV for vertex 0, layer 2
UV for vertex 1, layer 1
UV for vertex 1, layer 2
...etc...
Instead, we have this:
UV for vertex 0, layer 1
UV for vertex 1, layer 1
...etc...
UV for vertex 0, layer 2
UV for vertex 1, layer 2
...etc...
Oops!
I'll commit a fix shortly (if Robert has granted me write permission, otherwise
I'll post to osg-submissions).
I'll also add your test case to the regression suite.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org