POV-Ray : Newsgroups : povray.advanced-users : UV-mapping overlapped ? Server Time
29 Jul 2024 16:19:42 EDT (-0400)
  UV-mapping overlapped ? (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Rune
Subject: UV-mapping overlapped ?
Date: 2 Sep 2002 11:32:29
Message: <3d73848d@news.povray.org>
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?

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.

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.

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!

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Gilles Tran
Subject: Re: UV-mapping overlapped ?
Date: 2 Sep 2002 14:50:08
Message: <3d73b2e0$2@news.povray.org>

3d73848d@news.povray.org...
> Do some triangles use one map, and the other triangles a
> different map?

The texture information is carried by the vertices, not by the triangles (or
polygons). Typically, a vertex is linked to a texture and a <u,v> vector for
this texture (there may be cases where a vertex has several texture info
attached, I'm not sure). The material at any point of the polygon is taken
from the corresponding area on the map delimited by the 3 or 4 (usually)
vertices.

It's not so much a question of map than a question of coordinates, actually.
Once a model has uv info, it uses the color found for the required texture
at the given location in the uv plane, and the "map" can be a procedural
POV-Ray texture (between <0,0,0> and <1,1,0>).


> If, so, isn't it very difficult to make the maps match up
> smoothly if the textures are detailed?

In the case of Poser, there are some "seams" maps to help people design the
map to avoid these kind of problems. Basically, it's like wrapping some
elastic cloth over an object. And it's not easy...

The best for you would be to download whatever OBJ file you can find on the
net and run it through uvmapper and see how it works. It's hard to explain,
but I guess that seeing it work is educational enough. You can also have a
look at any of the maps used for Poser models that can be found at
renderosity.

Btw, the tool that hobbyists like us sorely miss is a 3D, interactive uv
painting program a little more sophisticated than uvmapper. There was
something called 3dpainter once, but it's dead and the ones that exist (deep
paint and bodypaint) are quite expensive.

G.

--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Mike Williams
Subject: Re: UV-mapping overlapped ?
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

From: Rune
Subject: Re: UV-mapping overlapped ?
Date: 2 Sep 2002 17:13:54
Message: <3d73d492@news.povray.org>
Mike Williams wrote:
> 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.

And also the back and the front of the body I assume? And here, it is
not just the map that is split up, but the actual mesh object is split
into several meshes right? Because that would be the only way to make
those "jumps" in the UV-coordinates as far as I understand.

> The usual method is to attempt to blend the textures
> near the seams to something rather plain.

Ah, indeed I couldn't imagine what the alternative to that would be. It
sounds like a rather big limitation though, in cases where you want a
detailed and non-plain texture covering the whole object.

What I had been wondering was if there were smarter techniques invented.
For example I could imagine a feature to layer textures on top of each
other, each texture with a independent set of UV coordinates. That way,
the seams for the different texture layers could be at different places,
and the seams at the lower layer(s) could be covered by the upper
layer(s). But I guess an approach like that would be too much trouble in
most cases, and require too much data (the separate sets of UV
coordinates).

When I get time I'll try experimenting with UV-mapper to get a feel for
the things myself. For now, thanks for the explanations to all who
replied.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Gilles Tran
Subject: Re: UV-mapping overlapped ?
Date: 2 Sep 2002 18:29:06
Message: <3d73e632@news.povray.org>

3d73d492@news.povray.org...
> And also the back and the front of the body I assume? And here, it is
> not just the map that is split up, but the actual mesh object is split
> into several meshes right? Because that would be the only way to make
> those "jumps" in the UV-coordinates as far as I understand.

Not always. For example, the vertices for the "eye" part may refer to
another map that the vertices for the "lips" part, while sharing the same uv
plane.

> Ah, indeed I couldn't imagine what the alternative to that would be. It
> sounds like a rather big limitation though, in cases where you want a
> detailed and non-plain texture covering the whole object.

From a practical point of view it's not such a limitation. It is for
textures that have some regular pattern if you want the pattern to be 100%
continous over the shape (such a checkerboard pattern). Fortunately, for all
practical purposes, those sort of patterns are rarely used. Natural patterns
like skin have a lot of randomness that make seams quite invisible. Man-made
objects are even less of a problem. Personally, I find the stretching /
pinching artefacts more problematic and actually quite visible, even on
production-quality 3D.


G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Mike Williams
Subject: Re: UV-mapping overlapped ?
Date: 3 Sep 2002 00:07:28
Message: <DREb5AAgPDd9Ew1f@econym.demon.co.uk>
Wasn't it Rune who wrote:
>Mike Williams wrote:
>> 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.
>
>And also the back and the front of the body I assume? And here, it is
>not just the map that is split up, but the actual mesh object is split
>into several meshes right? Because that would be the only way to make
>those "jumps" in the UV-coordinates as far as I understand.

It's only the maps that are split. The entire model (front, back, eyes,
hair, teeth and tongue) is a single mesh2 object (or single Wavefront
OBJ file in UVmapper). 

In POV, the uv_indices feature is used to manage the "jumps" - the
situation where one vertex maps to more than one position on the UV map.

Wavefront OBJ files don't have the equivalent of uv_indices. I think
they just declare some vertices more than once, because each vertex
declaration can only correspond to one texture locator.

>> The usual method is to attempt to blend the textures
>> near the seams to something rather plain.
>
>Ah, indeed I couldn't imagine what the alternative to that would be. It
>sounds like a rather big limitation though, in cases where you want a
>detailed and non-plain texture covering the whole object.

The alternative, in such cases, is lots of hard work. This leads to
situations like that of the wonderful new DAZ dragon, where the model is
free, but a texture map for the model costs $12.97.

One trick that's being developed by some members of the Poser community
at the moment is to arrange for the seams to be located in places where
they tend to be out of sight much of the time. The existing Poser models
have two particular seams that tend to be rather noticeable, one around
the neck and one down the outside of the arms. The "Free Market Family"
models are being designed so that the arms are mapped cylindrically and
only have a seam down the inside.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Peter Popov
Subject: Re: UV-mapping overlapped ?
Date: 3 Sep 2002 02:40:12
Message: <h5m8nuc6d2cm44mhg0u4uaj1ed08snedip@4ax.com>
On Mon, 2 Sep 2002 17:32:49 +0200, "Rune"
<run### [at] mobilixnetdk> 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.

Who said that all of the UV map has to be used? :)

Remember the free fish model site Gilles posted a while back? Download
one of the models and look at the .bmp - a picture is worth a thousand
words.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Rune
Subject: Re: UV-mapping overlapped ?
Date: 3 Sep 2002 13:43:28
Message: <3d74f4c0@news.povray.org>
Mike Williams wrote:
> It's only the maps that are split. The entire model
> (front, back, eyes, hair, teeth and tongue) is a
> single mesh2 object (or single Wavefront OBJ file
> in UVmapper).
>
> In POV, the uv_indices feature is used to manage
> the "jumps" - the situation where one vertex maps
> to more than one position on the UV map.

Ah, of course. Always having used one UV vertex per point vertex in my
own work, I overlooked this this possibillity...

> Wavefront OBJ files don't have the equivalent of
> uv_indices. I think they just declare some
> vertices more than once, because each vertex
> declaration can only correspond to one texture
> locator.

Makes sense.

> The alternative, in such cases, is lots of hard work.
> This leads to situations like that of the wonderful
> new DAZ dragon, where the model is free, but a
> texture map for the model costs $12.97.

Oh, ok. But surely, they must have some clever ways to come around the
problems? I could still imagine a tool that would let you work with
several overlapping texture layers with different UV coordinates, but
which would put it into a single (seamless) layer in the final step of
production. Still hard work of course.

> One trick that's being developed by some members of
> the Poser community at the moment is to arrange for
> the seams to be located in places where they tend
> to be out of sight much of the time.

:)  I guess UV mapping is indeed an advanced skill to master...

Now to figure out how to implement advanced UV mapping in POV-Ray for
shapes with complicated topology made of several different types of
bicubic patches. I do have a few ideas actually, but they will be
difficult to carry out...

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Rune
Subject: Re: UV-mapping overlapped ?
Date: 3 Sep 2002 13:43:29
Message: <3d74f4c1@news.povray.org>
Gilles Tran wrote:
> Not always. For example, the vertices for the "eye"
> part may refer to another map that the vertices for
> the "lips" part, while sharing the same uv plane.

Yes, I understand that now... :)

> Fortunately, for all practical purposes, those
> sort of patterns are rarely used. Natural patterns
> like skin have a lot of randomness that make seams
> quite invisible.

I was more thinking of clear lines, such as lines in clothes, and lines
separating clothes texture and skin texture. Making those match up
completely continuously would seem difficult to me.

> Man-made objects are even less of a problem.
> Personally, I find the stretching / pinching
> artefacts more problematic and actually quite
> visible, even on production-quality 3D.

I can imagine. One thing I can't understand is the limitation in POV-Ray
that UV vectors have to be UV (2d) vectors instead of 3d vectors. The
textures are 3d anyway, even image_maps, and one could easily take
advantage of 3d procedural textures if 3d coordinates were allowed in UV
maps. (I know that UV means 2d, but what things are *called* isn't
really the issue here. I see no practical reason for the limitation.)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Rune
Subject: Re: UV-mapping overlapped ?
Date: 3 Sep 2002 13:43:30
Message: <3d74f4c2@news.povray.org>
Peter Popov wrote:
> Who said that all of the UV map has to be used? :)

I don't know. Who said that?

I think UV-mapping sounds like it involves many problems as it is.
Having to use the entire rectangular area of the map would simply be
insane.

> Remember the free fish model site Gilles posted
> a while back? Download one of the models and
> look at the .bmp - a picture is worth a thousand
> words.

Thanks, I think I'll do that when I get time. :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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