|
|
This is corrected the same as above: the real height is -48, so half is -24 and sign flipped becomes 24. This value is plugged into the X and Y offset fields and the "Spread facets at poles" is on (which creates a mapping kinda like putting a 2D earth map on a globe). There are always going to be some distortion, but this mapping tends to concentrate the distortion at the poles which makes it far more useful for texturing purposes. One final thought - while I've used partial primitives, there are a lot of complex objects that can yield good results with the steps outlined above. For instance, the stock Poser 4 head maps quite nicely with an Z offset of -.0137 spherical Y mapping.
I recently ran into problems UV mapping an arched ceiling and wall. Eventually I came up with a "brute force" approach, which I sent to Steve Cox (UVM's author). And of course, he had a much better solution! I thought I'd write it up, since it's one of those that I had never really considered before: Where does UVM place the objects center (which is critical to many of the mapping modes) and how do you move it to where it should be?

Here's the ceiling arch, a half cylinder along the Z axis. I applied the default Cylinder Z mapping and rendered it with a square grid pattern - the grid is clearly distorted. The reason for this is that UVM sets the center point based on the x,y,z dimensions of the object, the "bounding" box (the green box above). Which in this case puts the Z axis of the cylindrical mapping "high" in the object, when what's need is for the Z center point to be at the center of what would be a complete cylinder. This is fairly easy to figure in UVM.

In all of UVM's mapping dialogs (except box) there are the Offset field(s), which simply adds the value to the axis center point. In this case the X and Z are already centered, so only the Y (height) needs to be moved. So to calculate the offset, as Steve put it, "put the opposite of the value of half the height into the offset field for the corresponding axis". If you open the Dimensions window, you'll see the values for the bounding box of the object. Since these values are relative, the real height of the object is maxY-minY or 132-96=36. Half of this value and negated is - (36/2)= -18. So to get the mapping right, you simply put -18 in the Y Offset box. Sometimes it may be nessacry to rotate the object 180 in the Rotation field to get the correct mapping.

The images above show the new center point and it's mapping, which now shows no distortion. Now lets try a more complex example - a quarter sphere, say for a sail object and this time I'll use UVMapper Pro.

Here the Y axis is centered but the X and Z are not. The gray circle shows where UVM is projecting the coordinates - it can be clearly seen that the "poles" are offset from the real poles and there is significant distortion.

