Introduction to MaPZone 2.6 (WIP)

MaPZone is a free procedural texture generator that can be used to create high-quality, seamlessly tiling textures. These textures are output as bitmaps which can then be converted in the image editing program of your choice to whatever format you need for your own projects. This tutorial will get you started with MaPZone 2.6, but it is only the tip of the iceberg; the possibilities really are nearly limitless. (Note that, whenever possible, I will provide a link to the relevant official documentation so that you can 'go to the source' for further information. These links will look like this -> [Official Doc].)

Terminology: Although the term 'map' is more commonly equated with 'level' by many gamers and modders, MaPZone has nothing to do with level design. A map, in computer graphics terminology, is a more technical synonym for 'texture', and refers to the mathematical process by which a texture is mapped to (or wrapped around) the surface of a 3d object. What most people call a texture would be more accurately described as a color map. (Or, even more technically, as a diffuse map.) There are many different kinds of maps, but this tutorial will focus on diffuse (color) and normal maps. While the vast majority of textures are still created using photographs edited in an image-editing program like PhotoShop or The Gimp, procedural textures are generated by computer algorithms and do not require photographic images as a base (although they can still be invaluable reference materials).

Installing MapZone

The latest version of MaPZone can be found at Allegorithmic's web site. The MaPZone editor is free to use, and all of the textures you generate with it can be used and distributed freely in your own projects (though I recommend you read the licensing agreement yourself, since it is a good habit to get into). MaPZone also comes in a pro edition called ProFX which can be used to procedurally generate textures on the fly. Generating textures procedurally means you don't have to distribute hundreds or thousands of textures with your games and can save tremendously on disc space and download sizes. ProFX will not be covered in this tutorial.

Operating System: This tutorial covers the Windows version of MaPZone, and was originally written on a Windows XP system, and later a Windows 7 system. If you are using a different setup, there may be some discrepancies.

Starting a New Project

Once you have MaPZone downloaded and installed, double-click on the icon to open it.

The first screen that you see will probably be a dialog asking if you want to receive email notifications of updates and participate in the anonymous usage information tracker. Deal with that however you want (you can just click 'Later' to deal with it another time) and MaPZone's true start-up screen will appear, which is the Library dialog box. (If you receive an error about a new update, just click Cancel to continue. This is probably an indication that they will no longer be supporting this product in the future.)

The library dialog box

In order to create a new texture file (or map, to use MaPZone parlance), double-click on the 'New' folder. When the folder opens, you will see a 'New' file icon like the one shown in the screenshot above. To start working on your map, double-click the new file, or map. This will open the map editor, as shown below.

The map editor

User Interface

MaPZone's interface is very daunting for many people the first time they see it, but it becomes quite intuitive and enjoyable once you have acquired a little experience with it. This section will provide you with a quick overview of the interface (which you can refer to later as a reference if you need to), but don't worry about trying to remember all of this now; every element of the interface will be touched on later on in the tutorial.

Tooltips: Although MaPZone is considered by many to have a very steep learning curve, it is very, very good at documenting itself through tooltips. I've learned as much by reading the tooltips as I have through traditional tutorials so if you ever get stuck on something make sure you pay attention to the feedback the editor is giving you.

MaPZone's interface is divided into several windows, many of which are hidden by default but which can easily be accessed by the use of sliding tabs. When you first open MaPZone, you are presented with three main windows, a menu bar, and a status bar at the bottom of the screen.

The MaPZone interface

1. The menu bar contains standard GUI features and roundabout ways of interacting with the interface. The File menu contains common file operations like 'New', 'Save', 'Open', etc. The Graph menu provides options for adding FX-Maps and Filters. The Node menu contains commands for performing various operations on nodes. The View menu provides various options for showing, hiding, docking and undocking panels. The Undo button allows you to undo your previous action (though I have not tested it to see how many undos are allowed). The Help button opens the MaPZone documentation page on the Allegorithmic web site. The little question mark button can be used to gather additional information about the interface by clicking on it and then clicking on the item of interest.

2. The first panel, in the upper left corner of the interface, is the Presets viewer. Presets are pregenerated texture patterns which you use as the basis of your own textures. MaPZone comes with quite a few presets, all of which can be customized to some extent through the editor, and you can add your own if you can't find what you're looking for. To see the list of presets available, just scroll through them with your mouse wheel or by grabbing the scrollbar.

3. The second panel, to the right of the Preset viewer, is the Compositing Graph, or node viewer. This panel shows you a graph chart of the various nodes that make up your map. A node, in MaPZone, is essentially a component of your map: a preset, filter, or other operation being performed on your map. Nodes may be moved around and connected to and disconnected from other nodes to achieve exactly the kind of effect you're looking for. (If you are familiar with image editing programs like PhotoShop or The Gimp, you can think of nodes as layers.) Although it seems strange at first, once you get used to it, you will find the Compositing Graph a very easy and efficient way of working with textures.

4. The third panel, which takes up the large area at the bottom of the interface, is the 2D viewer. This panel shows you a preview of the texture represented by the currently selected node in the Compositing Graph.

5. The status bar at the bottom of the interface shows you your progress on executing the current action.

In addition to these default screen widgets are a number of hidden ones which are accessible via sliding tabs or through the View menu. The following screenshot demonstrates these additional widgets and an additional node to give the texture some color.

The MaPZone interface

6. The first of these is the 3D viewer ('3D Edit') which is visible as a sliding tab at the far left of the 2D viewer. You can open and close this tab by clicking the little arrow at the top of the tab. The 3D viewer allows you to see how your texture looks after being mapped to a 3d object. A number of different default objects are available for previewing, and it is possible to import your own models in 3ds and ASE formats (3ds Max/Autodesk formats). The 3D viewer also contains a light source which you can manipulate to see how your texture looks when lit.

7. With the 3D viewer open, you will see another sliding tab called 'FX Shader'. To open it, click on the little arrow. This panel allows you to edit various shader parameters, allowing you even more control over your final map. This is an advanced topic which will be covered later in the tutorial.

8. A similarly unobtrusive panel can be found at the far right of the Compositing Graph in the upper right corner of the interface. This panel, the Fx-Map editor allows you to edit the FX-Maps in the Compositing Graph, or even create entirely new ones. This is another advanced topic which must wait for a later part of the tutorial.

9. When you add a filter to the node graph, you can edit it via the Filter editor. To open the Filter editor, double-click on a filter node. The effects of editing a filter depend on the type of filter being used. We will cover filters in greater depth a little later in the tutorial.

[Official Doc]

Creating a Simple Map

Tutorial Overview: Now, before we begin, I feel I should give you a bit of a warning about the approach I have taken in writing this tutorial. Many tutorials provided for large, complicated programs (like the official tutorials offered by Allegorithmic) walk you through the creation of a complete, fairly advanced (for a noobie) project. These kinds of tutorials are invaluable, and can teach you a lot in a short span of time, but sometimes move a little too quickly and gloss over secondary (but important) details in the process. (The problem I always have with these tutorials is that, by the time I reach the end of them, I've forgotten what I learned at the start!) Personally, I find I learn better by starting slow, and building on what I learn. So, instead of working on a single, complicated texture, this tutorial will walk you through the creation of several simpler textures, each one building on the previous one in some way. I find that combining both types of tutorials provides the most effective means of learning a new subject.

Now that you've been introduced to the interface, let's create a simple map to test it out.

Adding a Uniform Color Filter

For our first project, we are going to create a simple texture with a uniform color and export it as a bitmap. Start a new project, either by opening MaPZone and selecting New from the Library dialog (if you don't currently have the program running), or by selecting File->New from the menu bar or by using the Ctrl+N keyboard shortcut (if you do).

Place your mouse cursor over the Compositing Graph (the window in the top right) and right-click. This should pull up a context menu like the one in the image below:

Context menu

From the menu, slide over to New Filter->Uniform Color. Select it by left-clicking. This will add a new node to the Compositing Graph wherever you right-clicked your mouse. (You can move the node around by left-clicking on it and dragging it. The cursor should turn into a little four-way arrow.) Double-click your new node to view it in the 2D viewer in the bottom window. You should have a nice black square like the one below:

Viewing the uniform color node

Changing the Filter's Color

Black is pretty boring, so we're going to change the color now by using the Filter editor. The Filter editor is conveniently located in the middle of the screen between the Compositing Graph and the 2D viewer where it says 'Filter Type:' followed by a tab for our selected filter. To open the Filter editor, left-click on the color swatch in the middle (which is black, like our texture).

The Filter editor

This will pull up MaPZone's color editor, which should look pretty familiar to anyone who has used a Window's graphics program before.

MaPZone's color editor

The Pick Color dialog provides you with various ways to select a color, but the easiest and most intuitive way is to use the color wheel and triangle widget in the middle. To choose a color, grab the little circles or rings by pressing and holding the left mouse button and drag them around the widget. When you have the color you want, release the mouse button and the texture's color will automatically update. If you decide you don't like the color, you can click the Cancel button to close the color editor and restore the texture's previous color. If you are happy with it, just click the Close button. (Note that the red 'x' button at the top of the window works like the Close button and will update your texture with the new color. If you pressed this button and meant to cancel instead, just press the Undo button on the menu bar to undo the last change.)

The screenshot shows an example color:

Green texture in MaPZone

Additional Notes for People Who Have Never Used a Color Picker: The ring on the color wheel controls the hue, or color; the ring on the triangle controls the lightness and saturation. If you drag the ring on the color wheel without adjusting the ring on the triangle, you may notice that your texture isn't changing color; that's because your lightness is set at 100% dark. To see any color change, you have to drag the ring on the triangle away from the black corner. If you drag the ring along the left side of the triangle, you will only see shades of grey, no matter what color you have selected from the color wheel. That's because you have your saturation set to 0%. To see some color, you need to drag the ring on the triangle toward the colored point. Using this tool, you can literally pick from millions of colors, so have fun!

Adding an Output Node

Now that we have a simple texture, we need some way to get it out of MaPZone. To do this, we need to add an output node to the Compositing Graph. Right-click in the Compositing Graph and select New Filter->New OUTPUT (at the bottom of the menu). This will pop up a small dialog window with a drop down menu. You can give your output node any name you like, but in this case, it's fine to just leave it at the default 'diffuse' (ie. color) and press OK.

Green texture in MaPZone

Now we have an output node, but we need to tell MaPZone what to output. To do this, we need to connect our input node (the Uniform Color node) to the output node (Output diffuse node). To do this, place your mouse cursor over the filter output connector, or pin, (the little left-pointing triangle, or arrow) on the Uniform Color node. It should highlight with an orange border and pop up a tooltip like in the image below:

To create a connection, left-click the output pin on the first node and drag it towards the input pin on the second node

Press and hold the left mouse button and drag the little line toward the Output diffuse node. The line will remain red until it finds an input connector/pin it can connect to.

The wire is red, indicating that no connection has been made

Place your mouse cursor over the input pin (the little triangle) on the Output diffuse node. The line should turn orange to indicate that it is in position to connect to the node.

The wire has turned orange to indicate that a connection is available

Release the left mouse button. The line should now turn yellow to indicate that you have made the connection.

The wire has turned yelloe to indicate that the connection has been established

This is how you connect all of the nodes in MaPZone, although some nodes have a different number of input and output pins and can only be combined in certain ways.

[Official Doc]

Disconnecting Nodes: To disconnect a node from another node, right-click the input pin on the node that you want to disconnect from and choose 'Disconnect'. You can also disconnect nodes by holding down the Shift key and dragging with the right mouse button. This is a handy way to disconnect multiple nodes at the same time. You can also select the input pin on the node you want to disconnect from with the left mouse button and drag the connector to a different node. This is a good way to switch between nodes to compare how they look.

Exporting the Bitmap

Now we have our input node connected to our output node so all we have to do to create the texture is right-click the Output diffuse node and select 'Export bitmap...' from the menu. This pulls up the file explorer dialog which comes with nearly every Windows program in existence and which you should already be familiar with. Pick a destination folder for your new texture, give it a name and click Save. (If you're not sure where to save your file, you can always save it to your desktop. That way you know you can find it. And you can always move it later.)

Exporting the bitmap

Here is a screenshot of my new texture in The Gimp (a popular open source image editor):

My new texture in The Gimp

Saving Your New Map

If you want to save your new texture (or map, to use MaPZone parlance), select File->Save As or press Ctrl+Shift+S. This pulls up the little save file widget shown in the image below:

Saving your new map

Type the name of your new map in the text field where it says 'New' beside 'Title:'. You can select a different folder to save your map to by clicking on the button beside 'Library Folder:' (in this example, the name of the folder you are saving to is 'New', which is MaPZone's default folder for new maps). This will open the Library dialog window. From here you can select a different folder to save to by selecting it with the left-mouse button and clicking 'Ok' from the menu bar at the top right of the window. (Tip: If you want, you can also create a new folder by right-clicking beside another folder in the left half of the Library dialog window and selecting 'New folder' from the context menu. This will create a new folder inside the folder that you clicked beside.)

Creating a new folder in the Library dialog

Save File Widget: Note that, although the save file widget doesn't look like a normal window, it behaves like one. As long as the widget is open, you won't be able to interact with the MaPZone editor. Either save your file or cancel the save to close it and keep working.

When you save a map file (which has a .map extension), you're not saving a bitmap image, like the one that you see when you export your texture; you're saving all of the node information from the Compositing Graph, the instructions that tell MaPZone how to recreate your texture the next time it opens it. By uploading your .map file to the web, you can share your new map with the MaPZone community so that others can see how you created your awesome effects, or get help troubleshooting your maps when you run into problems.

Conclusion

A uniform color texture may not be much to look at, but this simple example demonstrates many of the basic principles of using the Compositing Graph and exporting bitmaps in MaPZone. As you can see, the Compositing Graph is essentially a flowchart showing how all of the different elements of your texture fit together to create the final image. Later examples will be more complex, but this quick overview should give you a pretty good idea how things work in MaPZone.

Last updated October 21, 2011

© 2009-2011 Dave Finch

SUPPORT TRUANCYFACTORY