|
From: Keith W. <kw...@cs...> - 2004-06-15 15:40:31
|
Success first, problems and questions at the bottom: I successfully opened two seperate 3DMF files and combined them into a single object with a single trimesh of two distinct sets of disconnected vertices. I did this simply be appending the points array and triangles array of one trimesh to the other and incrementing the triangle/point assignments of the second object by the length of the first object's point array. It worked and rendered perfrectly. 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. Ideally of course, it would be nice if the planar texture assignment, (I'm just using Planar mapping in Meshwork) translated to the second object...but now that I think about this, I guess this won't work since the texture must be planar mapped to the entire object. The only reason the first object even displays correctly is that I didn't actually reassign the plane of the object to encompass both objects. If I had, then both objects would display wrong. 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. 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. ________________________________________________________________________ Keith Wiley kw...@cs... http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley "Yet mark his perfect self-contentment, and hence learn his lesson, that to be self-contented is to be vile and ignorant, and that to aspire is better than to be blindly and impotently happy." -- Edwin A. Abbott, Flatland ________________________________________________________________________ |