ZBrushCentral

Texture mapping woes: can I be this dense?

I decided to try figuring out the UV/texture stuff by experimenting with a sphere in zbrush and importing it into Bryce but and I can’t even get a texture to map onto a sphere in zbrush if I use GUV or AUV.

I draw a sphere primitive. I convert to polymesh and redraw. I leave at 8K polys and select a 1024 checkerboard texture. No problems. No seams - nothing weird.

I press GUV and it all goes to heck. I try AUV on a new sphere and it screws up too. I thought that these were supposed to make things map well but maybe I’m missing something.

So, the mapping worked w/o using GUV or AUV but even if I press the uvs (map spherical) it gives a seam!

Here are pics. I posted a long question days ago and the post never showed up.

Thanks,
Tim

textureprob.jpg

UV mapping tells a 3D program what part of a texture corresponds with each part of the model. Any time you wrap a texture onto a model, it needs to be painted for that particular UV mapping or you won’t get the desired results.

A regular texture like what you find in the Texture palette will generally apply well with spherical, cylindrical or planar mapping (depending on the shape of the model). It will not apply well with UVW, GUVTiles or AUVTiles mapping, though.

This is why you can’t take a texture from one model and place it on another model (unless the two models have been carefully mapped to have identical UV mapping).

I recommend that you begin with this tutorial in order to start learning the basics of UV mapping. After that, you will have a better understanding of what’s going on with all forms of mapping.

Prof,

Most ZBrush users travel the same path you’re now on trying to understand the AUV and GUV Tiled system of mapping.

To make UV mapping experimentation a little easier I wrote a little plugin called MapIt. You can find the most recent version, MapIt 1.4, >>> HERE <<< . MapIt lets you PLAY with various mapping options and orientations, as well as create repeating textures and alphas which can be very useful.

The central thing to understand about UVTile mapping applied in ZBrush is that you CANNOT take a pre-existing map (checkerboard for example) and apply it to your model via any of the AUVTile or the GUVTile formats.

As Ken points out in his introductory UV .PDF file, the UVTile layout for a texture is a point of departure not a point of arrival. For each quad polygon on the model it lays down a square (or tile) on the texture map. The order of the tiles is constructed on-the-fly, by the mapping routine.

Originally UVTiles were uniform squares placed in a grid. Each tile independent of its neighbors.

With AUVTiles, the size of each tile varies depending on the dimensions of the polygon it is matched to, a smart way to minimize stretching of pixels. For efficiency, tiles of SIMILAR SIZE are grouped together (this makes the relative layout seem even more discontiguous.)

With GUVTiles, the mapping routine tries to GROUP CONTIGUOUS TILES as much as possible, based in part on subgroups but the UVTile group distribution is still very discontiguous.

Finally, it should be obvious that UVTiling is specifically designed to let the user:

Create an orderly layout of 2D tiles on a BLANK TEXTURE that match up with the quad polygons of the 3d model, and only then…

Build the final texture by PAINTING DIRECTLY onto the 3d model.

Note that you can use Projection Master to lay down other texture maps onto PARTS of the 3d model. When the model is “picked up” again, those modified pixels in each quad polygon are separated and placed, via the mapping routine, onto the UVTile layout.

THE SEAM
A separate issue that I’ve found frustrating is the emergence of the seam when applying UVC, UVS mapping. In MapIt, the seam becomes very obvious when sliding the texture along U or V.

What causes the seam? As far as I can tell, it’s caused by the way ZBrush interprets the UV values. Normally, U and V rectangles are defined by decimal values that fall between 0 and 1. (U=0 and V=0 at the upper left corner of the map.) All rectangles along the left side of the map, will have a U value of 0. Likewise, across the top of the map rectangles will have a V value of zero.

Now, to CLOSE the edge along the right and the bottom of the texture map, U and V values will ALSO have to be 0. As far as I can figure out, this is what causes the problem. Rather than just taking the last row or column of rectangles along the right or bottom edge, the mapping routine applies the texture from an entire row or column (backwards of course) to the appropriate quad polygon on the model. Look closely at the contents of the errant seams and you will see the entire map is crammed into that strip.

In the attachment I try to show how this works on a low-res sphere.

I’m not sure if there is an answer to this anomaly. I’ve been unable to force any work around, so when I can, I just hide the seam or work at a resolution where the seam problem is not too noticable.

Sven

ps. And then there’s >>> THIS <<<

Attachments

mapping question.jpg

I will keep reading and hope this stuff eventually sinks in. Funny, I have a BS in computer science but when you jump into it in the middle you get swamped and never really nail one thing solid b4 going to another. I read through almost the whole practical guide in two days but I won’t remember half of it!

Okay, let me ask about the workflow for a 100% zbrush scene now.

Is this right?

A. Create your base lo-res model, saving every 5 minutes :smiley: (import or use native primitives or zspheres, etc).

B. Fine details via tools and PM tools, saving every 5 minutes :smiley: .

C. Add color and materials via PM, uh, saving a lot heheheh.

D. Then click GUV? or should I click GUV before doing the texture of say 2048 or 4096 or should I click GUV at all???

I keep asking the same questions. What does an overlapping “UV” look like and how can I fix it? I had some on this model but when I clicked GUV it seemed to go away. I am so lost on this UV stuff and yet I know the basic idea of having to wrap a 2D onto a 3D.

Anyway, thanks for helping. I have decent art sense if I can ever get past the quirks of 3D and zbrush in particular. I really like this program.

I will read these links!!!

Tim

UVW coordinates as opposed to XYZ coordinates, they are both abstract spatial notations.

Each vertex of a geometric object can be defined by an XYZ coordinate, and as such it corresponds to a single UVW vertex. XYZ coordinates map to UVW coordinates, it might’ve been 1 to 1.

Except we don’t have arbitrarily sized realtime three dimensional textures, so UV coordinates are spoken of instead. The XYZ vertices must be arranged on a two dimensional plane, overlapping would be easy if you just projected the 3D object onto the 2D surface.

The AUV tiling assigns each polygon of 4 vertices a square on the texture, each polygon receives a distinct square area of texture. Having overlapping UVs implies that the same area of texture (uv space) serves more than one area of the geometry (xyz space), this isn’t a problem except for the logical operations in ZBrush assume that this condition does not / should not occur.

You can imagine what a UV overlap looks like. Imagine that you just flattened a wireframe in one dimension (turning 3 into 2) and placed it on top of any picture. Much overlapping there.

All that saving isn’t really necessary, although you may want to anyway.
Create the texture before entering Projection Master.

Hi,

As soon as you start to paint color and/or material with Projection Master you should continue using the UV coordinates already assigned. Of course only if they are satisfactory. You should not change your UVs after you have started painting your texture.

Think of it this way. Your 2D texture is bound to 2D UV coordinates. The UV coordinates in turn refer to the 3D coordinates that make up your model. You cannot simply change the UV coordinates and expect the texture to follow along.

So you have to make a decision at some point on which type of UVs you want to employ. But don’t rush it. Getting the model right is hard enough IMO:) Get the model right, Create a texture at the desired size, apply your choice of UVs at the lowest subdivisioin level and then paint your texture.

Painting a texture is usually the last thing you do. Modifying a models shape after that only results in texture distorion.

btw, saving every 5 minutes is a very foreign concept for me. Zbrush has been rock solid for months and months. Although it probably is a good idea to save once in a while. Especially if you use Svengali’s incremental saver. If you mess up some part chances are there is a version you can continue from.

Edit: To slow, still have a bit of new years eve going on in the medulla oblongata.

Thanks, tv and anti.

I remember reading the UV tut from ken brilliant before and I just reread it. These last two replies make sense. Overlapping means that you are trying to get one texture square to work for two different 3D sections which doesn’t work in most (any?) 3D packages.

I added a weird eye stalk to my monster and put the texture on it and boy, it didn’t line up anymore. Too bad it isn’t smart enough to do a morph calc and know to add more squares for the new geometry. But I am just talking out loud without enough knowledge of the basics! hehehehehe

I am getting these concepts. I did a complete scene last night (till 5am whew) and had to do a lot of PhotoShop work to get it looking like I wanted. All this baking layers and stuff. Anyway, it looked okay but the creature seemed too toy-like. I don’t know. Maybe my lighting or rendering should have been set differently.

Oh, as for crashing… it crashes every day. Many different ways. Crashed like 20 times during a depth brush usage and I found out a workaround that seemed to work. Short strokes - no pixol-less areas on the layer. I search for answers and find some but as a programmer myself, a program should NEVER crash. Never. It should always shut down gracefully. But I don’t really program anymore. Too hard. hehehehehhe My hat is off to those geniuses who write these things.

Tim