SDF_Gen is organized into “workspaces”. Each space is focused on a specific step in the SDF creation process. Accessing each workspace is done through a row of tabs at the top of the addon UI.
The Utilities tab is for processing imported meshes to make them suitable for working with in SDF Gen.
Clean Mesh attempts to repair any parts of the mesh that may have issues, such as incorrect scale transforms. It also removes any hierarchy or parenting which can cause issues with collision generation.
The Separation Tools allow the mesh to be split into smaller parts. This allows for parts to be organized into the appropriate links and for more refined collision generation.
Select Small Parts is used to select parts under a certain volume. This is useful for removing geometry that may not be important but can potentially add a lot of polygons, such as small bolts and screws.
The Links workspace focuses on creating the basic structure of the SDF. This includes creating and naming models, links, visuals, etc.
The Models tab uses Blender’s “scene” system. One Blender file can store multiple models. On export, each model will be exported as a separate SDF file. In this section, models can be added, removed, or renamed.
The Collections section is for creating collections that will be used to organize the mesh objects into categories.
- Clicking
Create Linkwill create a collection that also houses avisualandcollisioncollection. - Store your visual meshes in these
visualcollections. - Collision geometry will be stored in the
collisioncollections when creating them in theCollidersworkspace.
The Links List will show you an overview of your created links.
The Colliders tab is for the creation of collision primitives and collision geometry.
Create primitive colliders that will fit around a selected visual object. When creating a primitive collider, use the operation panel in the lower-left of the viewport to affect how the primitive is applied.
Minimal Box: Fits the box as tightly as possible to the object, ignoring the object's origin orientation. This is particularly useful for objects that are at an angle that’s not reflected in the object’s rotation transform.Per Object: Creates a collider for each of the selected objects, as opposed to one single collider that fits around the entire selection.Axis Set: Changes the orientation of objects such as cylinders and planes.
Creates a convex hull mesh collider. This method is less efficient but provides higher accuracy. Use the operation panel to:
- Reduce the resolution of the convex hull mesh using the
Mesh Resolutionslider. - Adjust the
Mesh Marginslider to ensure all parts of the visual object are contained within the collider as mesh resolution is lowered.
Colliders will often need to be adjusted to properly fit the underlying visual objects. Use these tools to manually adjust the colliders.
- The
Scale Cagetool can be used to push and pull the boundaries of the collision primitive. - The
Face Snapsetting allows those boundaries to be snapped to the surface of the underlying visual object. Collider Marginis a global setting used to create a margin between the visual object and the collision. This applies to all colliders in the scene.
💡 Tip: For primitive colliders, select multiple objects and turn off
Per Objectto create colliders that cover large parts of the object model. Not all objects need to be selected, just the objects at the outer edge of where you want the collision.
The Joints tab is used to create joints that can then be controlled in a simulation.
When creating a joint, a name and child link must be specified.
- After creation, you can use
Adjust Jointsto move and rotate joints without affecting the child link position and rotation. - Use the
Delete Jointbutton to remove unwanted joints. - Use the
Reset Jointsbutton to return all joints to their rest position if you’ve manipulated them.
The Joint Hierarchy section will show all your links and their parent/child hierarchy.
When a joint is selected, you can change its display size, set the parent link, and adjust its limits.
💡 Tips:
- Continuous joints are simply revolute joints with the
Continuous Jointbox checked in the joint properties.- Always use the
Adjust Joint Positions/Rotationsbutton to move joints.- Always use the
Delete Jointsbutton when removing a joint.- Ensure all joints have a parent link set.
The Materials tab is used to set the visual material properties of objects, such as color and whether they appear metallic.
The Material List will show all materials that are applied to an object. Since materials can be applied to individual faces, one object can contain multiple materials.
- Use the
+and-buttons to add and remove materials. - Use the
Xbutton on the right to remove any materials that aren’t applied to any faces.
Set the material properties in the Material Properties panel. Use the Replace Material tool to replace the material with a preset material. Color information can be transferred using the Keep Color checkbox.
💡 Tips:
Metalnessshould always be set to either1or0.- CAD models often have basic materials already applied. Use the
Replace Materialtool to quickly replace these with improved materials while retaining their association with objects/faces.- Use the standard material editor or the shader editor for more advanced material creation.
- A material can be easily swapped for an existing material by clicking the sphere icon to the left of the material name.
The Export tab is where the SDF can be generated and all meshes will be exported.
- Choose your mesh format for visual meshes (e.g.,
GLBis recommended). - Select a file path. The default
//sdf_exports/will save the files to a folder calledsdf_exportswithin the folder your blender file is saved. You must save the blender file first for this to work. - After clicking
Export SDF, a folder will be created containing the generatedmodel.sdffile, along with all visual meshes in the chosen file format and any mesh colliders in theSTLfile format.
Check the "export config" box and fill out the fields to export a model.config file.