Site hosted by Angelfire.com: Build your free website today!
 


10. Texture Mapping
 
Previous   Table of Contents   Home   Next



MODELER, PLANAR TEXTURE MAPPING

This tutorial covers texture mapping. You can now create good quality models, but adding texture maps can really pull out detail such as lips, moles, cracks, or texture. In this case, it is texture mapping which helps makes this girl's eyeball look so realistic.

Here is a closeup of the girl's makeup from tutorial #2 including eyeshadow, rouge, and lipstick. It even exhibits areas which are oily, and the pores in her skin.



Before Nurbs came along, surface texturing was about the only trick that you had for creating the illusion that your object has a detailed surface. Even with the simplest objects, such as a sphere, it can be transformed into a planet with the proper bump maps and surface textures.


MODELER, TEXTURE MAPPING USED TO HIDE IMPERFECTIONS

Another purpose for texture mapping is the hiding of imperfections. You can think of texture mapping as being the same as when any woman applies makeup to their faces.

A girl may not be a beautiful woman, but she can certainly fake it with makeup. The same holds true for 3D objects.

That is no excuse for creating less than perfect objects, however.

It is better to think of texture mapping as a way of conserving your precious polygon count so that you can put it to better use on things such as human noses and ears, then texture mapping can go a long way to adding detail to your objects.


MODELER, FAKING DETAIL WITH TEXTURE MAPPING

If an object is going to be shot close-up, then you will need polygons. But, if the object is always going to be 20 feet away, then texture mapping might be all you'll need.

Usually you will use a little of both, though. Indenting a bit with polygons, then adding the illusion of depth with textures. For example, the navel is a particularly hard object to create with polygons...

But, with texture mapping the navel could be far easily faked. You could even experiment with different kinds of navels to see which one looks best.

Also, you can create maps which control the degree of shinyness on the nose and forehead, maps which control the degree of bumpiness of the skin, or you can even add eyebrows, or cracks in the lips.




If the surface map will be a relatively flat and small area, which doesn't wrap around the object, then you can get by with just what is called a 'Planar' texture map.

A planar map is a one-dimensional projection upon the surface as when you shine a slide with a slide projector upon an object.

If the object is flat, then the projected image is flat with no distortions, but if the surface you are projecting upon has sharp turns, the image would stretch and distort.

The problem with planar projections is when the surface really curves sharply into the 'other dimension' for in that case small details might stretch a very long distance, magnifying any slight difference in tone.

Now, if you went through the last tutorial, you will now probably figure that I will be placing the textures I created in the last tutorial on the West Mexican Figurine...


MODELER, CREATING FRONT & BACK SURFACE MAPS FOR FIGURINE

I again load in the Figurine.psd image with all its layers. The image maps will be done in a manner very similar to the way that the tracing images were done.

I pick white as the background color. I highlight just the 'Front' layer that contains the image of the front of the figurine, do a CTRL-a to select the entire image, CTRL-c to copy to clipboard, CTRL-n to create new image, CTRL-v to paste it in.

I do a 'Layer-Flatten Image' on the new image. I do an 'Image->Image Size...', turning off 'Resample Image' but keeping 'Constrain Proportions' checkmarked and change the 'Resolution' to 72.

I Turn on 'Resample Image' to resize the image, type in 16 inches for the height (which will create an image 1152 pixels tall by 628 pixels wide) and click OK.

I save it as 'Front Map.bmp'.




I do the same with the 'Back' layer and call it 'Back Map.bmp'.




The way that it is, they probably won't cover the entire surface of the object as I did so many modifications to the object. Also, the back of the legs is very much darker than the front of the legs, but we will worry about fixing those things after we attempt to render it.


LAYOUT, SETTING UP THE LIGHTING

I finally am ready to run the Layout program. We have only worked in Modeler, exclusively, so far.

The first thing you should do is you should make sure that 'Auto Key' is not depressed. If it is, make it happier.

First thing I do is I import the object into Layout with a 'File->Load->Load Object...'. It will appear facing towards the camera (because we have created the object backwards relative to LightWave's idea of things). I have given it no surface texture yet, and there is just the one default light.

I press F9 to render the scene and am surprised to find that it's all dark.I can only see the ends of the hands and a little patch of light in the center of the belly.

After about a half-hour of annoyance trying to figure out what the problem is, I remember the rectangle that's in layer number 2 that we used to position the trace image. It is blocking the light. I delete it from layer number 2 and the lighting is fine after that.

However, I will be adding two more lights, and LightWave has a default of 1 OpenGL light (That means that you can see the effects of the light. If you keep it at 1, you will render and the render will be way brighter than the display. You should have as many OpenGL lights as you have lights.

Now, why didn't they just have it automatically increase the number of OpenGL lights as you add lights, then have you DROP the number if you want to have less. Grrrrrr...)

So, if you add any lights, remember that you always have to go to 'Layout->Options->Display Options' or press 'd' and set the Max number of OpenGL lights to the total number of lights you have.

I will add an area light to the front right (yeah I know, the old front-back problem again. I will be saying 'Front' when I really mean 'Back' again). To add a light you go to the 'Items' tab, 'Add->Lights->Area Light'. The light will appear at the 0,0,0 in the world. Select 'Top' as the view just as you would in Modeler. Press ',' to zoom smaller, '.' to zoom bigger, and point with the mouse and press 'g' to put that position in the center of the view (all of those also being the same as modeler).

From the 'Items' tab, 'Tools' section, I pick 'Move' or press 't' and use the red and blue arrows to move it to the right/left or up/down.

From the 'Items' tab, 'Tools' section, I pick 'Rotate' or press 'y' and use the red, green and blue circles to rotate it in any direction (all I need to do is rotate it around the Z axis using the red one this time). After I have it where I want it, I click on 'Create Key' to record and freeze the position for that light in frame 0.

IMPORTANT - Always remember, after making ANY movement of a light, camera, object part that you do a 'Create Key' to freeze that position in that frame (we aren't creating an animation at the moment, so the key would be for Frame 0).

Another annoying thing about Layout is that it has only one undo, again gotten by pressing 'u', but it hardly works anywhere.

And, I create a third 'Spot' light. Here is an image. The default 'Distant Light' is in the lower left, the 'Area Light' is in the lower right, and the newly created 'Spot' light is in the center where the object is with the blue line pointing up, the red line pointing to the right.

It is ready to be moved to the back of the object (more to the front of the world) as a backlight. The white radiating lines are the area of influence of the spotlight. The green thing is the camera.




Under 'Rendering->Render Options', I make sure that 'Render Display: Image Viewer' is turned on so I'll be able to see it, large, after it renders. Since there is nothing to the scene but a surface map, all ray trace options can be unchecked except 'Ray Trace Shadows' and 'Extra Ray Trace Optimization'

I go to the camera tab, and under the 'Image Area' section I pick 'Frame Size' and for 'Width' I put 1024, 'Height' I put 768. This will make the final render window bigger so I can see detail better. I press F9 to render.




Not too bad for a first planar texture map render. Since Planar is just like you're projecting the texture from a movie projector, it can warp. The head's too big, I'll change that in Modeler, but the leg texture I will spread out and make the deliniation at the edge of the leg indiscernable and spread it out throughout the white.

I will also remove the arm bands, possibly, but first I will just try stretching them.

And, I don't have a clue what is causing that strange triangle by his neck. I'll have to make sure that all polygons are included in the 'FrontPolgyons' surface name definition.

First, though, I'll drop the width of the head to see if I can make it fit.

But first, I should save everything. In 'Layout' I go to 'File->Save Scene->Save Scene As...' and save the scene as Figure.lws

Then I go to 'File->Save All Objects' to make sure that any surface changes we did will be saved to the object. I will not want to modify the Figure 3.lwo file. Flip to 'Modeler' and do a 'File->Save Object As...' and give it the name 'Figure 4.lwo'.

Flip again to 'Layout' and we have to tell it to use the new 'Figure 4.lwo' object instead of the current 'Figure 3.lwo' file.

Press SHIFT-O to pick the Objects category in Layout and make sure the dropdown menu says 'Figure 4'. If it does, then you are already there. If it says 'Figure 3', then do a 'Replace->Replace with Object File' and select 'Figure 4.lwo'.

I switch to Modeler by picking 'Modeler' out of the upper-right drop-down menu of 'Layout'.

I press CTRL-h to enter the 'Select Polygons' mode, make sure all polygons are deselected, make sure that 'Wireframe' is the 'Back' viewport view type, and in the 'Back' viewport using my right mouse button I encircle the head polygons. A cyan circle will be drawn.

After I let up, the head polygons are selected. I will have to go to the Perspective viewport and rotate it with the ALT key and mouse to be more careful as I get all the chin polygons and even out the neck polygons.




From the 'Modify' tab, 'Stretch' section I pick 'Stretch' or press 'h' on the keyboard and shrink the width of the head in the 'Back' viewport. I leave the polygons selected in case I want to stretch it even more later. I do a 'File->Save Object->Save Object As...' and save it as 'Figure 4.lwo'. From the upper-right drop-down menu of 'Modeler' I select 'Syncronize Layout'




And, now I flip to Layout and do an F9 to render it.




That improved it a little. The chin has to be raised and the sides of the cheeks brought inward.

I press the space bar to exit from the Stretch mode and deselect the top part of the head, leaving the bottom part highlit. I deselect a few polygons from his neck and all of the polygons on the back of the figurine's head.

I press the 't' key to enter the 'Move' mode and move it upwards. Then I press the 'h' key to enter the 'Stretch' mode and make it thinner again.




I save the object, Synchronize Layout, and flip to Layout, pressing F9 for a render. Better, but still not enough. I unhighlight more of the upper part of the selection and raise it up more.

Repeat that process bringing each row of polygons up a little. Stretching it thinner just a little each row I do. I save and render each time I make a change to see the result.I'm aiming for the picture of the chin to match up with the chin.




Close. I select just the chin in the 'Right' viewport, then in the Perpective View I turn on CTRL-t to be able to drag each of the points to a more straight alignment.




Strange enough, when you are in Polygon mode, with 'Drag' turned on, you can move points. And, it will only allow you to drag from the polygons that are currently selected, which is handy.

It is a great way of being able to modify things, using ALT and mouse to rotate the object as you work. Afterwards I again do a 'Save Object', a 'Synchronize Layout', I switch to the 'Layout' program and do another F9 render.

I pull both of her arms wider, readjust the angles of polygons with 'y' to rotate them, 't' to move them, CTRL-t to 'Drag' points, 'h' to stretch them, saving the object, synchronizing Layout, switching to Layout, rendering with 'F9' repeatedly.

Little by little all white areas disappear until I am left with this.

The light glare is too high, so I set the front left light to 90%, the area light to 30%, set the backlight to 60% and rerender.




Ah, that's looking very nice. Lets see how the back looks, now. I already know that the discrepancy between the front and the back will make a distinct line, but lets see how much is covered. I go to 'Top' view and rotate/move the camera to point at the back of the object from the side.




I check the view from the camera's view, then render it.




Yes, as I figured, the backs of the legs are way too dark, the joint line doesn't match, and the joint line is dark on both images so will show a distinct dark joint. Besides that, the shoulders are way too low, the bands don't match up.

I bring the images back into Photoshop and modify them using the clone tool. I clone the front, right side to the back, left side and vice versa. setting the flow to 15% so that it builds up slowly.

I lighten up the backs of the legs to match the front using generic pattern areas from the front, and spread out all of the edges, matching them left to right everywhere I do it.

I widen the texture in a generic way around the head, keeping all sharp detail in the ass, shoulder bracelets, face, and bonnet. Then, I saving them as 'Front Map2.bmp' and 'Back Map2.bmp'

Here is a comparison between what the original texture map looked like and the finished one for the front.




And, the back, which is drastically different now...




I then go to the Image Editor. Under 'Image' I pick 'Front Map.bmp' and then click on 'Replace' and select 'Front Map2.bmp'. I do the same with 'Back Map2.bmp'.




Now I have to shock you. So far I have just been doing the image map front to back, meaning that I'm drawing them as if I were going to paste the front one on the front with paste, and the back one on the back with paste. IMPORTANT - THAT WON'T WORK. LightWave projects ALL PLANAR MAPS FROM THE FRONT, including back planars.

And, it projects the same image on the front of a surface as it does on the back as if the surface were completely transparent. What it means is it means you'll have to flip any images you wish to map onto a back surface left-to-right ('flip horizontal' in Photoshop).

So, let me flip the 'Back Map2.bmp' image left-to-right. When I do that, the discrepancy between the solid dividing line greatly diminishes. The reason for such a harsh line was not only that the back of the leg was darker, but THE WRONG LEG WAS BEING PROJECTED ON THE BACK SURFACE.

You probably won't believe me, so I'll prove it. I'll put a red circle on the back of the left side of the 'Back Map2.bmp' image. And, you will see that LightWave will map it onto the right leg.




This can come in handy, though, when cloning from the front image in one window in Photoshop to the back image in another window. Since front matches up to back exactly one-for-one, I can clone the edge from one to the other without the curve going in the other direction because the image is reversed!

Now, another thing I noticed was, when I tried matching up the right arm bracelet with the back of the bracelet it needed to be raised upwards quite a bit, the red dot just showed me how low and off-center it is mapping, and the ass is too low.

I'll raise the whole bottom part of the map a bit and see if the line goes away more. Little by little I 'Replace' the new 'Back Map2.bmp' image as I work on it, and do a render each time until I remove most of the seam on that side.




There's still a strange dark shape on his right ass cheek I have to figure out. A white patch on her right cheek which is probably a polygon which is not being included in the surface name definition... And, I have to see how the seam on the other side looks.

When I look closer, the dark edge on the ass cheek turns out to be a shadow being cast from the right hand so there's no problem there.

I move the camera around to the front and closer to see which polygon may be missing from the face. This is where you can see a definite disadvantage to using planar mapping on a round object.

The grainy dots along the sides have smeared into long lines just as would happen if a projector were projecting an image upon a body.




I can see that the polygon is one of the ones along the right side of the nose, so I go back to Modeler and highlight the whole string of polygons there, press 'q' to bring up the 'Change Surface' requester.

Select 'FrontPolygons' from the list and click 'OK'. I do a 'Save Object', do a 'Synchronize', flip back to 'Layout' and do an F9 to render. The polygon is now correct.

I also see that there was a sharp pointed polygon in the hat which I tone down in Photoshop by cloning a little pure white at 7% flow rate to the 'Front Map2.bmp' file's hat using the grooves in the hat as an indicator of the proper area.




Next I check the seams on the other side, touching up the inside of the right leg and the bottom inside of the left leg.

Note that wherever the angle reaches nearly 90 degrees, that is where you get the worst stretching of the texture map. However, if this were an object sitting on a distant table, or if it was moving, nobody would see these imperfections.




Next, I look straight-on to the back of the figurine. The ass crack needs to be centered. It is way too far to the right, so I have to move it to the left an equivalent amount in the 'Back Map2.bmp' image.

The braid is off-center (it was also originally off-center on the sculpture) so I move it to the center.




And, I render a straight-on view of the object's front..."




And I think I'm done with the texture map. Next, a bump map.

Previous   Table of Contents   Home   Next