5. Creating a texture

For this we will need those very views of the car – from the side, from the rear, from above and so on. Best of all, naturally, is to get real photographs – say, from magazines like "Za Rulem" or the Internet. If you draw well yourself – more power to you. I, however, took advantage of the fact that I have a ready-made model of "photorealistic" quality and simply rendered all these views in 3DS MAX. Here are my "photographs":

So, in CarCAD we enable all parts, and switch to triangle editing mode, so that there are no dots on the texture.

And then we expand CarCAD to full screen and simply take a screenshot (the key PrintScreen, if you didn't know ;-).

We paste it into a new file PhotoShop and cut out from there only the texture with the black background, after which we paste it into a new file.

For those who PhotoShop have never seen: in PhotoShop the key concept is layers. An image in it is something like a collage, where different elements are placed on different layers. Layers can be made transparent, moved, reordered, deleted and generally messed with however you like... Actually, it's all quite simple. Let's get to practice.

First we need to change the dimensions of the texture. NFS understands textures whose dimensions are multiples of 8. That is, textures 256x256, 256x512, 512x512 are suitable... Using the command Image/Image Size we stretch our picture to 512x512.

We need to draw a texture based on the existing draft. Of course, we could just draw right on top of it, but we'd like to constantly have these outlines in front of us to control our actions. So we will now make the layer with these lines transparent and will draw not ON it, but UNDER it.

First we need to erase all the background black color from the draft. In the menu we execute the command Select/Color Range, and this little window appears:

Let's click on it with the eyedropper somewhere where the black color should be and set Fuzziness to 0 so as not to leave anything extra. OK, and all the black color in the picture is selected. Del, and it's gone. The deleted color becomes transparent. Ctrl-D to deselect.

Layers are managed in this kind of window.

The brush marks the layer we are currently in, the eye – the visible layer. Opacity – the transparency of the current layer, you can set it to 50-70%, so that the lines don't stand out too much. Now let's switch to the layer Background and fill it with black color.( This tool is in the toolbox window, and the color is chosen here - )

We can start pasting the "photographs"...

I open the side view, cut out the view of the car from there and paste it into the texture on the layer Background. You can remove a uniform background by selecting it with the magic wand and deleting it. (if you have real photographs, you'll have to work a bit to cut out the image from the background; nevertheless there's nothing complicated there – the background is erased with the "eraser" by hand.) A new layer with this image appears.

Next the selection button, right-click on the image of the car and Free Transform. Free Transform really lets you change the picture however you like.

And in this window you can change the scale (just not while applying Free Transform).

To start, I flip the view using the command Flip Horizontal, then I drag it into place under the texture lines and stretch it by the frame to the required size.

Careful: it's better to align not by the edges (since on the texture the triangles at the edges may be captured in a different view). Here, on the side view, it's better to align by orienting yourself to the car windows on the image and on the texture.

In exactly the same way I paste the remaining views.

It turned out that in some places they overlap each other – for example, the top view over the rear view. Therefore, where this happens, you need to switch to the corresponding layer and delete the excess.

Only the driver, the interior and the bottom view remain unpainted. I'll leave the bottom view black, I'll just paint over the interior with a uniform yellow, and also paint over the driver...

Seems good enough... ;-) Now we need to make the grid of lines invisible (by removing the eye icon from its layer) and save (Save Copy) what we got in TGA format, 32 bits/pixel.

But that's not all, we need to take care of the texture's alpha channel. Open your saved tga texture again in PhotoShop and pay attention to this kind of window:

This is the management of the picture's channels...here there's the red channel, the green channel, the blue channel, and the alpha channel. Practically, the latter can be considered one more layer that determines the transparency of areas of the picture. The principle here is this – if a point on the alpha channel is black, then the corresponding point of the texture in the game is completely transparent and invisible; if it's white, then in the game the texture point is opaque; and if it's in shades of gray, then for this point in the game you can set an arbitrary color. Right now my entire alpha channel is black, i.e. with such a texture the car will be invisible. So I switch to this channel and simply fill it entirely with white color.

Next, I'd like to make assignable colors for the car instead of the single red one that exists now. Well, that can be done too. I switch back to the RGB channel, and execute the already familiar Select/Color Range.

Here I select all the red color on the texture, adjusting with the slider Fuzziness so that all places with a close shade of red color "show up".

Then I switch back to the alpha channel (the selection remains) and fill this selection (what a word! ;-) with a light shade of gray (to be precise, the RGB parameters of this color should be 224, 224, 224. It will work in other cases too, but it's better to do exactly this – the explanation will come a bit later).

However... here another problem arises. When we "set" some color for a texture in the game, it gets "overlaid" on the color of the original pixel. And since this color on the original texture is currently red, the results of such an overlay will be hard to predict... ;-) Therefore we need to turn the entire red color on the RGB channel of the texture into gray. Fortunately, this is easy to do – while this selection is still active, I switch to the RGB channel and run the command Image/Adjust/Desaturate. This reduces the color saturation of the selected area to a minimum and we get gray. Sometimes you may need to do this twice. Then you need to make this gray color light enough, almost white – you can do this via Image/Adjust/Brightness/Contrast

That's it, you can save the finished texture. Of course, you can still add something like combat lettering such as "Camel Trophy", "Guano Apes rule forever", "GIBDD" or "Nastoyashchie padonki" somewhere on the roof or on the side, but that's up to you ;-)


CarCAD guide © Baco, 2001.

Comments

Do you agree with the author? Share your experience or correct us.

Reviews: 0
Sign in  or  sign up  Sign in or sign up to leave a comment.