Using FX-MaPs

Now, using MaPZone to create uniformly colored textures isn't exactly making good use of a powerful program; after all, any old graphics program can do what we just did with less mess and fuss. The point of the previous exercise was just to get your toes wet so that you wouldn't have to learn so much all at once when we finally got around to making real textures. So let's get started!

In the last exercise, we used a Uniform Color node to create a texture with a solid color. Technically, in MaPZone terminology, the Uniform Color node is a filter. In MaPZone, filters are used to change or adapt a procedurally generated effect, or FX-MaP. Since a texture in a uniform color technically has no effects (other than the color itself, which was generated through a filter), it wasn't necessary for us to include an FX-MaP node to create it. But what if you want to create something with a little more...texture? Well, in that case, you need to start building your texture with an FX-MaP.

FX-MaPs vs Traditional Textures

Procedural textures are collections of algorithms that produce visual effects like the 'noise' or recurring patterns that are found in nature: wood grain on a table top, rust spots on an oil drum, or the tiny, multi-colored pebbles and grains of sand on the beach. Traditional texture artists use photos to capture these effects, and then edit the image in an image-editing program like PhotoShop or the GIMP to remove unwanted visual features. These textures are often of extremely high quality because they duplicate the complex patterns in nature perfectly. But turning these images into scalable, tilable textures is often very time-consuming and frustrating for the artist as they attempt to compensate for uneven lighting (from a flash or too much sunlight), unusual features in the image that repeat when the image is tiled (like a black spot in an otherwise light-colored image), and smooth transitions between tiles that don't result in visible lines between each tile (the 'quilt' or 'checkerboard' effect). Depending on the pattern, scaling the texture may not even be possible if elements in the image (such as leaves) have real-world dimensions that must be preserved.

Using algorithms to produce textures instead of photographs means that you can create textures that scale and tile automatically without any additional manipulation in an image-editing program. (And anyone who has done traditional texturing can appreciate the significance of this benefit.) Until now, however, procedural textures have always seemed to have a 'fake' look to many people because of the difficulty involved in re-creating the subtle visual patterns found in nature by means of an algorithm. The algorithms developed by Allegorithmic for MaPZone, however, seem to have broken that barrier. (If you don't belive me, check out their gallery for yourself.) The algorithms used in MaPZone are bundled in procedural textures known as FX-MaPs and the tool comes with a fairly large collection of FX-MaPs built-in (listed in the Presets window) so that you can begin creating high quality textures immediately. (Later on, you will learn how to create your own FX-MaPs.)

Adding an FX-MaP

Let's start putting this theory to practice by creating our first, real procedural texture.

Start a new map by selecting File->New from the menu bar or by pressing Ctrl+N. To add an FX-MaP to your Compositing Graph, you need to drag it from the Presets window in the top left corner of MaPZone. You can scroll through the list of presets available by placing your mouse cursor anywhere in the Presets window and scrolling with your mouse's scroll wheel or by using the scroll bar. Select a preset that appeals to you by left-clicking on the thumbnail image in the Presets window and drag the preset to the Compositing Graph. Once you have it where you want it, release the mouse button. In the example below, you can see that I've selected the Cells preset.

The Cell FX-Map Link in MaPZone

Now, you may have noticed that the FX-MaP node has the word 'Link' on it. That's because the node that we've added isn't an actual FX-MaP, but a link to a map, in much the same way that a shortcut on your desktop is a link to a program located somewhere else on your hard drive. FX-MaP Links cannot be edited directly, but most of the time, this isn't a problem, because you will want to use the preset algorithms designed by Allegorithmic anyways. (Later on, you will learn how to edit MaPZone's default presets.)

[Official Doc]

If you haven't done so already, double-click on the FX-MaP node to display the texture in the 2D viewer. The first thing you will probably notice is that the image is in black and white, or greyscale. All of MaPZone's presets are in greyscale, but we can easily change that by adding a filter, which we will get to in a moment. Before that, however, you're going to learn how to view your new texture in 3d!

Using the 3D Editor

If you look at the far left of the 2D viewer, you will notice a vertical menu bar with the words '3D Edit' on it. This is a sliding tab which can be opened by left-clicking on the little arrow at the top, or by pressing F6. The default 3d object used for viewing your textures is a cube, so at first it might just look like another 2d image. (You will notice in the screenshot below that the texture in the 3D viewer has a bright spot in the middle of it where it looks washed out. This is because the default light source in the 3d viewer is pointed directly at the center of the object.)

MaPZone's 3d editor

Now, the controls for using the 3D viewer are a little hard to get the hang of, but they make sense once you've used them a bit. Here's the breakdown:

So you see, all the object movement controls are based on that middle mouse button/scroll wheel and the Alt key, the light movement controls are based on the right mouse button and the shift key, and the reset view is based on the left mouse button. See, it makes sense, it just takes some getting used to. :) Here's a recap:

Navigating in the 3D Editor:
Pan: MMB, drag
Rotate: Alt+MMB, drag
Zoom: Alt+Scrollwheel (or Ctrl+Alt+MMB, drag)
Move Light Source: Shift+RMB, drag
Center: Double-click LMB

Of course, a cube is pretty boring, and, depending on the surface you intend to apply your map to, it may not give you a very good idea what to expect from your final texture. Fortunately, MaPZone gives you a couple of additional objects you can try your texture on. If you look on the 3D Edit menu bar on the right of the window you should see a little cube icon. (The second one, beneath the one with the framing arrows.) Clicking on it opens a small menu of built-in primitives and an option to load a .3ds or .ase model (3ds Max/Autodesk formats). I don't own a copy of 3ds myself, so you're going to have to explore the import option on your own, but for now, try changing the cube to one of these other primitives to see how it looks.

MaPZone's 3d primitive options

In the image below, you can see the infamous teapot, panned, zoomed and rotated and with its lighting adjusted.

A panned, zoomed and rotated cube with adjusted lighting

There are a few other things you can do with the 3D Edit window, but we'll have to come back to those later after you've learned a few things about FX-MaPs and filters.

Applying a Filter to Your FX-MaP

Now that we know how to view our texture in the 3D Editor, let's give our FX-MaP some color!

In the first lesson, I showed you how to add a new node to the Compositing Graph by right-clicking in the graph and selecting one from the context menu. MaPZone has an alternate way to add nodes to the graph, though, which you might find even more convenient. If you double-click with the left mouse button in the Compositing Graph, you will pull up MaPZone's new node selection widget, which looks like this:

MaPZone's new node selector widget

The node selection widget gives you quick access to all of the different types of nodes that are available in MaPZone, so if all you need to do is add a new node, this is the way to go. (It doesn't give you access to any of the other options that are available from the right-click context menu, though, so for certain kinds of tasks you will want to use the other method.) Go ahead and add a Colorize node to your graph now by selecting (left-clicking) the icon on the selection widget. (It's second from the top on the first column.)

Connect your FX-MaP to the new filter by left-clicking on the FX-MaP's output pin (the downward pointing arrow on the bottom of the FX-MaP Link node) and then left-clicking on the Colorize filter's input pin (the downward pointing arrow on the top of the Colorize node). The connecting 'wire' should follow your mouse as you move between nodes. (You'll notice that this technique for connecting nodes is a little different from the one I showed you in the last lesson. MaPZone allows you to connect nodes either by pressing and holding the left mouse button and dragging between nodes, or by left-clicking first one node and then left-clicking the second node.)

With your nodes connected, double-click on the Colorize node to show your new texture in the 2D and 3D viewers. Your screen should be set up to look something like the one in the screenshot below (although your texture will be different if you chose a different FX-MaP to work with).

Your FX-MaP with a filter applied

Resizing Windows: To resize your windows, just place your mouse cursor over the horizontal or vertical bar, left-click and drag. The cursor should look like a pair of opposite-pointing arrows on either side of a bar. This works for the horizontal bar between the Compositing Graph and the 3D and 2D viewer, and the vertical bar between the 3D and 2D viewer.

Now we need to give our Colorize filter some color. If you look in the middle of the MaPZone editor between the Compositing Graph and the 2D/3D viewers, you will see the filter editor dialog, which says 'Filter Type' followed by a tab for the currently selected filter, the Colorize Map.

The Colorize filter editor dialog

The orange arrow beside the tab is pointing down at a grayscale color gradient bar. To add color to your Colorize Map, left-click on the color gradient bar. This will open the color picker that we used in the last exercise, and add three pairs of triangles or gradient keys (they look like a bit like pointy teeth) to the color gradient bar. The active key is highlighted in green and will appear wherever you clicked on the bar. Any changes that you make in the color picker will affect the gradient at the location of the active key. (The other two default keys, representing absolute dark and absolute light, are at the extreme ends of the gradient bar and may not be immediately apparent to you if you're not looking for them.)

The Colorize filter with an active gradient key

Select a color in the color picker and see how that changes the color in the gradient bar. Your texture in the 2D viewer should update automatically with this new color as well.

Using the Eyedropper Tool: If you need to match a color to an existing color, you can use the eyedropper tool to select any color on the screen.

You will notice that the gradient keys at the extreme ends of the bar are still set to show absolute dark and absolute light, and that some areas of your texture are still black or white, gradually shading into the color you have selected for the third key. These keys can be changed as well to represent any color you like. They do not have to stay black or white. To change these keys, simply left-click them to select them (they should turn green) and select a new color for them in the color picker. The following thumbnail shows a Colorize filter with three keys set to the primary colors.

A colorize filter with three primary colors

You can move the keys by selecting them and dragging them back and forth along the color gradient bar. Reducing the distance between two keys will increase the sharpness of the division between the colors by reducing the amount of shading between them. Increasing the distance will have the opposite effect of creating more gradual transitions.

Limits to Moving the Keys: Note that it is not possible to shift keys past other keys. They will stop as soon as they touch another key. This behavior makes perfect sense when you consider that the gradient bar is, well, a gradient.

If you shift all of the keys toward the left of the gradient bar (toward absolute dark on the grayscale), then any areas of the original FX-MaP that are black will shrink in size, and any areas that are white will expand. Shifting all of your keys to the right (absolute white on the grayscale) has the opposite effect, expanding areas that are originally dark and shrinking areas that are light. By changing the color of the keys, the distance between them, and their location on the gradient bar, it is possible to significantly alter the appearance of your initial FX-MaP.

The same filter after shifting the gradient keys to the right

But you aren't limited to using just three keys. You can add additional keys to your FX-MaP by left-clicking anywhere on the gradient bar. (You may have discovered this for yourself already.) Additional keys essentially subdivide the gradient, introducing new color regions between existing regions, allowing you to add finer shades of detail to your map. Here's the same filter with a couple of additional gradient keys to spice things up a bit.

The same filter after adding additional gradient keys

Deleting Keys: To remove unwanted gradient keys, Ctrl+Left-click on the key or simply drag it off the gradient bar of the filter editor. (If you forget how to do something when using MaPZone, just place your mouse cursor over the tool. In many cases, a tooltip with a list of the available controls is provided for you.)

To see all of these changes reflected on your 3D model, click the little orange arrow button on the 3D Viewer menu bar.

Viewing your changes in the 3D Viewer

And voila!

The Colorize filter applied to your 3d model

Last updated October 21, 2011

© 2009-2011 Dave Finch

SUPPORT TRUANCYFACTORY