Place nodes on photogrammetry meshes
Precisely locate a branch or leaf off a photogrammetry mesh using Target generators.
The general approach is as follows:
- Add a Target generator as a child of the mesh.
- Use the Target to pinpoint a location/orientation on the mesh.
- Add any child as the child of the Target. The children of the target use the pinpointed locations and orientations as their starting point.
The detailed process is outlined below.
The setup
To get started:
- Add a Mesh generator to your model.
- Import a mesh asset, make a material for it, and assign it to the Mesh generator.
Add a target generator
To add a target generator:
- Select the Mesh generator and add the "Single target" template. Choose any of the styles to mark a location on the parent mesh. You can choose to cast a ray at the parent, pick the closest point on the mesh, or use the target's position/orientation directly.
- Add a Branch, Leaf, or Mesh generator as the child of the Target. The new generators will use the spot marked by the Target as their starting point. Their initial orientation is controlled by the Point and Align options on the Target generator.
Edit the result
You can move a Target, change how the child is oriented, delete Targets, and add new ones. You can also add multiple Target generators and children if you'd like to position branches and leaves off a mesh.
Placing welded branches
When using Targets to place welded branches off photogrammetry meshes, beware of UV island seam crossings. Make sure the branch is located entirely within a single UV island to ensure no errors in the weld region.
The following image shows a branch with a welding error both in the standard render mode and the texture coordinate seam render mode.
The Texcoord Seam render mode illustrates why the error occurs:
Best practices
Keep the following in mind when placing children off meshes with Targets:
This method doesn't work for procedural generation. Use 3D anchors instead.
Targets can be the children of anything, should you want to place things off regular SpeedTree geometry this way as well.
It's often a good idea to place a few procedural branches directly off a photogrammetry trunk to help with the blend between photogrammetry and procedural data.