Skip to content

Commit 74854fd

Browse files
authored
Update tutorial for model_and_optimize_meshes (#1717)
Signed-off-by: Andrej Orsula <[email protected]>
1 parent f8e81d8 commit 74854fd

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed
Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
1-
\page model_and_optimize_meshes Model and optimize meshes in blender for simulations
1+
\page model_and_optimize_meshes Model and optimize meshes in Blender for simulations
22

3-
3d shapes created for simulation serve the purpose of bringing realism to a scene. It also helps identify everything in the scene easier. If for example all of the objects in a scene were simple shapes like cubes and circles it can be difficult to distinguish objects in the simulation.
3+
3D shapes created for simulation serve the purpose of bringing realism to a scene. It also helps identify everything in the scene easier. If for example all of the objects in a scene were simple shapes like cubes and circles, it can be difficult to distinguish objects in the simulation.
44

55
## Collision shapes vs Visual shapes
6-
Simple shapes like cubes and spheres, better known as “primitives”, are often used as collision pieces. Collision shapes use simplified geometry compared to the visual mesh because they serve different purposes in simulations.
6+
Simple shapes like cubes and spheres, better known as “primitives”, are often used as collision geometry. Collision shapes use simplified geometry compared to visual mesh because they serve different purposes in simulations.
77

88
Collision models are important because they interact with the physics environment. They require less computation if they use primitive shapes.
99

10-
Visual shapes are detailed meshes. These shapes are made with the goal of bringing realism to a simulated scene. These shapes are more dense in polygons and usually have textures attached to them. These shapes are what camera sensors pick up and are also what the viewer sees when viewing simulations.
10+
Visual shapes are detailed meshes. These shapes are made with the goal of bringing realism to a simulated scene. These shapes are often more detailed and usually have textures attached to them. These shapes are what camera sensors perceive, and also what is visualised when viewing simulations.
1111

1212
## Creating Models
13-
Blender has many tools to create simple/complex models. A great way to create complex objects is to start with something simple. In the example below we see a complex model created from a simple primitive. Although this is a great strategy for modeling, going from a simple mesh to a complex one usually requires a lot of tools to be used.
13+
Blender has many tools to create simple/complex models. A great way to create complex objects is to start with something simple. In the example below, we see a complex model created from a simple primitive. Although this is a great strategy for modeling, going from a simple mesh to a complex one usually requires a lot of tools to be used.
1414

1515
@image html files/model_and_optimize_meshes/1_wheels.jpg width=600px
1616

1717
Because we used the example of the wheel above, I will be using that shape to go over my modeling workflow. I will also explain some of the tools and modifiers that I use. A basic understanding of the movement keys should be known prior to starting this tutorial: [Recommended beginner guide](https://www.youtube.com/watch?v=K6Sm7DAPTGE&ab_channel=TutsByKaiTutsByKai)
1818

1919
### Create/add simple mesh
20-
For this model cylinder mesh is used as a starting point.
20+
For this model, cylinder mesh is used as a starting point.
2121
--> `(Add>Mesh>Cylinder)`
2222

2323
@image html files/model_and_optimize_meshes/2_cylinder.jpg width=600px
2424

25-
Having reference images of what you are planning to model can be a great help too, and is alway recommended.
25+
Having reference images of what you are planning to model can be a great help too, and is always recommended.
2626

27-
The move, rotate, and scale are used throughout most 3d modeling processes. These three actions are commonly known as the transform gizmos.
27+
The move, rotate, and scale operations are used throughout most 3d modeling processes. These three actions are commonly known as the transform gizmos.
2828

29-
@image html files/model_and_optimize_meshes/3_transform_gizmos.png "(Transform gizmos hotkeys: (G, R, S))" width=600px
29+
@image html files/model_and_optimize_meshes/3_transform_gizmos.png "Transform gizmos hotkeys: `G`: Grab (move), `R`: Rotate, `S`: Scale" width=600px
3030

3131

3232

3333
Oftentimes, problems after importing models into a program occur because of simple mistakes related to these gizmos.
34-
These problems are fairly common, but aren't hard to fix. Changing one of those attributes accordingly and exporting it out with the updates fixes most issues.
34+
These problems are fairly common but arent hard to fix. Changing one of those attributes accordingly and exporting it out with the updates fixes most issues.
3535

36-
- **Move Gizmo**: allows you to change the location of an object along the x,y,z axis. `(Hotkey G)`
36+
- **Move Gizmo**: allows you to change the location of an object along the x,y,z axis `(Hotkey G)`.
3737

3838
@image html files/model_and_optimize_meshes/4_move.png width=600px
3939

40-
- Rotate Gizmo: allows you to rotate object orientation along the x,y,z axis `(Hotkey R)`
40+
- Rotate Gizmo: allows you to rotate object orientation along the x,y,z axis `(Hotkey R)`.
4141
This was used to rotate the cylinder upright for the wheel.
4242

4343
@image html files/model_and_optimize_meshes/5_rotate.jpg width=600px
4444

45-
- Scale Gizmo: allows you to scale an obj. Objects can also be scaled along a single axis if desired. `(Hotkey S)`
45+
- Scale Gizmo: allows you to scale an obj. Objects can also be scaled along a single axis if desired `(Hotkey S)`.
4646

4747
@image html files/model_and_optimize_meshes/7_scale.jpg width=600px
4848

49-
- Bevel: allow you to create curved/chamfered edges
49+
- Bevel: allow you to create curved/chamfered edges `(Hotkey Ctrl B)`.
5050
This was used to create the curved sides of the wheel.
5151

5252
@image html files/model_and_optimize_meshes/8_bevel.jpg width=600px
5353

54-
- Extrude: adds additional geometry along a selected face/edges. The extrude tool can be used to push out a face or to push in one. Both examples are given here.
54+
- Extrude: adds additional geometry along a selected face/edges `(Hotkey E)`. The extrude tool can be used to push out a face or to push in one. Both examples are given here.
5555

5656
@image html files/model_and_optimize_meshes/9_extrude.png width=600px
5757

5858
This was used to create the indents of the wheel.
5959

6060
`(Mesh > Extrude > Extrude Region)`
6161

62-
- Loop cut: allows you to split a face with a new looped edge. This then allows for more detailed manipulation of faces to take place.
62+
- Loop cut: allows you to split a face with a new looped edge `(Hotkey Ctrl R)`. This then allows for more detailed manipulation of faces to take place.
6363

64-
This with a combination of the extrude tool you can make small ridges to your shape.
64+
With a combination of the extrude tool, you can make small ridges to your shape.
6565

6666
@image html files/model_and_optimize_meshes/10_loop_cut.jpg width=600px
6767

@@ -70,60 +70,61 @@ This with a combination of the extrude tool you can make small ridges to your sh
7070
@image html files/model_and_optimize_meshes/11_duplicate.jpg width=600px
7171

7272
- Other Modifiers:
73-
Some other commands that were used during a modeling process are: lattice functions,booleans, smooth, decimate.
73+
Some other commands that were used during a modeling process are: lattice functions, booleans, smooth, and decimate.
7474

7575
@image html files/model_and_optimize_meshes/12_other_modifiers.png width=600px
7676

77-
#### More polygons less performance
77+
#### More polygons less performance
7878

79-
Shapes are made out of polygons. The higher the polygons on a shape the more detailed it is. A shape with too many polygons can overcomplicate mesh editing or can make simulations run very slowly. This is why it is important to optimize a shape so that it keeps most of its details but without making the poly count too high.
79+
Shapes are made out of polygons. The higher the polygons on a shape, the more detailed it is. A shape with too many polygons can overcomplicate mesh editing or can make simulations run very slowly. This is why it is important to optimize a shape so that it keeps most of its details but without making the poly count too high.
8080

8181
@image html files/model_and_optimize_meshes/13_polygons.jpg "Left: Low Poly | Right: High Poly" width=600px
8282

8383

84-
If you find that your model is too dense to work with. The “decimate” command can be used to lower the polycount of said mesh, while still keeping its general shape.
84+
If you find that your model is too dense to work with, the “decimate” command can be used to lower the polycount of said mesh while still keeping its general shape.
8585

86-
Creating a complex model requires a good understanding of many tools in a 3d modeling program. They all serve their specific purposes and are extremely powerful. They have to be used on top of each other in different ways to get to an end result. The more you add/edit your shape the better it will look in the long run.
86+
Creating a complex model requires a good understanding of many tools in a 3d modeling program. They all serve their specific purposes and are extremely powerful. They have to be used on top of each other in different ways to get to an end result. The more you add/edit your shape, the better it will look in the long run.
8787

8888
## Exporting models
8989

90-
When you export a model for Gazebo, the .dae (COLLADA) file type is recommended.
91-
STL and OBJ files are also supported, but are less common for imports into Gazebo.
90+
When you export a model for Gazebo, the `.dae` (COLLADA) file type is recommended for visual geometry.
91+
If you experience issues while importing materials from a COLLADA mesh to Gazebo, you can try the `.obj` (Wavefront) exporter instead.
92+
STL meshes can be used for the collision geometry, as these do not contain information about the material.
9293

9394
To export: select your shape and then `File>Export>Collada(Default)(.dae)`
9495

9596
@image html files/model_and_optimize_meshes/14_export_model.png width=600px
9697

97-
After you hit export in whatever file format you decide to go with, the "Blender File View" will appear. This is where you choose the location of your file. You can also choose how you want to export your model.
98+
After you hit export in whatever file format you decide to go with, the Blender File View will appear. This is where you choose the location of your file. You can also choose how you want to export your model.
9899

99-
Double checking the “global Orientation” can save time and here you can quickly change the “Up Axis” to Z up. This is the standard orientation in Gazebo
100+
Double checking the “Global Orientation” can save time and here you can quickly change the “Up Axis” to Z up. This is the standard orientation in Gazebo.
100101

101-
Equally make sure that the If the shape is meant to stand on the ground, place the origin on the base, and make the model face X (Forward Axis)
102+
Equally, make sure that the If the shape is meant to stand on the ground, place the origin on the base, and make the model face X (Forward Axis)
102103

103104
@image html files/model_and_optimize_meshes/15_axis.png width=200px
104105

105106
## Troubleshooting
106107

107-
There are a few things to take account of when creating a 3d shape for use in simulations. Making sure your scale and orientation are set to Gazebo standards can save you a lot of time.
108+
There are a few things to take into account when creating a 3d shape for use in simulations. Making sure your scale and orientation are set to Gazebo standards can save you a lot of time.
108109

109110
- Check Scale/Location: If an imported shape is brought into Gazebo with the wrong units, it might be too big/small for the scene. Make sure that your modeling units are 1:1 with what is in Gazebo (Gazebo uses meters).
110111

111112
@image html files/model_and_optimize_meshes/16_check_scale.png width=600px
112113

113-
To change the units in Blender to match Gazebo go to “Scene Properties”. Change the “unit Systems” to Metric and change the “Length” to Meters.
114+
To change the units in Blender to match Gazebo, go to “Scene Properties”. Change the “unit Systems” to Metric and change the “Length” to Meters.
114115

115-
To change the grid size go to “Show Overlays” and change the “Scale” amount.
116+
To change the grid size, go to “Show Overlays” and change the “Scale” amount.
116117

117118
- **Check Pivot Point/Shape Origins:**: When exporting a shape it is usually best practice to make sure that your model is in the middle of your grid `(0,0,0)`, unless said model is part of a bigger scene.
118119

119120
@image html files/model_and_optimize_meshes/17_check_pivot_point_a.jpg width=600px
120121

121-
The Pivot Point of a shape is the point from which the shape moves, rotates, and scales from.
122+
The Pivot Point of a shape is the point from which the shape moves, rotates, and scales.
122123

123124
Not only do you need to make sure that your shape is in the right location prior to export, but you also need to make sure that the pivot points are in the right positions as well.
124125

125126
@image html files/model_and_optimize_meshes/18_check_pivot_point_b.jpg width=600px
126127

127128
Complex shapes often have a child/parent relationship. This is when a smaller part of a shape is attached to a larger piece, but they have different pivot points.
128129

129-
For example: The wheel used for this tutorial would be a child shape. It would “parented” to the body of a car. The pivot point of the wheel is in its center axis as shown, but the general pivots of the whole shape would be attached based on the parent shape, around the joint origin. When you export to `Gazebo` make sure that the whole shape is selected and that the main body is on the origin `(0,0,0)`, and X Axis facing forward.
130+
For example: The wheel used for this tutorial would be a child shape. It would be “parented” to the body of a car. The pivot point of the wheel is in its center axis as shown, but the general pivots of the whole shape would be attached based on the parent shape, around the joint origin. When you export to `Gazebo` make sure that the whole shape is selected and that the main body is on the origin `(0,0,0)`, and X axis facing forward.

0 commit comments

Comments
 (0)