I need to find an approach to the problem of generating texture maps for non-convex polyhedrons without using a design tool like Maya. Specifically, I am mapping simulation results data onto a 3D surface, and I need to write code which generates the maps.

One generic approach uses a gradient color brush as an overall texture to just map colors, but if the facets in the polyhedron are very narrow or the mapped (u,v) coordinates are very far apart on the same facet, the image gets noisy. Another approach employs Phong or Gouraud Shading, but those features are missing in some 3D libraries which favor texturing over specifying colors at each vertex. So, I'm looking for a way to get a good texture map generated.

If it helps in identifying a correct algorithm, all of the surfaces entirely enclose a 3-D space, there is no facet normal data, and I'll be able to identify a "parting line" which segregates one part of the surface from the other, as one might in order to create a mold for the shape.

The simulation results are uniform (non-sparse) 3D arrays containing single precision values. There is a neighboring array of short integers which approximates the 3D mesh; a "1" value in that array corresponds to a part of the enclosed region of the polyhedron. I'm mapping to non-convex 3D surfaces more complex than can be mapped with a simple unrolling texture mapper or a spherical ray casting approach. Think of an American gallon milk jug or similar shapes that can be produced in plastic or metal molds.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.