meta data for this page

Mesh converter generator

The Mesh converter generator extracts tileable maps from meshes between the markers T (Top) and B (Bottom) and automatically replaces part or all of a mesh with standard SpeedTree geometry. One of these generators is usually the first step in building out a full model from a scanned trunk asset.



The process is detailed in this section, but the general workflow is as follows:

  • Add a Mesh generator to the scene
  • Assign a material with a mesh asset assigned to it to the Mesh generator
  • Add a Mesh converter to the Mesh
  • Move the T marker to the top of the region you want to capture
  • Move the B marker to the bottom of the region you want to capture
  • Adjust the properties according to your needs
  • Use the Actions section buttons to extract maps or convert the geometry

Note: Select a marker, hold down “T”, and click on the target mesh to automatically place and center the marker.

Generation

Mesh converters have limited generation properties. You need a new mesh converter for every conversion you want to make. Refer to Generation properties.

Region

The properties in this group control which material/mesh asset combinations are used by the generator and at what size they appear.

Clearance

Set the effective radius for the map extractions and conversions. Only polygons that fall within the radius will be considered. This value is visualized by the pink surrounding cylinder in the Tree Window. The radius should be large enough to encapsulate all of the polygons of interest but not so large as to include parts of the mesh that are undesirable.

V scale

This generator uses several geometry features to compute the extracted map set's aspect ratio. Use this value to stretch the result vertically. You should see the preview image adjust as you edit this value. A value of 1.0 means use what the generator computed exactly.

Mode

Set the style of capture.

PropertyDescription
Free You are free to extract maps of any aspect ratio.
Aspect ratio restricted The extracted maps will adhere to the specified ratio, no matter where the top and bottom markers are placed.

Aspect ratio

When the Mode property is set to Aspect ratio restricted, the captured area will be forced to create maps of the aspect ratio selected here.

Curve Capture

The properties in this group control how often and how accurately the mesh is sampled.

Extra points

The mesh is sampled at a discrete number of points as indicated by the black dots with white outlines. The number of points is computed based on the discovered radii and Mode setting while analyzing the top and bottom points. Use this property to add extra points to improve the accuracy of the converter. Extra points are added one at a time with each new point splitting the longest segment.

Note: Extra points always cover the region between the top and bottom markers. When the Mode is set to Aspect ratio restricted, you may have to add many points to see them in the area of interest.

Relax

Increase this value to smooth out the spacing between the sample points. Watch the preview image to see how the final output will be affected.

Max iterations

Blend regions and aspect ratio corrected main sections discover a course through the mesh automatically. This setting controls how many times the algorithm will try new paths before declaring a failure. Increase this value for particularly curvy, troublesome meshes.

Tiling

In order to make the extracted maps tile in the V direction, parts of the mesh must be overlapped over the border. The properties in this section control that behavior.

Blend source

Choose how the V blend data is computed.

PropertyDescription
From below The area just under the B marker is replicated on the top of the extracted maps. This property is the most common and must be used for Convert in place operations.
From above The area just above the T marker is replicated on the bottom of the extracted maps.
Custom A custom location is used to create a tiling region at the bottom and top of the extracted maps.
Disabled No blending is performed. The extracted maps will not tile in the V direction.

Height localization

Control how height data is computed for the exported heightmaps. A value of 0.0 means no localization. The highest point will be white and the lowest point will be black based on the entire region. A value of 1.0 means height is judged based on the ring around each point. Use higher values to capture features while keeping the overall height map more uniform.

Note: Use the Height render mode to see the heightmap in the Tree Window before exporting.

Top

The properties in this group control the blend region placed at the top of the map. The geometry for this will be taken from below the B marker (or custom marker if enabled) so that the end result will tile in the V direction.

Blend range

Control how far below the B marker is used for the blend. Larger values usually make for better blends. So much so you should carefully consider where you place the markers to make sure you have enough range and that the mesh in that region roughly matches the mesh in the main region for better tiling.

Note: The Tree Window will show the blend region triangles in wireframe over the mesh.

Mask

Select the blend mask used to blend the maps from the blend region onto the main region. These masks are located in the installation location in the “blend masks” folder. The “custom” folder in that location can be used to add your own masks if you desire. You must copy them in manually, there is currently no GUI for that operation.

Stretch

Stretch the blend mask across the blend geometry. Use this property to make the blend mask cover as much of the blend region as possible.

Shift

Rotate the blend mask around the blend geometry. Use this property to align the blend mask on the mesh.

Repeat

Set the number of times the blend mask repeats in U. It must be an integer so that the blend mask tiles in U. Use this property with the Stretch property to ensure the blend mask covers most (but not more) of the blend region and maintains its aspect ratio as much as possible.

Bottom

The properties in this group control the blend region placed at the bottom of the map. The geometry for this will be taken from above the T marker (or custom marker, if enabled) so that the end result will tile in the V direction.

Blend range

Control how far above the T marker is used for the blend. Larger values usually make for better blends. So much so you should carefully consider where you place the markers to make sure you have enough range and that the mesh in that region roughly matches the mesh in the main region for better tiling.

Note: The Tree Window will show the blend region triangles in wireframe over the mesh.

Mask

Select the blend mask used to blend the maps from the blend region onto the main region. These masks are located in the installation location in the “blend masks” folder. The “custom” folder in that location can be used to add your own mask if you desire. You must copy them in manually, there is currently no GUI for that operation.

Stretch

Stretch the blend mask across the blend geometry. Use this property to make the blend mask cover as much of the blend region as possible.

Shift

Rotate the blend mask around the blend geometry. Use this property to align the blend mask on the mesh.

Repeat

Set the number of times the blend mask repeats in U. It must be an integer so that the blend mask tiles in U. Use this property with the Stretch property to ensure the blend mask covers most (but not more) of the blend region and maintains its aspect ratio as much as possible.

Preview

The properties in this group control the preview image in the Tree Window. The black arrows indicate where a map ends and the next one starts for tiling previews. The pink bar indicates the span of the background image. The orange bars indicate the range of the blend regions.

Note: The preview image uses the active render mode so things like moving the light will affect it. You can also use material render modes to focus on one aspect at a time.

Size

Control how large the preview image is in the Tree Window.

Options

Control how the preview image is displayed.

PropertyDescription
Background and blends Displays exactly how the maps will be exported.
Blends only Shows only the blend region over a black background. Use this mode to help tune the blends.
Background only Shows only the background.

Show tiles

When enabled, the tiling map is drawn consecutively until it reaches the top of the window.

Actions

The properties in this group create output based on the current configuration of the converter.

Settings

Resolution

Set the width, in pixels, of the exported maps. The height is computed to maintain the appropriate aspect ratio.

Segment style

Choose how length segments are set on converted geometry.

PropertyDescription
Uniform Length segments are evenly spaced on the converted geometry.
Height based The distribution curve is set to focus length segments in areas of greater height change.

Note: This property has no effect on Convert in place operations.

Vertex height map

Choose how the generated heightmap will be used when materials are made automatically either by manually selecting Make new material or by using any of the conversion options.

PropertyDescription
In the material's height channel The generated heightmap will be in the height slot of the material.
In a displacement asset The generated heightmap will be used as a displacement asset. Use this option if you want to use the built-in smoothing options to reduce complications due to aliasing at low polygonal resolutions.

Export maps

Export a set of maps.

Make new material

Export a set of maps and automatically create a material using them.

Convert to branch

Export a set of maps, make a new material from them, and apply the material to a newly created branch generator. Add the new generator to an existing SpeedTree model in the scene to continue building.

Convert to trunk

Export a set of maps, make a new material from them, and apply the material to a newly created trunk generator. The trunk should be very close in size to the captured region. Continue editing the trunk as you would any other native SpeedTree geometry.

Convert in place

Export a set of maps, make a new material from them, and automatically create a stitch where the B marker is placed. The mesh below the stitch will be retained. The new material will be applied to the Branch generator that is a child of the stitch. Edit and build off of this generator to continue the model.