3
\$\begingroup\$

I dont have much experience with openGL ES (or openGL), but i do get the general idea of texture mapping, which is each vertex should be mapped for the relevant UV coordinates of the texture we choose to map. but what happens when i have complex objects?

Lets say i have the known Stanford bunny:

enter image description here

and i want to map this texture:

enter image description here

It is not very simple to calculate all vertices locations on the image at all. Are there any known methods or best practices for doing that?

Where should i begin regarding this kind of mappings?

Thanks!

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

This is usually done by an artist using an application like maya or 3Ds max where the artist can manually maps the UV point on the image.

If you want to automate this operation you can generate UVs using one of the known methods, these automatic UV generation are usually used as a starting point for artists. For example you can use planar or spherical texture coordinates generation, the first method is to project the vertices on a plane and generate UVs based on the projected vertices. The other method is project them on a sphere. There are other methods like projecting it on a cube or using ray casting. The choice of approach depends on the shape of the object, for example a human body might start with a cube based UV generation so each side of the human is projected on a side of the cube (might also apply for stanford bunny). There is no golden bullet, and those algorithms are usually just a starting point for the artist unless you have a systematic or procedural shape.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .