Crysis Mapping #2
In the previous tutorial (Here) we created a basic landmass.
But this landmass has only a texture and shape but no trees, grass or any other sort of life on it.
We will now show you how to add vegetation, some objects and an A.I.
2. Setting up and placing your first piece of vegetation
We will first place some trees after all, the spiritual successor to far cry without trees is like a fps without guns :p
Go to the roll-up bar to the right and select the terrain tab, and click on the vegetation button.
Optional: You can create a vegetation category to separate your grass and trees but this is not necessary
I usually don't use the categories but i will probably use them when i start using allot of vegetation.
Since separate categories for 3 trees, 1 patch of grass and 2 rocks is a bit overkill :p
Now press the add vegetation button and we will start adding some vegetation to our list :D
Navigate to ./data/objects/natural folder and start selecting some out of the folder :)
NOTE! As with allot of stuff in the demo editor, some objects and textures might be missing :)
For this tutorial, pick 1 tree and 1 grass patch (doesn't really matters which one, you can experiment later :D)
First select your tree and look at the properties window.
I will explain the important settings and give a recommended value between ()
- Size: The maximum size the vegetation can have (depends on the type of vegetation test and see)
- SizVar: How much does the size varies among the vegetation (between 0.5 and 1)
- RandomRotation:Gives the vegetation a random rotation when placing (true)
- AllignToTerrain: Places the vegetation so it doesn't clip into the terrain
- UseTerrainColor: Blends he vegetation with the texture color below it (sometimes doesn't work so you need to try and see if it does, if it doesn't work, just leave it)
- Bending: The procedural bending of the trees (0.8 is a good value)
- Density: The density of the trees when painting vegetation (varies)
- CastShadow: If set to true, the tree will generate shadows on the terrain and other objects - if they have the receive shadow setting set to true - (a must have, true)
- RecvShadow: If set to true, this tree will also receive shadows (true)
- UseSprites: If set to true, imposters will be used* (true)
*imposter = when the trees are far away, they will be replaced with sprites to increase performance.
Experiment with these settings later on (don't forget to give them to the grass patch to)
Now we are ready to finally place some trees :D
Select the tree you want to place, hold shift and left click on a spot on your terrain.
There is the tree :D
Now placing a entire forest/jungle in this way will be gruesomely slow so the people at crytek gave us the vegetation painter :D
3. The vegetation painter
This tool will allow us to paint vegetation in the same way we paint our terrain or our textures.
Click on the Paint Objects button.
You should change the brush radius to something (its up to you :) it depends on what you need)
Now hold the left mouse button in the perspective window en move it across the terrain and trees will pop out of the ground :D
Now place some trees and grass(or a rock if you have added it)
Just click on the desired object and choose one of the two placement methods.
4. Return of the Generate surface button
In the first tutorial we used the generate surface command to make our texture shows up.
Now we will generate a higher quality surface.
Why now when we are making our vegetation and not when we where making the terrain texture i hear you ask?
Well it has a option wich enhances the tree shadows that's why ;)
You should have seen this dialog box in the first tutorial but ignored the settings.
We will now take a closer look at the settings :)
The resolution of the texture allso depends on the computer you are using to make maps.
Generating higher resolution textures require a higher end computer
But 4096x4096 looks good enough for now.
The High Quality checkbox makes the texture higher of quality, tick this box :)
Calculate Terrain Sky Accessibility, this is the option wich makes the shadows look better :D
People who mapped for HL1, 2 or CS can compare it to the RAD step in compiling :)
On my computer this step takes 2-3 second to complete (small map with 20-30 tree) so its pretty fast
So the "...can take more then 1 hour) only applies to the larger maps with big jungles :)
This can be a result of the previous steps (minus the shadows that is)
5. Getting some artificial life into the map
So what does every fps needs except weapons?
That's right...victims, targets, innocents call them whatever you will like :)
There are 2 ways of placing the A.I.: As a normal entity or as a Archetype Entity
5.1. Placeing as a normal entity
Placing them as a normal entity will give you a little more controll over the AI then a archetype entity but takes a bit more time setting up.
Go to the objects tab in the roll-up bar and press the entity button.
Naviagate to AI>Grunt and drag it into the perspective window.
If you cant see them, check that your axis constraints are set right:
These 2 settings can help you setting things to the ground :)
So if your grunt entity doesn't shows up, select it (either by clicking on it or using the selection dialog (CTRL+T)) and delete it by pressing Del on your keyboard.
After you placed it into your level, you will notice that he wont show up
This is due to the default model not being in the demo -_-
Select the entity and look for the model tag in the properties window.
click on it and then on the open button.
this will bring up the open model dialog.
Now i don't exactly know which models work and which don't but most of the light_*.cgf files work.
Choose a model file and if the guy shows up in the perspective window you have picked a working one :)
Now press AI>Generate all navigation in the top toolbar.
This will set up the standard waypoints so that the AI can run around (for cover that is :p)
But he wont have any weapons, so we have to give them some.
If you have deselected him, select him again and look for 'equipment pack' in the entity properties window.
Press the button with '. . . ' and the pack editor will open up
Assign him a pack or make one yourself (just make shure that you don't give him the TAC Launcher)
NOTE!: You need to press the reload script button or else he wont use this (this is a bug in the demo editor and should not be needed in the full version)
So now we have placed a AI entity, gave it a working model and equipment.
Lets shoot him shall we :D
Press CTRL+G to jump in-game, he will start firing at you (except when his equipment pack was empty) so make him pay XD
5.2. Placing a Archetype entity
So what is a archetype entity i hear you ask? well it is not a entity from the fear factory album i can tell you that -_-
You an see them as premade Grunt AI entities with model, equipment pack and scripts already attached.
So go to the objects tab and press the archetype entity button
But...its empty? great you broke crysis -_-
nah just kidding, the game doesn't have the necessary libraries loaded.
So open up the Database view by going to view>open view pane>database view
This will open up a window with several tabs
We need the first tab :)
Click the load library button and load asian.xml or asian_new.xml
Now you can close the database view and check the archetype entities again, now they are there :D
If they arent there, click the reload button.
Still not there, you might have done something wrong then :)
So select a entity and drag it to the perspective view(again only the light_* ones work)
and poof, he is there (if you picked a working one that is :p)
If you haven't done so, click AI>Generate all navigation in the top toolbar
Ok so the tutorial came out a little bit longer then i expected (wasent planing the AI section :p) but it came out ok i guess :p
You should have a small jungle with some trees, grass(and maybe even a rock :p) and some AI
Next tutorial will cover the basics of the flowgraph so we can get some interaction going :)
but that will be a long tutorial i thing :p
See you next time :)
PS: The TAC Lancher is the portable nuke launcher ;)
PPS: rollupbar>entities>items>taclauncher ;)