You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/course-building/course-meshes.md
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,39 +6,44 @@ nav_order: 3
6
6
7
7
# Course Meshes
8
8
9
-
To create separate playable surfaces, like fairways and greens. We need to convert the basic shapes we drew in Inkscape into 3D objects that are sloped to match our terrain.
9
+
To create separate playable surfaces, like fairways and greens. We need to convert the basic shapes we drew in Inkscape into 3D objects that are sloped to match our terrain. We created a specialized tool for this, called Meshery.
10
10
11
11
12
12
1. TOC
13
13
{:toc}
14
14
15
15
## Creating Meshes
16
16
17
-
1. Open the [Course Meshery](/tools/utilities/course-meshery) tool.
18
17
19
-
2. Click the **Select SVG File**{: .label } button and locate the SVG file you created in the [Course Map](/tools/course-building/course-map) step.
18
+
1. Download and open the [Meshery](/tools/utilities/course-meshery) tool.
19
+
20
+
On Windows, you may get a warning from Microsoft Defender. Click **More info** and then select **Run anyways**
21
+
22
+
2. Click the **Import RAW Terrain**{: .label } button and locate the raw terrain data file you created in the [Course Terrain](/tools/course-building/course-map) step.
20
23
21
-
3. Click the **Select RAW Terrain**{: .label } button and locate the raw terrain data file you created in the [Course Terrain](/tools/course-building/course-map) step.
24
+
3. Click the **Import SVG**{: .label } button and locate the SVG file you created in the [Course Map](/tools/course-building/course-map) step.
22
25
23
-
4. Set the **Height Scale**{: .label } value to the same thing as your **Terrain Height** in Unity.
26
+
4. Set the **Terrain Height**{: .label } value to the same thing as your **Terrain Height** in Unity.
24
27
25
-
To find the terrain height
28
+
To find your terrain height
26
29
27
30
1. Click the terrain object in your scene.
28
31
29
32
2. Click the **Terrain Settings** tab in the Inspector on the right.
30
33
31
34
3. Scroll down to your Terrain Size section and you should see **Terrain Height**
32
35
33
-
5. Set **Output Folder**{: .label } to the location you want the course folder to be generated. When the job completes, there will be a new unique folder created at this location.
36
+
5. In Meshery you can optionally set a **Terrain Smoothing**{: .label } value for you terrain, to smooth out any rough / bumpy terrain. For more fine grained control, consider editing and smoothing your terrain in Unity and exporting a new RAW file for Meshery.
37
+
38
+
6. Click **Export Meshes**{: .label } and select a the location to save your OBJ file containing your course meshes.
Next you'll want to import the folder of meshes into your Unity project. These meshes will sit just above your terrain layer. Make sure you're using the project template and have the OpenGolfSim Developer Toolkit package, which should include a tool for importing and batch assigning base materials to your meshes.
46
+
Next you'll want to import the OBJ file into your Unity project. These meshes will sit just above your terrain layer. Make sure you're using the project template and have the OpenGolfSim Developer Toolkit package, which should include a tool for importing and batch assigning base materials to your meshes.
42
47
43
48
1. In your Unity project, go to **Tools > OpenGolfSim > Import Meshes**{: .label }
44
49
@@ -48,11 +53,11 @@ Next you'll want to import the folder of meshes into your Unity project. These m
48
53
49
54
3. At this point you can batch assign materials like grass and sand to your course surfaces.
50
55
51
-
4. Click the **Import OBJs**{: .label } button and wait for the script to automatically import the course meshes to your scene. This step could take quite a while, depending on the size of your course.
56
+
4. Click the **Import OBJs**{: .label } button and wait for the script to automatically import the course meshes to your scene.
52
57
53
-
5. Once the task finishes, you should see a new parent game object with the name of your folder.
58
+
5. Once the task finishes, you should see a new parent game object with the name of your file.
54
59
55
-
6.You'll likely need to reposition the parent game object over the terrain by offsetting the X or Z value by the terrain size, as well as adjusting the Y position to be above the terrain.
60
+
6.After import, you'll likely need to reposition the parent game object to sit above the terrain by offsetting the Y position to be above the terrain.
0 commit comments