S&box Wiki

Revision Difference

Creating_your_first_gm_flatgrass#529761

<cat>Dev.Map</cat> <title>Creating your first gm_flatgrass</title> The purpose of this guide is to jump into Hammer and start creating something. Here we will be recreating `gm_flatgrass` step-by-step. The purpose of this guide is to jump into Hammer and start creating something, in this case, we will be recreating **`gm_flatgrass`** step-by-step. For more documentation and tutorials on Source 2 mapping, refer to the [Mapping Resources Page](https://wiki.facepunch.com/sbox/Mapping_Resources). *`Note: This guide uses the version of Hammer that is included in Half-Life: Alyx`* # Knowing your tools **'File' > 'New'** ( <key>CTRL</key> + <key>N</key> ) to open a new map and then **'File' > 'Save'** ( <key>CTRL</key> + <key>S</key> ) to save as *gm_flatgrass*. ## Selection Modes <upload src="314/8d90a75e4575d36.png" size="43404" name="image.png" /> From left to right we will be using the following modes: **Edges** ( <key>2</key> ), **Faces** ( <key>3</key> ), **Objects** ( <key>5</key> ) <upload src="314/8d90a7fff4f08da.gif" size="820392" name="CubeExample.gif" /> 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. ## Tools You can find tools on the left side, in this guide we will use the following: <upload src="314/8d90a83c8940111.png" size="29948" name="Tools.png" /> ## All of the rest Crash course on everything else we will be using on this guide and a short description. I suggest you look at [this video tutorial](https://www.youtube.com/watch?v=HrfsfgYpYN0) to help with the layout. <upload src="314/8d90a86169ab3d9.png" size="359908" name="Remaining Stuff.png" /> * **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](https://en.wikipedia.org/wiki/Orthographic_projection) view of the map from any direction. You can shift views by pressing Top ( <key>F2</key> ), Front ( <key>F3</key> ), Side ( <key>F4</key> ) * **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. <key>W</key> <key>A</key> <key>S</key> <key>D</key> to move the camera in the viewports, <key>Scroll</key> to Zoom-in/out and hold <key>Right-Click</key> to rotate. --- # Making the map step-by-step ## Step 1: With the **Block Tool** ( <key>SHIFT</key> + <key>B</key> ), 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. <upload src="314/8d90a8c729cf228.png" size="910081" name="image.png" /> You can use the **Object Properties** to center the plane in **X: 0; Y: 0** ## Step 2: With the **Entity Tool** ( <key>SHIFT</key> + <key>E</key> ) 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** ( <key>R</key> ) <upload src="314/8d90a8d6cba4512.png" size="447667" name="image.png" /> ### Step 2.5: 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. ## Step 3: With the **Block Tool** ( <key>SHIFT</key> + <key>B</key> ), select **Cylinder** in the **Object Editing** window, make a cylinder that is *512x512* units and place it in the center. With the **Block Tool** ( <key>SHIFT</key> + <key>B</key> ), select **Cylinder** in the **Object Editing** window, make a cylinder that is *512x512* units and has *64* sides, place it in the center. <upload src="314/8d90a8ed3e90fc7.png" size="825083" name="image.png" /> ## Step 4: With the **Clipping Tool** ( <key>SHIFT</key> + <key>X</key> ) and working in the **2D Viewport**, slice the cylinder in half by pressing <key>ENTER</key> to confirm, then slice in quarters. <upload src="314/8d90a8f8be3894c.png" size="951295" name="image.png" /> In the **Object Editing** window remember to have the third **Keep Mode** selected. ## Step 5: While in **Objects Selection Mode** ( <key>5</key> ) use the **Move Tool** ( <key>T</key> ) While in **Objects Selection Mode** ( <key>5</key> ) use the **Move Tool** ( <key>T</key> ) to separate the sections an equal distance from each other. <upload src="314/8d90a90de6709c7.png" size="937315" name="image.png" /> # WORK IN PROGRESS I'll finish this tomorrow. ## Step 6: While in **Edges Selection Mode** ( <key>2</key> ) use the **Selection Tool* ( <key>SHIFT</key> + <key>S</key> ) 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 <key>SHIFT</key> while clicking on the edges. <upload src="314/8d90b45017a071b.png" size="735207" name="image.png" /> After you have all the edges selected like in the picture **Bridge** ( <key>ALT</key> + <key>B</key> ) them and, through the **Object Editing** window, select only *1* Step (Only 1 straight face will be generated) then press <key>ENTER</key> to confirm. Repeat on the other side. ## Step 7: Select the edges of the remaining faceless side by either **Double Clicking** or **Select Loop** ( <key>L</key> ) in the **Object Editing** window after selecting one of the edges. <upload src="314/8d90b46ca27add8.png" size="612829" name="image.png" /> **Fill Hole** ( <key>P</key> ) to cover the face, repeat on the other side. ## Step 8: While in **Object Selection Mode** ( <key>5</key> ) select both foundations and use the **Selection Tool** ( <key>SHIFT</key> + <key>S</key> ) to make them taller by dragging the arrow facing upwards. <upload src="314/8d90b485e82e33f.png" size="817666" name="image.png" /> ## Step 9: Using the **Move Tool** ( <key>T</key> ) and while holding <key>SHIFT</key>, move both foundations up to clone them. <upload src="314/8d90b4971bbda77.png" size="525063" name="image.png" /> We will be using these clones to create the concrete slabs that separates the two foundations. ## Step 10: While in **Object Selection Mode** ( <key>5</key> ) select both slabs and use the **Selection Tool** ( <key>SHIFT</key> + <key>S</key> ) to make them **shorter** by dragging the arrow facing downwards. I suggest changing the **Grid**'s *size* to a smaller value like *16*. <upload src="314/8d90b4d85c8d299.png" size="1203441" name="image.png" /> Using the **2D Viewport** to help, place the slabs on top of the bottom foundations with the **Move Tool** ( <key>T</key> ). # WORK IN PROGRESS DO NOT EDIT THIS PAGE, I'M LITERALLY WORKING ON IT RIGHT NOW SO ANY CHANGES YOU MAKE WILL BE REVERTED ONCE I SAVE THIS! ---