LightWave 3D 8 Texturing phần 7 potx

51 193 0
LightWave 3D 8 Texturing phần 7 potx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

This page intentionally left blank. Chapter 14 Standard Projection Techniques Introduction to Standard Projections When working with images for texturing, we have to define exactly how the image is to be placed (projected) onto the surface of the object, as no program is so intelligent as to know exactly how to place an image onto a surface without some coordinates that tell it where to put the image and in what manner the image should be applied. Even in the following image, we would need to tell LightWave how to project this texture straight onto the surface, even though the placement may seem pretty straightforward and obvious. Defining these projections involves a process called mapping, of which there are a number of different types. Mapping can be roughly divided into two main categories: standard projections and UV mapping. Both offer a few different options for you to use, and are suitable for different situations. To use a real-life analogy, let’s assume that you make a sculpture and then paint all the surface detail for that sculpture onto a piece of cloth. Okay, I know it would be a bit odd to not just paint directly onto the surface, but just bear with me here! So you have your sculpture, and you have your cloth, and now you need to figure out a way of wrapping the cloth onto the sculpture so that it looks right. That is basically what mapping is. Do you stick the cloth straight onto the front of the sculpture or do you strategically arrange the cloth onto it? 291 Figure 14-1 Chapter 14 ··········································· Part 4 NOTE: You only have to specify a projection type for images and for a few procedural textures, as gradients and most procedurals do not require them due to the way that they are created. What makes mapping really challenging is that in any situation, a number of different approaches could be applicable. The trick is to choose the best one, and deciding on that requires a bit of planning and thought. To define the manner in which an image will be projected onto a surface, you need to choose an option from the Projection list in the Texture Editor for the channel into which you are placing the image. As you can see, there are quite a few choices. The first five options in the list — Planar, Cylindrical, Spherical, Cubic, and Front — are standard (basic) projection types. Standard projection types offer perhaps the most straightforward methods of placing textures onto your surface. All you have to do is decide on the most appropriate method for the object upon which you need to apply the texture, as the choice you make will really depend on the shape and orientation of the surface with which you are working. Planar Projection Using Planar Projections Planar is most probably the simplest method to use of all the standard pro - jection types. It is also possibly the most popular way of placing textures onto surfaces. Its simplicity can be deceiving though, because as straightfor - ward as it is, this option is by no means simplistic or stunted in its actual use. In fact, you could almost say that as a general rule of thumb, if an object cannot be planar mapped, then it cannot be mapped. Sure, for some objects, planar mapping the entire thing would be quite a task, but nevertheless it is totally possible. Anyway, enough waffling about all that, as you are probably wanting to know exactly what this simple method is! Planar projection basically takes an image and projects it straight along an axis, through the surface. 292 Figure 14-2 ··································Standard Projection Techniques Texture Projections and Mapping Applying an Image Using Planar Projection We apply an image by selecting Planar from the Projection list in the Tex - ture Editor, and then deciding which axis to project the image along by clicking on it in the Texture Axis option. This is demonstrated in Figure 14-4. As you can see, we take an image and simply slap it straight onto the object along the same axis that the front of the object is facing. So basically all you do is consider the direction in which the surface is oriented, and then apply the image along that axis. In this case, the surface of the object is facing sideways, so we basically apply the planar image along the x-axis. 293 Figure 14-3 Figure 14-4 Chapter 14 ··········································· Part 4 Likewise, if the surface faces upward or downward, we would apply it along the y-axis, whereas if it were facing toward the front or back, we would project along the z-axis. Planar Stretching/Dragging Now if we look closely at the object with the texture applied, we notice a slight prob - lem. Do you see how the texture stretches through the length of the object, leaving those rather unsightly lines? This is an unfortunate problem that we always face when using planar projections. Think of it like this. Say we have a block, and we have a nice little piece of paper with a little design on it that is the size of one of the block’s sides. To apply that paper design onto the block, we would simply take the piece of paper and stick it onto one side of the block. However, because the piece of paper is flat and only the size of one side, we cannot bend it around the edges of the block, so instead it just stays stuck on the side that we have glued it onto. Similarly, a planar projection cannot bend around edges; it simply stays stuck on the face that you have applied it to, along the parts of the face that are oriented in the same direction as the axis that you have projected it along. Planar mapping obviously works like a plane (hence the name), and as you probably know from modeling, you cannot bend planes, because in reality that is impossible. So how does this explain the nasty stretching shown in Figure 14-7? Well, con - sider this. If the design on this piece of paper that you have stuck on your block has been painted onto the paper, and the paint is still wet, you could try to get the design that is painted onto it onto the other sides of the box by smearing the wet paint along the edges of the paper along the sur - rounding sides of the box. This would look pretty hideous. 294 Figure 14-5 Figure 14-6 Figure 14-7 ··································Standard Projection Techniques Texture Projections and Mapping Think of the pixels at the edge of an image being like the wet edges of that piece of paper. Now does that make sense? Obviously the best way to get the design onto each side of the box would be to stick a piece of paper with the design on it onto each side of the block, not by smearing the paint. In LightWave, you could do this by using a combination of a couple of different planar projec - tions along different axes, so that the image could be pro - jected onto each side correctly. The easiest way to do this would be to assign different sur - faces to the block according to their orientation and then sim - ply project the images accordingly, as in Figure 14-8. In this example, I have assigned three different surfaces to the box, one for each projec- tion axis. So basically the top and bottom polygons have one surface assigned to them with the image projected along the y-axis, the side polygons have one surface applied to them with the image projected along the x-axis, and the front and back polygons share a surface with the image projected along the z-axis. This, however, is not the only method. Instead of assigning separate surfaces, you could also apply a single surface to the entire box and simply set up three different layers within the Texture Editor, each with its appro - priate planar projection. You could then use falloff (covered in Chapter 13) to ensure that none of that nasty planar stretching is visible. So now we understand how planar mapping works on objects like blocks, but what about uneven surfaces? Well, you can use planar mapping on some irregular surfaces, but surfaces that are very uneven cause prob - lems, because that horrible stretching that happened in the block example becomes visible. In Figure 14-10, I have projected the dirt texture along the y-axis, and as you can see, this works fine with the fairly flat surface, but when applied to the very irregular surface, we get stretching. 295 Figure 14-8 Figure 14-9 Chapter 14 ··········································· Part 4 Although you could probably get away with this sort of thing in a distance shot, it will not suffice for objects that are close to the camera. As you can see, the more the surface slopes away along the projection axis, the worse this problem becomes, as more stretching appears. This makes planar mapping really mostly ideal for flattish objects such as walls, doors, floors, or any polygonal surface that is predominantly facing toward one axis and does not have too much depth visible where stretching would occur. Blending Planar Projections As I mentioned at the beginning of this chapter, pretty much any object of any type or structure can technically be planar mapped. Sometimes, how - ever, this requires you to use a number of different images projected along different axes that you blend together using falloff in each texture layer that needs a different projection axis, or by using gradients (especially with weight maps) as alpha layers, or even alpha channels in the images them - selves. Sounds complex, but it is actually fairly logical and simple to execute. Blending with Falloff The most logical way of blending planar projections would be by using falloff on each layer that needs to be blended, and then carefully positioning each image into place so that it all works nicely. NOTE: For more detailed information on using the Falloff options in the Texture Editor, please refer to Chapter 13. Using the same irregular ground object from the previous example, all I have to do is create two separate layers in the Texture Editor, each with the 296 Figure 14-10 Figure 14-11 ··································Standard Projection Techniques Texture Projections and Mapping dirt image in it. One of the layers is projected along the y-axis, as before, while the other is projected along the z-axis. The image that is projected along the y-axis will not have to have any falloff settings applied to it, because in this instance, it will be on the bottom layer, while the other layer will blend with it from above. But let’s do this step by step so that everything is very clear. So, starting right at the beginning, I create one layer in the Texture Editor. Fig - ure 14-12 shows the surface once again, with the image applied along the y-axis only. Take a look at where the stretching occurs, and remember that this stretching is happening along the surfaces that slope downward, along the same axis the image is projected along, which is the y-axis. In order to cover up these areas, we need to apply something along the z-axis, so that these areas will no longer be visible. Now let’s add a second layer to the Texture Editor above the bottom layer, this time with the same image projected along the z-axis. This step of the process looks like Figure 14-13. Yes, I know this looks wrong, but don’t worry! Once blended correctly, this image will cover up the stretching along the z-axis. So how do we get these two layers to blend together correctly? Well, all I need to do is add some falloff to the top layer (the one that is projected along the z-axis) and reposition it slightly. So what I do is set up some falloff to the layer as shown in Figure 14-14. The percent of falloff refers to percent per meter of falloff, which means that 100% falloff creates a linear falloff to 0% at 1 meter. 297 Figure 14-12: Texture applied to y-axis Figure 14-13: Texture applied to z-axis Figure 14-14 Chapter 14 ··········································· Part 4 The falloff on the y-axis will prevent it from stretching along the bottom of the object, while the falloff on the x-axis prevents the stretching from appearing too much along the sides. I also shift the actual position of the image slightly upward (to make absolutely sure that the image does not drag along the bottom of the object), and remove all tiling options so that the image does not repeat itself at all by select - ing the Reset option in my tiling options (see Chapter 13 for more information on tiling images). For the sake of this example, I have hidden the bottom layer so that you can see the way in which the falloff and reposition - ing of this image has faded the image out along the y-axis. As you can see, we have a nice fading that will blend well with the bottom image. Notice that I did not fade it out completely along the side and bottom, as this would basically make the entire image disappear. When I switch the bottom layer back on and render it, the stretching is covered up by the top layer. Pretty nifty. Blending with Gradients The next blending method we can try out is using gradients in conjunction with weight maps. This method is not always as effective as the falloff method, depending on the model, but is nevertheless worth a mention. Although it requires a little more work, it is, in many ways, easier than the falloff method, which can sometimes be a little confusing. For this method you simply create weight maps that will act as alphas to place the images where you want them to be, and then create gradient lay - ers over those image layers in the Texture Editor, with the appropriate weight map set up as the alpha for that particular image. Let’s examine this process. Figure 14-17 shows the object and the three images that we wish to apply to the object. For the sake of simplicity I am using a very simple object, a cube, but this principle could be applied to any type of shape. Image 1 will be projected along the x-axis, Image 2 will be projected along the z-axis, and Image 3 will be projected along the y-axis. First, I need to create a weight map for the object to determine where the different images will be visible. Now remember, once we create the weight map and use it with the gradient, it will act as an alpha layer for the 298 Figure 14-15 Figure 14-16 ··································Standard Projection Techniques Texture Projections and Mapping image that we wish to place onto the model. This means that we must create the weight map with a nice solid area of one particular value to determine the area where the image will be visible. So, I start off by creating a new weight map and calling it “texture image 1,” and selecting the areas where I want the image to be visi - ble. I then assign a single value, 100%, to this selection. This area, which has now been assigned a value of 100% in this weight map, can now be used as an alpha layer with Image 1, and the image will only show through this particular part of the weight map. I now create a second weight map called “texture image 2” that will act as the alpha for the second image. I do exactly the same thing as for the first one, except that for Image 2 I set the weight map’s value to 100% on the areas that lie along the y-axis. 299 Figure 14-17 Figure 14-18 [...]... distortion in the UV map once you subdivide it again than if you unwrap with it on Take a look at Figures 15 -7 and 15 -8 The first head was unwrapped while the model was not sub-patched, while the second was unwrapped in its sub-patched state Notice the slight differences between the two Figure 15 -7 Figure 15 -8 As you can see, the one that was unwrapped while sub-patched has a slightly smoother resulting map... 14- 47, which uses a totally unaltered rectangular map of the world as a texture Figure 14- 47 Applying an Image with Spherical Projection To wrap an image spherically around an object, simply select the Spherical option from the Projection list in the Texture Editor You then select an appropriate axis along which you wish to project the image Most spherical mapping situations use the y-axis Figure 14- 48. .. 14- 37 306 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Standard Projection Techniques Texture Projections and Mapping The value you enter into this field determines the number of times the texture is wrapped around the object to which it is applied So if, for example, you wanted to wrap an image around a cylinder five times, you would enter a value of 5 in this field Figure 14- 38. .. and the Specularity setting to 5% Leave the other settings as they are Figure 14- 57 6 Let’s set up the planet atmosphere surface We’ll use this part of the object to simulate an active atmosphere for the planet with the help of a few gradients Set up the surface’s color as 200, 120, 60 This creates a nice orange color 7 Open the surface’s Transparency Texture Editor, change Layer Type to Gradient, and... just don’t have the time or inclination to paint textures for Basically, it’s the quick fix projection type 3 18 Chapter 15 UV Mapping and Editing Preparing your Model and Creating UV Maps Introduction to UV Mapping And now we move onto UV mapping If there were such a thing as a Holy Grail of texturing that was greatly sought after by artists, then UV mapping would probably be it The fact is that all... companion CD-ROM Notice that the can has two separate surfaces applied to it: one surface for the label and one surface for the metal parts 3 07 Chapter 14 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Part 4 Figure 14-39 2 3 4 3 08 Open the Surface Editor (Ctrl+F3), and go to the label texture Click on the T button next to the Color channel to open up the Texture Editor... whereas cylinders that are lying on their sides would have the texture projected along the x-axis or z-axis, depending on whether they are facing from side to side or front to back respectively Figure 14- 28 Think of it as taking a piece of paper and wrapping it around a tube, because that is essentially what cylindrical mapping does, as demonstrated in Figure 14-29 Figure 14-29 “Capping” Cylindrical Objects... that the Rectangular to Polar option is selected The little preview window will show you a decent representation of how the image will more or less behave when wrapped spherically around your model in LightWave You can use this to ensure that the image is seamless at the poles In Figure 14-52, we can see that the Earth image has Figure 14-52 312 · · · · · · · · · · · · · · · · · · · · · · · · · · ·... Stamping and Healing Brush work to eliminate the seam Spherical Mapping Tutorial: Applying a Texture to a Planet What better way to demonstrate the use of spherical mapping than to do a tutorial on planet texturing? 1 Load the 4.1.4-planet_tutorial.lws scene from the companion CD-ROM You should see a scene that has a planet object consisting of two layers: planet surface and planet atmosphere See Figure... want the change to only happen on the very edge of the planet though, instead of a smooth transition from the nonluminous area to the luminous one, so let’s create a final key to do this Create a key at 85 .0° (check the Parameter field to ensure this) and change its Value setting to 90% See Figure 14-56 This gradient has now created a luminous strip along the edge of the planet that faces toward the light . set the weight map’s value to 100% on the areas that lie along the y-axis. 299 Figure 14- 17 Figure 14- 18 Chapter 14 ··········································· Part 4 And once again, I create. previous section, or we could simply assign a separate surface to the end faces. 303 Figure 14- 27 Figure 14- 28 Figure 14-29 Chapter 14 ··········································· Part 4 Figure 14-30. surfaces applied to it: one surface for the label and one surface for the metal parts. 3 07 Figure 14- 38 Chapter 14 ··········································· Part 4 2. Open the Surface Editor

Ngày đăng: 13/08/2014, 21:20

Tài liệu cùng người dùng

Tài liệu liên quan