|
@@ -296,8 +296,39 @@ in the **Scale** property will cause the texture to repeat more often.
|
|
the material onto, click the dropdown arrow next to its material
|
|
the material onto, click the dropdown arrow next to its material
|
|
property then choose **Paste**.
|
|
property then choose **Paste**.
|
|
|
|
|
|
|
|
+.. _doc_csg_tools_converting_to_mesh_instance_3d:
|
|
|
|
+
|
|
|
|
+Converting to MeshInstance3D
|
|
|
|
+----------------------------
|
|
|
|
+
|
|
|
|
+Since Godot 4.4, you can convert a CSG node and its children to a :ref:`class_MeshInstance3D` node.
|
|
|
|
+
|
|
|
|
+This has several benefits:
|
|
|
|
+
|
|
|
|
+- Bake lightmaps, since UV2 can be generated on a MeshInstance3D.
|
|
|
|
+- Bake occlusion culling, since the occlusion culling bake process only takes MeshInstance3D into account.
|
|
|
|
+- Faster loading times, since the CSG mesh no longer needs to be rebuilt when the scene loads.
|
|
|
|
+- Better performance when updating the node's transform if using the mesh within another CSG node.
|
|
|
|
+
|
|
|
|
+To convert a CSG node to a MeshInstance3D node, select it, then choose
|
|
|
|
+**CSG > Bake Mesh Instance** in the toolbar. The MeshInstance3D node
|
|
|
|
+will be created as a sibling. Note that the CSG node that was used for baking is **not** hidden
|
|
|
|
+automatically, so remember to hide it to prevent its geometry from overlapping with the newly created
|
|
|
|
+MeshInstance3D.
|
|
|
|
+
|
|
|
|
+You can also create a trimesh collision shape using **CSG > Bake Collision Shape**.
|
|
|
|
+The generated :ref:`class_CollisionShape3D` node must be a child of a :ref:`class_StaticBody3D`
|
|
|
|
+or :ref:`class_AnimatableBody3D` node to be effective.
|
|
|
|
+
|
|
|
|
+.. tip::
|
|
|
|
+
|
|
|
|
+ Remember to keep the original CSG node in the scene tree, so that you can
|
|
|
|
+ perform changes to the geometry later if needed. To make changes to the
|
|
|
|
+ geometry, remove the MeshInstance3D node and make the root CSG node visible
|
|
|
|
+ again.
|
|
|
|
+
|
|
Exporting as glTF
|
|
Exporting as glTF
|
|
-------------------------
|
|
|
|
|
|
+-----------------
|
|
|
|
|
|
It can be useful to block out a level using CSG, then export it as a 3d model, to
|
|
It can be useful to block out a level using CSG, then export it as a 3d model, to
|
|
import into 3D modeling software. You can do this by selecting **Scene > Export As... >
|
|
import into 3D modeling software. You can do this by selecting **Scene > Export As... >
|