Texture mapping for 3D

By Amos Willbond

The following techniques used apply specifically to the Satori FilmFX program, but the texture maps that we will be creating can be used in most 3D modeling/rendering programs (as can the supplied .dxf model of the Spaceship), just remember to save the correct image file format that your 3D package requires.

Star backdrops

Let's face it, one of the things that everyone will do at one point or another when confronted with a powerful 3D modeling/ animation package, is to create a wonderful space scene or sequence.

It's inspiration by association, examples like Star Trek - The Next Generation spring immediately to mind. Aesthetically pleasing, intricate spaceships against nebulae and exploding-star backgrounds. A situation where you can still use lens-flares without them appearing to be imposing or passť.

To create the deeply atmospheric background of the main image there are quite a few cheats and 'tricks of the trade' that we can use. Generally, when creating this kind of image it is important to achieve a balance between a neat, pretty piece of art and the chaotic reality of the real world (or, in this case, space).

Here's how to do it...

 

Stars

Start with a video resolution canvas (720 X 576 pixels for PAL D1 aspect.) and fill the first layer with a black filled rectangle. Until we do this, the canvas is completely transparent for compositing between images using 32-bit image files.

To create a deep field of stars, we'll first create a basic star pattern and then use a copy of that layer to build up a galaxy of varying brightness and focus.

On a new layer take a white Airbrush of about 10 pixels in size and scribble over the entire canvas.

This brush stroke can now be adjusted using the tools on the Paint Actions, Brush Setup dialog and its attributes changed. In this example, change the profile of the brush to have a very soft edge and enter '1000' as the Response tab, Brush Application Distance percentage value, before applying the settings. Now re-apply the brush using the Replace Brush Style option from the Paint Actions, Pen/Mouse Right Button Click menu and you will get an instant star background.
This layer can now be copied, scaled and rotated to give that 'depth' that will help with the realism of the finished image (reducing the opacity of the background layer will help the stars fade into the distance).Gas CloudsIn a new layer, fill the canvas with another filled black rectangle. This is simply going to be used as a base for the following steps, we'll key out the black later. Using a larger Airbrush (about 60 pixels or so), add a few white brush strokes in the areas where you want your gas clouds.
Again, using a 10 pixel Airbrush, scribble over the entire canvas and then change the attributes of the brush, so that it has a soft profile, a Brush Application Distance of 4 and the Push style selected. Re-apply this using Replace Style (with a new brush size of 50 pixels), smudging the airbrush strokes into wispy clouds

To make the darker areas of this layer transparent, add a Luma Mask. This is a great way to create perfectly gradiated masks in Satori, especially as you are able to render the results at almost any resolution (and with sequential files).

Experiment with the Upper and Lower values until you’re happy with your mask.

Now, add another rectangle over the whole layer, this time with the box-corner option checked with some nice greens and blues selected for the four corners.

Now this layer is ready to be composited with the others, reduce its opacity and move it down so that it nestles snugly between two of our 'Star' layers.

Add a Color Correction to enhance the contrast of the layer, this can make a real difference!!

Finishing Touches

By playing around with the Brush Profile you can easily achieve nebula type effects (Fig 7), add a few wispy star trails around this and then shear the layer for a swirling galaxy. This layer can now be positioned and scaled using commands from the Layer Actions palette.

To apply this to your 3D scene you will first have to save the image as a bitmap using 'Save Bitmap As' from the file menu, it is only now that you have to specify the output file that your 3D application requires (Satori supports most file formats).

As a general rule, if you are unsure which file type to use, the more common file extensions (.bmp,..tif, .jpg) are a good bet for most applications. There are, of course, exceptions to this rule such as Lightwave 3D and other Amiga developed programs, which tend to use .iff as their native image format, and SoftImage which uses the .pic format.

Also saving the canvas as a .cvs file for use in Satori has many benefits. This will save all the image information so that any part of the image can be changed at any time or rendered out at any resolution. Simply by changing the output file size when re-saving means that the image that we have just created could be re-rendered for everything from the internet to feature film, with no loss of quality.

That’s the key to Satori, it doesn’t matter where you start or how many things you get wrong along the way, everything is completely editable so you can always get the results that you want.

Texture maps for the Galactic Cruiser

The model used in this scene is a medium polygon count mesh, originally modeled using NURBS in Lightwave 3D. The mesh is split up into five major groups for texture mapping; the hull, engine, screen, intake vents (in space?) and little bits that are not one thing or another (nuts, bolts, door handles, warp-drive transducers, that kind of thing....). The bulk of the ship is obviously the hull so generating this map first will give us an idea of what else is needed in the scene.

Before generating any texture map it is worth planning out exactly what you want to achieve and, if possible, study examples for ideas, color and texture. Split your thinking into the same categories that are changeable variables in the Texture Editor in your 3D package. i.e. What color is the texture? Does it have a pattern? Is it bumpy? You then have a pretty good idea of the texture and settings that you need before you start. It may seem an obvious way to look at the problem, but it's easy to get carried away with the technology of the software and end up with an image created by gadgets with no practical application in your scene. In this example we will create a texture map to represent dirty metal panels.

On Layer 1 of your new canvas, create a smudged white-on-black image similar to the one that you made for the gas clouds layer of the previous canvas. This gives you a crude brushed-metal type finish, which you can use as the base for this material.

Fill the second layer with random sized Outline Rectangles (eventually these will represent the panel structure of the hull, after a few effects have been added). To ensure that these 'panels' meet up exactly with one another, turn the grid snap on and set the cell numbers to about 50 in both the X and Y-axis.

Now Copy this layer twice and Scale and Rotate each copy to give your texture more depth and detail, without a lot of effort. Adding various effects to these copied layers

(using filled rectangles with effects specified from the FX menus) such as Blur, Sharpen, Emboss and Tint, helps to give a greater indication of realism and variation.

Dirt and GrimeFor this type of texture map, having an image that is too 'clean' is an instant give-away that the image is computer generated. Putting a certain number amount of impurities in the map can disguise what is essentially a very pure image. To do this, we want to add random grime to the image to simulate dirt that has built up over many years, in the unforgiving environment of space.

On a new canvas, this time 100 X 100 pixels in size, place a black background on the first layer and a white rectangle over layer two. Using the random mask, with settings of 0 and 30 respectively for the upper and lower limits, create a mask for the top layer. You will now see a resolution independent version of the composition that doesn't conform to the physical size of the canvas, by now saving the bitmap (using Save Bitmap As) you will constrain the dimensions to 100 X 100 pixels, much simplifying the amount of data in the image.

Back to the original canvas, load the bitmap that you have just created into a new layer, making sure that Ignore Aspect is checked in the Load To Layer dialog box. You will see immediately that the noise created by the random mask, has a lot reduced quality after saving, giving you a blocky pixelated effect. To clean this up, use another filled rectangle with Blur selected to fill the canvas to smooth out all the blocky edges, add a Luma Mask to get rid of the black areas and Color Correct the layer to turn the white dirt to a more realistic brown color.

To make this layer 'sit' slightly better in the overall image, reduce it's opacity slightly and change the Z-Order of the layer so that it is directly under the top layer of the canvas.Finishing touches.On a new top layer add a few details to finish off the image, such as access panels, decals and battle markings using rectangles, circles and text objects from the Geometry Actions palette. Add an Emboss Rectangle object to this layer to make the decals stand out, this will show up even more when you use the image as a bump map.
Finally, save the finished canvas out as a .cvs file (so that you are able to make changes to any element of the image at a later date, should you wish) and a bitmap so that you can use it as a texture in your 3D package. It's worth pointing out, that once the canvas has been saved, deleting layers may be useful to achieve purer bump maps for your model, while keeping a good match between the color and bump map images.

Applying the Maps to your 3D Scene.Import the Ship.dxf object into a new scene in your 3D package and position the camera to give you a nice wide angle view of the geometry. What happens next is mainly down to what specific package you are using, but in most cases loading a background image is under Rendering Settings. If you have the option, set the projection type to Screen instead of Global, then render a frame of the scene to check that the background looks okay.

To add the Hull texture to the hull first ensure that the geometry that you have imported is correctly oriented. Different 3D applications can read imported files differently and loading a model with it's polygonal normals inverted (meaning that the model is essentially inside-out) is an easy thing to do. If you are not sure how to fix this (or don't know if it has happened to your model) look up Flip Normals in your software's manual or online help.

When you are sure that the model's geometry is correct, select the hull object and go to your Texture Editor to apply the image created in Satori to the model. Most commonly, you will be able to apply the image to the color and bump channels of the material, in the reflection channel you may want to put the background image for extra realism (definitely use this for the cockpit screen material to give the illusion of shiny glass). Render the scene again a few times, making adjustments to the lighting and tweak the surface settings to get your textures 100% perfect, and your scene is completed.

 

Tips for Working with Satori's Layers and Resolution Independence

As mentioned before it is possible to edit, undo or re-do almost any element of your image at any time via either the Edit controls or the Object List. For example, if we had made a mistake with the first brush stroke on the first layer of the background image that we created, we could now go back and change it. The canvas was specified at 720 X 576 pixels, but we can go back and render a poster sized image from that same file without the result appearing as though it constructed from Lego. Having this kind of editability in a paint package is especially useful when creating texture maps, you can simply refer back to your source (.cvs) file if any part of the texture needs changing. This also means that creating texture maps at different resolutions doesn’t require a huge project file, soaking up hard-drive space, to prevent pixelation when creating the full size or close-up texture, Satori canvas files are rarely bigger than 1Mbyte in size, yet can render a bitmap containing over 1Gbyte of information.

Using the layer system is another useful way to work when creating textures. Not only does it mean that you are able to composite between the separate images inside the texture, but you can also export separate layers (or groups of layers) to specific channels in the material that you are editing. In this way you can always be sure that all your textures will be perfectly aligned and proportioned, plus you only need one (tiny) source file for all the textures in a material.

Some users of 3d software manage (and manipulate) multiple texture maps in a Satori canvas in a particular way that is related to the way the files are handled and reported by the 3d Materials Editor. Satori offers the ability to render each layer of a multi-layer canvas to a separate output bitmap file (it also permits the rendering of undisplayed layers if desired). This means that a single Satori project (.cvs) file can contain ALL the texture mappings source files required for Image, Reflection, Bump, Opacity (and other) mapping methods that will be applied to a model. It is important that the layers in the canvas should be named appropriately.