1
\$\begingroup\$

(preamble: I think this fits either here or SO with computer vision tag, I chose gamedev because I think you guys are probably really good with textures and meshes, but tell me if my decision was wrong.)

I want to accomplish the following: Given an image with an object, a 3D mesh very similar to that object, and rendering parameters that render that mesh to the exact location of this object. I want to "extract" the original texture from the image onto the mesh. (So in a later step, I could re-render the mesh from another viewpoint (of course some of the texture would be invisible/black)). My mesh has uv-coordinates for each triangle so I guess I could either "store the texture on the mesh" somehow, or directly backmap it to a 2D texture map.

So I guess what I want to do is kind of texture backmapping/remapping, kind of the inverse of what is done in game-dev when texturing objects. I was having a lot of trouble finding any useful information on Google about what I want to do, so I thought I'd ask here. Maybe I haven't found the right word for it yet. I think there's probably quite a lot of "stuff" involved because pixel in the original image won't exactly correspond to a location on the mesh.

\$\endgroup\$
  • \$\begingroup\$ The technique is called projective texturing. Essentially, you draw the object "behind" the texture as though it was a projector-style transparency. \$\endgroup\$ – Jon Apr 27 '15 at 10:12
  • \$\begingroup\$ If you want to permanently bake a number of textures from different viewing angles onto the same model, it may be easier to do so within a modeling program. Most of them should allow you to perform an orthogonal unwrap of the model. You will have the opportunity to define seams where the edges of different textures will need to meet cleanly. \$\endgroup\$ – Jon Apr 27 '15 at 10:16
  • \$\begingroup\$ Blender is free, does all of the above, and, aside from being Eclipse-based, is also great (good enough). \$\endgroup\$ – Jon Apr 27 '15 at 10:23
  • \$\begingroup\$ Thanks for the hints. I will need it for a lot of images with command-line input and integrate it into existing software, so a program like Blender is not an option. \$\endgroup\$ – Ela782 Apr 27 '15 at 10:28
  • \$\begingroup\$ I don't think I need orthogonal unwrap - my mesh already has uv coordinates. \$\endgroup\$ – Ela782 Apr 27 '15 at 10:31

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.