POV-Ray : Newsgroups : povray.advanced-users : UV-mapping overlapped ? : Re: UV-mapping overlapped ? Server Time
29 Jul 2024 08:18:22 EDT (-0400)
  Re: UV-mapping overlapped ?  
From: Mike Williams
Date: 2 Sep 2002 15:16:40
Message: <T5OfTCANf7c9Ew9s@econym.demon.co.uk>
Wasn't it Rune who wrote:
>Never having used modelers or imported UV-mapped meshes, I don't know
>much about how UV-mapping works for objects of complex topology.
>
>It seems to me that a shape of an animal or the human form could never
>have a 2d UV-map in a single piece. So how are shapes such as those
>textured? Do some triangles use one map, and the other triangles a
>different map? If, so, isn't it very difficult to make the maps match up
>smoothly if the textures are detailed?

What happens is that not all of the 2d UV-map is used. The front of the
body is mapped to part of the texture space that's shaped like the front
of a body, and the back of the body is mapped to a separate area. It's
quite common for the body to be split into several pieces, with parts
like eyes, teeth, tongue and hair mapping to disjoint regions of the
map.

A common technique for creating such texture maps is UVMapper. UVMapper
inputs a model in Wavefront OBJ format, and gives you tools that allow
you to create mappings between the parts of the model and regions of the
2d map. It outputs a copy of the model now containing the UV
information, and a "template" file which looks like a flattened
wireframe diagram. A paint program that supports layers is then used to
paint a texture over the template - the template is held in one layer,
while the texture is painted on another (partially transparent) layer.
When the painting is complete the layer is made opaque.

It can often be difficult to make seamless joins.

>I know that POV-Ray can interpolate between two or three textures for a
>triangle, but the UV coordinates are still shared, so that doesn't solve
>the problem. And single triangles are often so small anyway, that the
>blend wouldn't hide a possible misalignment between textures.

Most UV-mapping experts work with renderers other than POV, where that
trick wouldn't work. I guess it would be a nightmare to implement
anyway.

The usual method is to attempt to blend the textures near the seams to
something rather plain. For example you might fill the whole of the area
with a plain default skin colour before starting to paint the features.

>I don't even know how you'd UV-map a simple sphere. Sure, in this case
>the UV-map could be in a single rectangular piece, but that would mean
>that near the poles all details would have to be stretches very much, in
>a way that's very difficult to draw by hand, which ultimately would lead
>to unsmooth results. Alternatively the UV-map for the sphere could be
>made from two circular regions, but they would still be difficult to
>match up smoothly by hand.

UVMapper can slice a sphere in various ways. If you tell it to create a
"spherical" map, then you get something like a Mercator projection, and
the areas near the poles are very stretched. However, if you tell
UVMapper to create a "box" map then you get six separate pieces which
have considerably less distortion. Perhaps the best UVMapper map for a
sphere is the "cylindrical cap", which is rather like the "box" map
except that the four pieces that go round the girth of the sphere are
connected into one long strip.

>So all those people using 3d studio and similar programs where
>UV-mapping is the standard, how do they draw their UV textures so that
>they fit the object and still line up smoothly?
>
>Any insight in UV-mapping techniques would be appreciated!

The best way to get a feel for it is to download the free UVMapper
Classic from <http://www.uvmapper.com/> and get yourself a few Wavefront
OBJ files and start experimenting.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.