2008 Sep. 26

Posted by Marko under section Map Making
Trackback URI | | View Comments (2)

The basics

This very first post will explain the basics of Sandbox2. There are 2 really basic things you need to lean : creating the most basic map and moving around.

 

Let's start with the basic map : You first need to grab Sandbox2 from your Crysis CD and install it. Once installed, open the Sandbox2 editor (Editor.exe, default path would be "C:\Program Files\Electronic Arts\Crytek\Crysis\Bin32\Editor.exe"). In the top left menu, click File > New. Enter a Level Name, leave Use Terrain checked and click OK (screenshot below, on the left). You should end up with a plain level (screenshot below, on the right)

 

In the menu, click Terrain > Edit Terrain. This will open a new dialog window which lets you edit the terrain heightmap. This is only the rough sketch of your final landscape. You can fiddle around with the options in there and with the left mouse button, add terrain, the right button will erase this. You have to think of this as a view from above. The closer you are to white, the higher the terrain will be.

Once done, click OK. Then go in File > Generate Surface Texture, leave all the default options and click OK. It will take a few seconds to compute and will quickly give you a nice looking view of your map, with a water base and grass on your terrain. We will see later how to change this and make it better.

 

 

Now you have a basic landscape running, it's time to have see what your map looks like in game. Save your map and hit Ctrl+G or in the menu Game > Switch to Game. There is a glitch on the crytek editor that sometimes won't load you in game and put an error in the console at the bottom of the screen :

[Error] Failed loading map texture id 0.

If you encounter this, simply reload your map (File > Open) to get rid of the problem. To switch back from the game to the editor, just hit Escape key.

 

We're going to move closer to this new landscape it in order to apply a couple of textures, add models & stuff. Use your keyboard arrow keys to move around (you can also use W, S, A and D). The mouse right button will let you rotate the camera in all angles. Let's add a new texture, other than grass to our texture set. In the menu, click Terrain > Texture. You will get the following window :

Simply click the "new" button (highlighted in red in the screenshot above) and give it a name: "sand" will do fine for the moment. Select your new sand texture and click the Load Texture button (highlighted in red too in the screenshot above). Just pick any odd sand texture you find. I chose beach_dirt.dds. This has given you a new texture to use on your terrain. Now switch to the RollupBar (by default, this is the tolbar you have on the right side of the screen. If you can't see it, just click View > Show Rollup Toolbar. In that tool bar, you need to click the Terrain icon and then pick the Layer Painter sub-menu :

This will extend the toolbar a little more. In that new section, you will be able to pick the texture of your choice (we only have 2 right now : Default and sand). Click on sand, and use the mouse left button to apply sand texture to the terrain :

 

2008 Sep. 24

Posted by Marko under section Map Making
Trackback URI |

Adding a single player spawn point

Adding a spoint point in Sandbox is far more brain twisting that classic Quake 3 engine games. It took me a little moment looking around various tutorials to figure out how it's handled. Here's the steps you need to follow to set a spawn up for your player :


Adding a spawn is done via the RollupBar (displayed by default on the right part of the Editor screen). If you can't see it, just go in the View menu and click on Show RollupBar. Once you have it displayed, look in the Browser menu for the Others folder and pick the SpawnPoint entity. Drag the entity on the map then select it with your mouse to display the entity settings. The different spawn point settings will be available in the RollupBar. In the entity menu, look for a Flow Graph section and click on the Create button.

 

A new menu will show up giving you the ability to edit your flow. In the middle pane, right click to pick the Start node (right click, Add Node > Misc > Start) then right click again and pick Add Selected Entity. You should end up with 2 boxes that you now need to link together to create a logical flow. With your mouse, create a link between the Start entity Output and the SpawnPoint entity Spawn function. This means the game, upon starting, will assign this spawn point to the player.

 

2008 Sep. 23

Posted by Marko under section Map Making
Trackback URI |

Manually Editing Terrain to improve detail

Now you've got the basic part going, we're going to focus on details. In this tutorial, we are going to take a closer look at our terrain in order to make a nice looking beach.

 

In the Rollup bar, click on the terrain icon, then on Modify. In the previous tutorial, we painted an Alphamap directly, meaning it was very rough terrain design. The Terrain Modify menu in the Rollup bar lets you edit the terrain with a much higher level of detail. On you have the menu open in the Rollup Bar, look at the Brush Settings area. This is where you wil specify how you want to alter the terrain (a first drop list lets you flatten, smooth, raise or lower the terrain when clicking with the mouse). Adjust the last settings to increase / decrease the radius of the modification, it's density (hardness) and the amplitude of the change (height). After a couple of minutes, here's a nice smooth slops with a couple of ridges on the sea shore :

 

 

 

2008 Sep. 22

Posted by Marko under section Map Making
Trackback URI |

Adding vegetation to the terrain

Adding vegetation is very simple with Sandbox2.

 

Open the Rollup Bar once again, in the terrain section and click on the Vegetation button. Click on the little green tree highlighted in red on the screenshot you see on the right to pick a tree model. Take any palm tree model from the list. It will add to youe Objects lists meaning you will be able to grab it back very quickly by clicking on the model you want in your list. You can use the Paint Objects button when you have a model selected to toggle the tree planting on / off.

Using vegetation like this will improve your map quality. You have to be aware though that you can greatly improve the look of your tree by using the settings in the lower part of the Vegetation menu :

  • put a value in SizeVar to randomly alter the size of your tree and check the RandomRotation box to randomly rotate them. This avoids having an ugly look if you make a dense forest with the same tree (Sizevar values between 0.3 and 0.7 looked good)
  • check the AligntoTerrain box to avoid having weird effects. This ensures your tree is "planted" into the land and not slightly hovering above.
  • check the UseTerrainColor box to have a smooth colour transition between your tree foot and the land it is resting on. This switch dosen't always work correctly.
  • check the CastShadow and ReceiveShadow boxes to force your trees to cast shadows on the other objects and to draw shadows casted from other objects on them
  • if you are on a large scale landscape (not narrow but opened and visible from far away) check the UseSprites box to force the engine to replace the tree model with a sprite (improves in game performance)

Using exactly the same technique, you can plant many other things than tress (broken wood, rocks...). When you want to use grass, respect the 2 following rules for better "cosmetics"

  • Always unckeck the CastShadow checkbox on grass. It will make you loose performance and not have a high added value (grass shadows are hardly noticeable)
  • Uncheck the UseSprites checkbox. Grass will look akward from a little distance if you replace it with a sprite

 

If you stick to these rules, you will quickly get a nice looking vegetation in your map as on the screenshot below :

Next Page