CryEngine 2 Sandbox – Creating your first level

Creating a level with CryEngine 2 – SP Demo Release

Load up the CryEngine editor and create a new map, name accordingly and click ok. You should be greeted with something that looks like this

Not very exciting, the view is black because your camera is under the water and at position 0,0,0 in the level.

Let’s change this, click on file and goto “Generate Surface texture”. This will setup the relevant files in the level.pak and allow us to see what’s going on.

Leave the settings as they are and click ok.

After a second or two, the level should look bluer and brighter. You’re currently underwater, so fly up and take a look at the ocean below you.

As you can see, the white square is the terrain. We now want to setup the terrain texture and start creating a level. The first thing to do is find the center of the map. You don’t want to start making a level at the edge or you’ll run out of space.

A good trick to finding the center of the map is to goto Terrain -> Edit Terrain on the top tool bar.

When the terrain overhead appears, simply click in the middle of the water a couple of times. This will reveal a hill of terrain that you can use to find the center of the level.

Close the Terrain map and find the hill it created, fly over to it. This is the center point of your map.

Next up, create some terrain using the terrain edit tool. For now, something simple like a small island. I’m not going to go into detail with the terrain tool at this stage, there are other tutorial that will cover this in more detail.

Here’s where things get a little more interesting. You’ll notice on the roll up bar on the right side of the editor is the Layer Painter button. Click this and take a look at the settings.

Pay particular attention to the Filter section, the To Layer button, the 1 button and the Color Browser (the white square).

These buttons control the terrain texture painter color settings. It’s this section that will allow you to control what color the terrain will be and give you infinite possibilities as to the color of the ground texture in your level.

Right now we only have one terrain layer, called Default. Default is the layer you can see in the picture above, rather dull. Let’s turn it into some grass.
Click on the white square. Here is where we pick a color for the terrain. Select something Grassy, not too saturated is best, then click ok.

IMPORTANT: The color you have selected will only be saved IF you click the “To Layer” button. If you do not do this, the color will return to white.

You can adjust the brightness of the color you have picked with the slider below the word “filter”. If you want to return the brightness to default, click on the “1” button.

So, now we have a simple color setup, let’s paint the terrain with it. Increase the radius of the painter and paint your island.

We now have a rather ugly green island. The terrain texture doesn’t have any detail and is completely toneless. Let’s fix that

Our next task is assign a detail texture. Detail textures are what give the ground layer it’s natural appearance. They contain all of the things you see when you look down at the ground such as grass, leaves, concrete, cliffs etc.

To assign them, goto the Terrain Texture menu.

This is the Terrain Layers Editor. Initially it will seem pretty complicated but it’s actually very versatile. Notice the “Default” Layer, this is the layer you painted earlier. We’re going to assign a detail texture and a distance texture to this layer.

Let me explain these a little more

There are three components that make up a terrain layer. The detail texture, the distance texture and terrain color. The first two are defined in the menu above, the third is defined in the terrain layer painter that we previously covered.

In a CryEngine 2 level, when you look down you’re seeing the detail texture at your feet which has been colored using the layer painter. The distance texture provides a neutral “tone” to the terrain in the distance. This texture is tiled over the terrain to give slight differences and variation in the distance so you don’t see a solid color on the hills in the distance. Generally, these textures are very neutral, often greyscale.

You can see the distance texture in the image below. It’s tiled over the terrain throughout the level.

The slight changes in brightness you see below on the ground are being created by the distance texture, there is no detail texture visible.

The first thing we’re going to do, is assign the distance texture. We do this by clicking on the black square in the Terrain Layer Editor, or by clicking on Load Texture.

Click on Load Texture

In the Crysis SP demo, there are two textures available for the distance texture. Select and click open. It’s important to note that theoretically you can build and entire level using only ONE distance texture.

Now that we’ve assigned a distance texture, it’s time to give the ground some life and detail. This is where we make the grass actually look like grass.

Click on Edit Surface Types in the Terrain Layers Editor

This is the Surface Type detail layers editor. Here we can assign a detail texture. Select the layer you wish to assign (in this case Default) and notice the material name currently assigned. This material isn’t part of the SP demo and for this reason, doesn’t appear in your level. We need to assign something else.

Click on Material Editor

This is the material editor. I could write an entire guide on this alone, but for now scroll down and find a material called plains_grass_green_and_dry.

You’ll notice most of the materials in this list are not usable, this is because they are not included in the SP demo. You can see which are included, by moving your mouse cursor over the word Diffuse in the material properties. This will bring up a preview of the texture. If it appears (like in the picture) it can be used in the demo version of the editor.

Close the material editor with plains_grass_green_and_dry selected.

Click on Pick Selected, then Ok. You may want to adjust the X and Y scale mapping at the bottom to adjust the tiling of the material. 0.5 is a pretty good value.

Close the Surface Type window and the Terrain Layers Editor.

The terrain should now look something like this:

You should now recompile the Surface Textures (file -> Generate Surface Textures) and Export to Engine (file -> Export to Engine).

Note: Export to engine is essentially writing your level data to a format CryEngine 2 can understand. The .cry file is NOT loaded by the engine. The level data must be saved into the level.pak first. Everytime you make a change you will need to export to engine for that change to appear in game.

Our island is fairly dull right now, we can brighten it up by importing a pre-made time of day setting.

Goto View -> Open view pane -> Time of day

When the time of day editor opens, click on Import from File and browse the SP Demo/Editor folder. You’ll see default_time_of_day and default_time_of_day_MP. Pick either one and click ok.

Once open, move the time of day slider to 10am or 2pm. This make sure shadows are not cast straight down, which will look odd.

Close the Time of day editor.

Your level should look much more lifelike now, brighter and crisper.

Continue to page 2 >>

Leave a Reply