Wednesday, April 15, 2009

Re-Modeling, Post-Texture Mapping

In laying out the UVs for the buildings' facades, I was careful to translate them around so that I could map an unwarped brick texture map to the geometry. My geometry looked like this (polygons on the left, subdivision approximation on the right):
I used this rainbow texture to test the UV layout:In Maya, my geometry looked like this:
My UVs looked like this:
Everything looked good, until I rendered and got these results:
There is massive warping up at the top, most obviously between the .4 and .5 of the rainbow grid. Because I had used a combination of cylindrical and planar mappings, on the round side and flat side respectively, I figured that the cylindrical mapping was the problematic part. I tried to use a planar mapping on the entire object. However, I got the exact same results.

I considered using a projected texture (rather than relying on the object's UVs), but I did not want to end up having to adjust the projection to be the exact same for the color, bump and specular maps of each texture, as well as doing this another four times for the other buildings. My only other option was to re-model the facade, which I did relatively quickly because I would simply snap UVs to create the same shape as the original facade object. The problem with my original model was that in some areas, namely the corners, too many edges would converge, causing a pinching to occur when the geometry was subdivided. In the revised model, I created it to be more like a grid, with all edges perfectly parallel or perpendicular to one another when they intersected:
Note that even when the geoemetry is subdivided, it retains the grid of the polygon object. I laid out the UVs with a combination of cylindrical and planar projections, as I'd originally done with the old model:
I kept everything within a half of the UV quadrant, so that I could easily create a texture map in the ratio of 1:2 (width:height.) In Maya, the object looked like this:
Ironically, the texture warped all along the center vertical between the flat side and round side. However, when I did a test render, I finally got the results I'd been looking for:
The rainbow grid came out perfectly straight and unwarped, so I could actually move on with texture mapping the facade.

No comments:

Post a Comment