|
| 1 | +# Creating Custom Worlds and Circuits in Blender |
| 2 | + |
| 3 | +## Download and Install the GIS Addon |
| 4 | + |
| 5 | +First, you need to download and install the **GIS Addon** in Blender. To do so: |
| 6 | + |
| 7 | +1. Go to the official GitHub repository of the addon. |
| 8 | +2. Navigate to the **Releases** section and download the `.zip` file. |
| 9 | +3. **Do not unzip** the `.zip` file. |
| 10 | + |
| 11 | +In Blender: |
| 12 | + |
| 13 | +1. Go to `Edit -> Preferences -> Add-ons -> Install`. |
| 14 | +2. Select the downloaded `.zip` file. |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Creating the Terrain |
| 19 | + |
| 20 | +1. Open the **GIS** menu (toolbar in the viewport). |
| 21 | +2. Go to: `GIS -> Web Geodata -> Basemap`. |
| 22 | +3. Choose `Google`, then `Satellite`, and click **OK**. |
| 23 | +4. A world map will appear, where you can select the desired area. |
| 24 | + > It's recommended to keep the terrain under **5 km** in both width and height. |
| 25 | +5. Press **B** to make a precise selection of the area. |
| 26 | +6. Press **E** to delete the rest of the terrain. |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## Adding Elevation |
| 31 | + |
| 32 | +1. With the terrain selected, go to the **GIS** menu and choose `Get elevation`. |
| 33 | +2. Select the source **Marine-geo.org GMRT**. |
| 34 | +3. This will apply elevation to the terrain using modifiers. |
| 35 | + |
| 36 | +> Apply the modifiers **from bottom to top** to convert the terrain into a mesh. |
| 37 | +
|
| 38 | +To increase mesh resolution: |
| 39 | + |
| 40 | +- Add a **Subdivision** modifier. |
| 41 | +- Adjust it until the size of the terrain blocks is about twice the width of the road or less. |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## Creating the Road |
| 46 | + |
| 47 | +1. Create a **Path-type curve** at the starting point of the track. |
| 48 | +2. Enable **Face Project** in the snapping tool so the curve conforms to the terrain. Move the curve closer to the terrain if needed. |
| 49 | +3. Switch to **Edit Mode** and start adding and adjusting curve points to follow the desired track layout. |
| 50 | +4. In the `Object Data Properties` panel: |
| 51 | + - Set `Twist Method` to **Z-Up**. |
| 52 | +5. Disable snapping once you're done. |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +## Option 1: Road on Top of Terrain |
| 57 | + |
| 58 | +1. Create a **generic block** to represent the asphalt. |
| 59 | + > If you want guardrails along the track, include them in this block. |
| 60 | +
|
| 61 | + - The block width should match the road width. |
| 62 | + - The length can be roughly half the width. |
| 63 | + |
| 64 | +2. Place this block at the starting point of the track. |
| 65 | +3. Add the following **modifiers** to the block: |
| 66 | + - **Array**: To duplicate the block along the path. |
| 67 | + - **Curve**: To make the block follow the curve. |
| 68 | + - **Solidify**: To give thickness to the asphalt. |
| 69 | + |
| 70 | + Make sure to: |
| 71 | + - Enable **Merge** in the Array modifier. |
| 72 | + - Assign the curve to the **Curve** modifier. |
| 73 | + |
| 74 | +4. Adjust the curve to avoid floating or sunken areas. |
| 75 | +5. Apply the modifiers and texture the road as desired. |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## Option 2: Road Included in the Terrain |
| 80 | + |
| 81 | +> This method creates a single mesh but may result in **N-gons** (polygons with more than 4 sides). |
| 82 | +
|
| 83 | +1. Follow the initial block creation steps, **without adding Solidify**. |
| 84 | +2. Save the **Z-coordinate** of the road block. |
| 85 | +3. Slightly elevate the road so it sits completely above the terrain. |
| 86 | +4. Select the terrain and enter **Edit Mode**. |
| 87 | +5. In **Top View**: |
| 88 | + - Click on the road object. |
| 89 | + - In the `Mesh` menu, use **Knife Project**. |
| 90 | + |
| 91 | +6. In the `Vertex Groups` section: |
| 92 | + - Create a new group and assign the projected selection to it. |
| 93 | +7. Deselect the road using `Ctrl + Click` and press `Delete` to remove the faces. |
| 94 | +8. Return to **Object Mode** and move the road back to its original Z-coordinate. |
| 95 | + |
| 96 | +9. Add a **Shrinkwrap** modifier to the road: |
| 97 | + - `Target`: The terrain mesh. |
| 98 | + - `Vertex Group`: The group you created. |
| 99 | + - `Wrap Method`: **Nearest Vertex**. |
| 100 | + |
| 101 | +10. Apply the modifiers and texture the road as desired. |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## Final Notes |
| 106 | + |
| 107 | +- Save copies of your project before applying important modifiers. |
| 108 | +- You can export the track for use in engines like Unity or simulators like Gazebo. |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Useful Links |
| 113 | + |
| 114 | +- [Blender GIS Addon (GitHub)](https://github.com/domlysz/BlenderGIS) |
| 115 | +- [Marine Geoscience Data System (GMRT)](https://www.marine-geo.org/tools/maps_grids.php) |
0 commit comments