| Download the
PCX file
used in this lesson. |
|
|
Terrain Construction Purpose: Explain how to create a custom terrain for D3 levels. Author: Charles “Stormcrow” Featherer Setup To complete this tutorial, you must have the following loaded and ready on your computer: 1. D3Edit Level Editor version 1.0 or higher - The earlier versions offer NO terrain support 2. An image program (I used Photoshop, but I believe you can use Paint Shop Pro or any other program that allows you to create and manipulate files in the .pcx format) My frame of reference will be from the way Photoshop handles images, but the terms I will use should be understandable to everyone interested in using other image editors. The Concept: I’ve attempted to explain this before in a forum, but I’ll try to do so better here. In able to ‘Create’ terrain features in D3Edit, you must import a file of type .pcx to the D3 editor, which will create your terrain for you. You can not actually create canyons, hills, valleys, ridges, or any other geographical feature directly in D3Edit, nor can you modify a terrain other than texturing its surface. To create canyons, hills, etc., you must create a 2D image file that will represent the terrain when imported. Use your imagination for a moment, and attempt to follow what I am going to describe. If you like, you can skip this section, I am only trying to explain visually how the process works. When we move on to the technical side of the process, all will become clear, I promise… If you would imagine a flat sheet of paper before you, you would be imagining something that is 2-Dimensional. The sheet has no ‘depth’. Yet, if you fold it in half and open it again so that there is a crease in the center, then you have created a form that has 3-dimensions. Ok, let’s go back to that flat piece of paper. Color it as black as possible, using a dark pencil. Looking at it, you should now have a 2-dimensional black piece of paper. This is the default terrain of D3Edit. The dark area (which encompasses the WHOLE piece of paper) is ‘Sea-Level’. If you were to erase a few small areas on the page, so that you were left with some white areas and gray areas (gray on the borders of the black leading to white) you would have created some geological formations. Maybe one of your white areas is rather large and bordered on all sides by black areas. This would be a ‘mountain’ or a chasm wall. Now, lastly, lightly erase a section of your paper. Leave it somewhat dark. This area would become a hill or a plateau (since it’s no longer black-Sea Level, nor is it fully white-mountain/cliff top height). Have I confused you enough? If you’re shaking your head at this point, and wondering what the heck I’m talking about, don’t despair. I will make it as day for you in the next two sections. Viva La Art: Either you’re still with me, or you’re begging for me to clear up the question that’s been plaguing you since I started this tutorial. Ok, here we go… Open your image program. Again, you can use Photoshop for this process. If you don’t own Photoshop, try downloading Paint Shop Pro from the Web. MS Paint, although I believe capable of at least viewing .pcx files, is NOT an acceptable image program for creating and modifying .pcx files. Ready? Select under ‘File’ to create a ‘New…’ document. Use these settings in the dialogue box that appears. Under Image Size, set the Height and Width to 256 pixels. Leave the resolution at the setting already selected. Select the setting ‘Grayscale’-you could do this in RGB color, so long as none of your work is down in color pixels, but I found its easier to just set the image format to Grayscale at the beginning of the project. Photoshop also allows you to select the current contents of the image. I recommend selecting ‘white’. Click ok to begin work with your new document. Go ahead and save it at this point (if you label this ‘terrain’ as default, all of the settings we just made will be available to you next time by merely opening the default terrain). Notice the document is white. If we were to import this .pcx file now, your level would be one giant mountain, with no sides. Since we don’t want that, let’s play with it some. First, let’s create our ‘Sea-Level’ area. This will be the lowest point on your map. Grab a paintbrush, set it to a fairly large brush-tip size, and fill in MOST of the .pcx image with black ink. Leave the borders white for now. Remember, that the more of the borders you leave white, the smaller the terrain that can be fought upon will be. Let’s add some hills. Select a dark gray color for your brush (make sure you make the tip smaller) and dot your landscape of black with gray. If you’d like some of the hills to rise higher, select a slightly lighter shade of gray and paint the center areas of the hills you’d like to be taller. You can use increasing lighter shades of gray to build up the height of any hill. Alternately, you can darken the centers of hills to create depressions, as if a meteor had hit the hill. To create a ridge, select again a dark shade of gray and paint a line. Inside of this new area, build up your shades of gray, increasingly lighter until you have achieved the desired height. To make a mountain, paint a small area gray, and work the shades of gray inside the area all the way up to pure white. The white area will be the peak of the mountain. To make ravines, paint some gray lines, build up from there using lighter and lighter grays. The areas between the lines still be dark, and will serve as ravines. Using these basic guidelines, and taking some time, you can create nearly any geological feature that exists in the real world. However, there is a small problem that must be contended with before you import this image into D3Edit. You should ‘blur’ everything. From the edges of your fields to the edges of your map, you need to smooth out your work. First, save your file if you haven’t done so already. If you’re working in Photoshop, as I am, this is your chance to save it as a .pcx format file. Make sure you select that option from the drop down menu in the save dialog box. Once you’ve done that, there are three different ways you can blur your image to smooth it out (you must do this if you want your hills, ravines, mountains, etc…to have slopes). 1. Use the blur tool to ‘hand’ blur various features. Varying the brush size will give you different effects, and should be used liberally. 2. Use the Filter->Blur->Blur feature of Photoshop to smooth the entire image. Be careful using this though, as you may smooth areas you’d like to leave flat. 3. Use the Selection tool to select a
particular feature of your map, then use the blur filter as previously
mentioned. This allows for
greater control than just applying blur to the entire terrain and is faster than
using the blur tool to smooth out the terrain by hand. |
|
|
|
|
|
Now, I’m going to leave this part up to you, but I’ll point out some things in the terrain1.pcx file I’ve provided. Looking at it…can you see the ridge on the right hand side, running for have the screen? Can you see the two mountains and the ‘volcano’ (the volcano has two points of access and a lower basin)? Do you see the four hills in the upper left hand corner? You have to use your imagination a little bit at this point (or look at ex. b -schp), but now that I’ve pointed out these features, I’m sure you can spot them. Part Deux: Assuming you’ve created a .pcx file you’re proud of…save it and get ready for the longest point and click session you’ve ever experienced. Here’s were we REALLY get to work. Start D3Edit, and either start a new level, or open one you have worked on before. Don’t open a room, since terrain work is ONLY supported in the world view of a level. To continue, highlight the world view window and maximize it. Close all of the editing boxes except for Tr and Tx (terrain and textures). Now, assuming you’re all set, click on ‘Import PCX’ in the terrain box. Find your .pcx file and select it. Rotate your viewpoint so that you’re looking down at the terrain. Notice anything different? If you did everything correctly, you should have something other than the flat, default terrain. Feel free to use the image I have provided to test this feature, and if you actually like it, I have no problem with you using it in your level (so long as you give credit J ). To texture it, click on Available Textures… in the texture editor box. Click on terrain textures, let them page in, and scroll down to a simple ground texture. Click and drag it into the Custom window of the texture box. Texturing the surface of your terrain is a little bit different than texturing your rooms in your mine. Instead of being able to ‘Mark’ areas and apply textures to a large group, you must do them individually, one-by-one. To do so, follow the steps below: 1.Turn off Z buffering (click on the Z on the toolbar) 2. Click on the name of the texture you want to use in the custom window of the terrain box. 3. Right click on the world view map, and select to View Textures. 4. Holding down the Shift key, use your left mouse button and click on a cell in the terrain. You’ll have to do this a lot, so get comfortable J. 5. Rotate and change your view point to make sure you get all of your landscape. Save your work often…and I mean often. You must do this before changing texture types, as adding a new texture to the landscape seems to make D3Edit more prone to crashing. Don’t call me up after you spent 3 hours texturing your level and forgot to save it before you went and changed the texture you were using on the surface. That’s it. The real landscape is created in the image editor, and D3Editor is used to create the textures. I don’t have any good information on lighting the terrain, but if I get some I’ll more than willingly post it. As for building your level through the surface of the terrain, there is currently some very good info available in the D3Edit forums. I would like to offer my appreciation to both Schplurg and DarkHorse for all of their help so far with my many questions about D3 Edit, and I’d like to thank Gwar for all of the work he’s done so far on the editor. |
|