|
From: Frank C <li...@si...> - 2004-06-15 16:17:16
|
On 15-Jun-04, at 11:40 AM, Keith Wiley wrote: > However, it can't handle textures. If the objects have no texturing, > just colored faces, everything works great, but if the objects had a > texture mapped to the faces, it draws the new "merged" object such > that the original object (the one in the first half of the arrays) > displays correctly, but the second one that I added to it is a > complete mess. > ... > > I guess the solution is to use pinned mapping and make sure the two > objects retain their UV pin assignments (for now the separate objects > are identical anyway, so the vertex assignment (the shape), and the > texture, and the UV pinning are identical, except for a vertex > translation. The coordinates will be converted to UV when exported to 3DMF regardless of the projection you're using in Meshwork, so this isn't necessary AFAIK... > So with that said, I am unsure where to find the UV pin assignments > for a pinned texture. How do I get access to that data for a > particular TriMesh? I hope the question even makes sense. You'll have to dig through the trimesh's vertexAttributeTypes until you find an array of the type kQ3AttributeTypeShadingUV, then duplicate that information and append that array to match the extra vertices. You may need to do something similar for the vertex normals as well, although they'll also need to be transformed to match the transformed vertices. Frank. |