Creating your first gm_flatgrass
Before doing anything check here first; Getting Started With Hammer
The purpose of this guide is to jump into Hammer and start creating something, in this case, we will be recreating
For more documentation and tutorials on Source 2 mapping, refer to the Mapping Resources Page.
Note: This guide uses the version of Hammer that is included in Half-Life: Alyx
If you plan on uploading your map, Create your map by following Getting Started With Hammer
'File' > 'New' ( ctrl + n ) to open a new map and then 'File' > 'Save' ( ctrl + s ) to save as gm_flatgrass. (This may cause compiler to complain that the vmap is not inside one of your created addons.)
From left to right we will be using the following modes: Edges ( 2 ), Faces ( 3 ), Objects ( 5 )
These three selection modes are the bare minimum to create this map, you can switch between them by pressing the number keys that represent their position.
After picking the Selection Mode, you may also choose which Tool to interact with.
You can find tools on the left side, in this guide we will use the following:
|Selection Tool ( ⇧ shift + s )||Select geometry elements, objects and groups. You can also use this to resize them.|
|Move Tool ( t )||Move your selection along the X Y Z axes.|
|Rotate Tool ( r )||Rotate your selection along the X Y Z axes.|
|Entity Tool ( ⇧ shift + e )||Place any type of point entity such as: player spawns, AI spaws, logic entities, props|
|Block Tool ( ⇧ shift + b )||Create basic geometric shapes such as: Quad, Block, Cylinder, Spike, Sphere|
|Clipping Tool ( ⇧ shift + x )||Slice geometry, cuts must be made in the 2D viewport and confirmed with ENTER.|
Crash course on everything else we will be using on this guide and a short description. I suggest you look at this video tutorial to help with the layout.
Object Editing: Depending on the Tool and your Selection Mode, this section will have different options to interact and modify the selected geometry.
Compile & Play: Opens the compile tool to run your map, use Fast Compile while working.
2D Viewport: Shows an orthographic view of the map from any direction. You can shift views by pressing Top ( f2 ), Front ( f3 ), Side ( f4 )
Assets Window: Props, Materials, Prefabs etc... You can drag and drop from the Asset Browser that opens when running the workshop tools as well.
Object Properties: While having an object or point entity selected you can modify its scale, position, rotation, and any properties it might have.
Grid Settings: When moving or resizing an object, it will snap to the smallest amount of units you have selected. Most of the time we will use 64, 32, 16, and 8 units.
w a s d to move the camera in the viewports, scroll to Zoom-in/out and hold right-click to rotate.
With the Block Tool ( ⇧ shift + b ), select Quad in the Object Editing window, make a plane that is 2048x2048 units. The bigger your map is, the longer compiling takes, so for now we'll keep it small and enlarge it when we're ready to finalize.
You can use the Object Properties to center the plane in X: 0; Y: 0
With the Entity Tool ( ⇧ shift + e ) selected, from the Object Editing window place the Player Start, Sky, and Environment Light. Make sure to rotate the light having the arrow face down using the Rotate Tool ( r )
Slap a grass texture on the plane and do a Fast Compile, if all you wanted was a literal flatgrass then you have finished the tutorial.
With the Block Tool ( ⇧ shift + b ), select Cylinder in the Object Editing window, make a cylinder that is 512x512 units and has 64 sides, place it in the center.
With the Clipping Tool ( ⇧ shift + x ) and working in the 2D Viewport, slice the cylinder in half by pressing enter to confirm, then slice in quarters.
In the Object Editing window remember to have the third Keep Mode selected.
While in Objects Selection Mode ( 5 ) use the Move Tool ( t ) to separate the sections an equal distance from each other.
While in Edges Selection Mode ( 2 ) use the Selection Tool ( ⇧ shift + s ) to select all the edges on the side which is missing a face of two opposite sections. To select multiple edges at once you can hold ⇧ shift while clicking on the edges.
After you have all the edges selected like in the picture Bridge ( b ) them and, through the Object Editing window, select only 1 Step (Only 1 straight face will be generated) then press enter to confirm.
Repeat on the other side.
Select the edges of the remaining faceless side by either Double Clicking or Select Loop ( l ) in the Object Editing window after selecting one of the edges.
Fill Hole ( p ) to cover the face, repeat on the other side.
While in Objects Selection Mode ( 5 ) select both foundations and use the Selection Tool ( ⇧ shift + s ) to make them taller by dragging the arrow facing upwards.
Using the Move Tool ( t ) and while holding ⇧ shift, move both foundations up to clone them.
We will be using these clones to create the concrete slabs that separate the two foundations.
While in Objects Selection Mode ( 5 ) select both slabs and use the Selection Tool ( ⇧ shift + s ) to make them shorter by dragging the arrow facing downwards. I suggest changing the Grid's size to a smaller value like 16.
Using the 2D Viewport to help, place the slabs on top of the bottom foundations with the Move Tool ( t ).
While selecting one slab at a time, slightly make them larger on each side to create an overhang.
Using the Move Tool ( t ) and while holding ⇧ shift, move the bottom foundations up to clone them. Resize these new top foundations one-by-one to make them shorter and just a bit thinner on each side to accentuate the concrete slab's overhang.
While in Faces Selection Mode ( 3 ) select the inner 2 faces of the top foundations and Delete ( del ) them.
These brick foundations will have a wide arch that connects them.
With the Block Tool ( ⇧ shift + b ), create a cylinder with 32 faces that is as wide as the top foundation's height (In my case they are 160 units).
With the help of the 2D Viewport, Rotate ( r ) the cylinder 90° and place it exactly in the center of the two top foundations.
Using the Selection Tool ( ⇧ shift + s ) resize the cylinder to be exactly as deep as the top foundations.
While using the 2D Viewport and the Faces Selection Mode ( 3 ), select the bottom half of the cylinder and Delete ( del ) it.
Delete ( del ) the front and back faces as well.
While in Objects Selection Mode ( 5 ) select the half cylinder Flip Faces ( f ).
Using the Clipping Tool ( ⇧ shift + x ), cut the object in half and with the help of the 2D Viewport Move ( t ) them close to the top foundations and on the concrete slabs just like in the picture.
You might want to lower the Grid's size for this, I've used 8.
In Edges Selection Mode ( 2 ), select the arc's top opposing edges and Bridge ( alt + b ) them.
In Edges Selection Mode ( 2 ), select the top foundation's upper edges and Bridge ( alt + b ) them together.
In Objects Selection Mode ( 5 ), select the top foundation and the two arcs and Merge ( m ) the meshes together. (Reminder: Hold ⇧ shift to select multiple objects)
While in Edges Selection Mode, select one of the edges belonging to the missing face and Select Loop ( l ) or Double-Click to include all of them.
Fill Hole ( p ) to create the missing face and repeat on the other side.
Step 18 will create what is known as a 'ngon', it is generally looked down on by 3D Modelers as it may lead to problems with lighting, collisions, and subdivisions. While there is no proof that a flat static ngon in Source 2 causes any problem, we will show how to fix this. You may skip this step if you do not care about what other people think about you and your mapping skills.
To help visualize the position of all vertices we need to Toggle mesh subdivision view ( ctrl + ⇧ shift + f6 ).
In Vertices Selection Mode ( 1 ), select one of the top vertices and two bottom adjacent vertices. (Hold ⇧ shift to select multiple points at once)
Connect ( v ) them together, this will create a new face that has only 3 edges.
Here is a video to show the workflow, all of this can be done in less than 2 minutes if you have quick and steady hands.
You can check if you finished by going into Edges Selection Mode ( 2 ) and sweeping the face to compare the mesh.
Duplicate the first two concrete slabs with the Move Tool ( t ) in Objects Selection Mode ( 5 ) and place them on the top brick foundation.
Select the two inner faces in Faces Selection Mode ( 3 ) and Delete ( del ) them, then select all edges of the missing face in Edges Selection Mode ( 2 ) and Bridge ( alt + b ) them together.
Drag some textures from the Assets Browser, resize the grass plane and do a Fast Compile to check out your map!
Note: If you are getting an error regarding "(map path) is outside of the directory required for game content:" see; Getting Started With Hammer
Note2: If you are on a PC with a CPU that has efficiency Cores Windows sometimes tries to use only Efficiency cores for compiling. To fix this go into your Task Manager>Details select sandbox_dev and vrad3 rightclick>Set Affinity and select all CPU cores except the efficiency cores (usually the last ones are your efficiency Cores).
This may look like a discount
gm_flatgrass but what you learned here were the very basics to Hammer.