Demo Level Info
The Tech Demo level is not up yet, but i thought i would post some tips for improving performance for those who don’t have very fast machines.
The level was whipped up in about 5-6 hours, including learning the new editor. I didn’t spend much time trying to improve performance too much through object LOD settings and occlusion tricks, so there are a few things you can do to speed things up.
Probably the biggest performance hit is from the size of the terrain. Its an 8192×8192 size heightmap, which is essentially 8.192 kilometres by 8.192 kilometres. Pretty big. In a move that will annoy some people, i actually flattened the geometry outside of the demo area, to try and improve performance a little, but just how much better it is i couldn’t be sure. The next biggest performance hit comes from the automatically distributed vegetation, which is set up to evenly distribute certain vegetation species across particular terrain textures. Modifying these will help greatly with performance.
To access the vegetation controls, click the Terrain Rollup Bar (1), then Vegetation (2) and then double click on the “default” category under Objects (3).
A list of all the different vegetation objects will show up. In a real level, you would create categories for different vegetation types, or define categories based on use, but here they are all in together, including rocks. Next to the name of the object, is a number. This number is how many instances of that object is in the level. Most of the species that are automatically distributed will be zero, or there might be only 1 if i placed one manually somewhere.
When you click on any object that’s automatically distributed, the editor will probably hang for a few seconds. I don’t know why exactly this is, but i think its because the editor is preparing to make changes to all the instances of that object throughout the map. There can be thousands, so it probably takes a second or two to prepare itself.
You can try to adjust the Density value, which i think is a value in metres. The lower the number, the higher the density.
CastShadowMinSpec controls what spec machines will cast shadows for that object. The object “tall_grass_b” is set to “High”, so only machines running the editor in High Spec mode will cast shadows for that object. Change this value for other species if your finding performance is still too low.
SpriteDistRatio controls the distance the transition from 3D mesh to 2D sprite happens and MaxViewDistRatio controls the overall draw distance. Modifying these can have great results for all objects. Some of the grass in this latest engine is pretty crap, and is only flat billboards anyway, i dont think adjusting the SpriteDistRatio values will help much, but for actual 3D objects it will.
Scrolling to the very bottom of the properties Rollup Bar under the Title “Use On Terrain Layers”, is the check box for disabling the automatic distribution for that particular object. If you can’t adjust the settings to find a happy balance between performance and quality, just disable that vegetation object completely.
If you simply can’t improve performance, you can change the machine spec under the Config Spec menu at the top of the Editor. You will sacrifice some graphical features, but if your at this point, only an upgrade will help.
A few little things you guys might like to play around with is to add detail layers to some of the objects. The large concrete heli-pad structures have detail textures applied to them, so as you get closer you can see fine bumps in the concrete. These are not real normal maps, and are just a generalized tiling detail bump map. Most of the Trespasser models are lacking these, so you can add them yourself if you like.
To change these settings, you will need to play around with the Material Editor. This can get a little complicated when your doing it for the first time, and to be honest, CryEngine’s material editor has its fair share of quirks.
Start by clicking the Cross shaped icon that’s just under the Prefabs menu at the top of the editor. This is the move objects controler. Once this is selected, objects you hover over should be highlighted.
Click the object you want to edit, and press “M” to bring up the Materials Editor.
At the top of the materials editor, the third icon across is the “Get Properties From Selection” command. Pressing this will open up the material file for the selected object. Once pressed, it should load up a directory tree for all the different objects throughout the level. Clicking the plus next to one will show all the individual layers for that object.
Now for a regular model that uses a UV map, there may only be a few layers, but because Trespassers models did not use traditional UV’s, there are many different layers. I have tried to name each layer appropriately, to make it easier to understand what each one is. Proxy is simply the layer used for the invisible physics collision mesh. I don’t know if these are still used in the latest version. Ignore this layer.
When you click a layer, displayed on the right are all the controls for that layer. You can adjust things like brightness / colour (1), opacity (2), specular (3) and surface type (4), which controls what footstep sounds to use when you walk on it, and what effects to show when you shoot that texture. On the right is a list of the textures used. Diffuse (5) will probably be the only one there, so click on the three dots (6) next to Detail and navigate through the GameSDK/Textures directory until you find an appropriate texture to use as a detail bump map.
You will need to play around with the Tiling controls (7) to get it looking right, you will find these by clicking the little black arrow (8) next to the texture maps name. Take a look at the settings used for the Heli-Pad to get an idea on what to use.
Don’t be too worried about changing these setting, you can’t really break anything. If you have any trouble, just open the original archive and navigate to the directory for the object you edited and extract the material file again and overwrite the one you changed. You might have to restart the editor though for the changes to take effect.
Please don’t email me or leave comments asking how to do specific things in the Editor. Only if its directly related to the above information. If you want to learn more about the editor, visit CryDev and have a read through the forums there and be sure to use the search function first, as they will no doubt tell you you should have.
I wont be releasing the 8192 heightmap i used for this level, but you will one day have access to a 4096 size version of the full island when i release the CryEngine 2 level. The difference in size is not exactly big.. well it is, but not something the casual player will notice. Trespasser fans will notice it around the Town, but its hard to spot elsewhere.
Once i get word the level has been posted on TresCom, ill update the blog. In the mean time, be sure to download version 3.5.7 of the editor and start practicing. You don’t need to buy the engine on Steam, just download version 3.5.7 of the free SDK.
Here’s the link to the DL for 3.5.8: http://www.crydev.net/dm_eds/download_detail.php?id=4. At the bottom are links to previous versions. 3.5.8 might work fine, but i’ve never used it.