Modify > Convert > Texture to Geometry

 
 
 

Texture to Geometry converts an image into geometry by creating a polygonal mesh that is subdivided based on the colors in the image. The subdivided faces on the mesh can be assigned a shading material with a similar color to the original image. The subdivided polygonal mesh can then be used as is, or be made to wrap onto the original polygonal mesh so it appears in the same location as the original texture map. The original texture image is not modified

Related topics

Modify > Convert > Texture to Geometry >

These are the descriptions for the options in the Texture to Geometry Options window.

The Texture to Geometry options are divided into four categories based on their related function. Some of these options are also available from the Attribute Editor. This lets you modify the parameters after the initial surface mesh is created and update the resulting mesh through the construction history connection.

Input Image

Specifies the image you want to convert into geometry. Type the directory path and file name in this text box. Because it is possible to have multiple textures assigned to a surface, you must specify which image you want converted in the Input Image text box.

Segment Detection Options

These options specify how color features in the input image are detected and then subsequently converted into segments that define the areas for subdivision of the resulting mesh.

Quantize

Images that contain subtle color changes (color ramps or blends) can be problematic for the detection and segmentation phase of the Texture to Geometry feature. Turning this option on helps the feature determine segments in images that contain gradient color changes. For example, if the image contained a gradient (ramp) background, the gradient region would be divided into equal segments based on the Quantize levels option settings. Turn this option on only if your image contains gradient color changes.

Quantize levels

Quantize levels uses the color value information in HSV color space to set the number of color levels in the image when the Quantize option is turned on. The level setting affects how the gradient color regions get divided during the detection and segmentation phase. For example, a Quantize Level of 16 indicates that the detection/segmentation of the image would be divided into 16 areas based on the Value parameter in HSV color space for the pixels in the gradient region. This option is only available when the Quantize option is turned on and is specifically useful for images that contain gradient color changes.

Search Radius

Texture to Geometry uses a search algorithm that looks at neighboring pixels in the image to determine which segment of the image matches a given pixel. Search Radius determines the size of the searching radius in pixels. The valid range for this option is between 3 and 10. The default Search Radius is 7 pixels. The smaller you set the Search Radius value, the less likely the search algorithm will find a segment and the more segments will get produced as a result.

Minimum Segment Size

Sets the minimum segment size for the image using a percentage value that is based on the total area for the input image. The higher the Minimum Segment Size value the fewer the segments produced during the segmentation phase. For example, a Minimum Segment Size value of 0.5 would indicate that a color segment must occupy at least half of the area of the input image in order to be detected and segmented. While the valid range for this option is between 0.005 and 1.0, useful values range between 0.005 and 0.2.

You can determine the actual number of pixels specified by this value by multiplying the total number of pixels by the Minimum Segment Size value. For example, an image that is 256 x 256 would have 65,536 pixels. If a Minimum Segment Size of 0.2 was specified, the minimum number of pixels that could be detected for a segment would be 65,536 x 0.2 = 13,107 pixels.

Color Range

Specifies the size of the palette of colors that may be accepted into a segment during the initial detection of colors in the image. The range is between 1 and 10 colors. Setting the Color Range to a smaller value limits the color range and introduces more segments. Setting the Color Range to a larger value increases the size of the search range and creates less segments. The default value of 4.5 is useful in the majority of situations.

Maximum Color Difference

When features get detected in an image there are often many segments that share the same color. To reduce the number of shading materials produced, the segments are grouped by the common colors that are shared. Maximum Color Difference specifies the difference in RGB values that can occur between segments for the grouping operation. When the Maximum Color Difference is set to a small value, the less likely segments will be grouped. The default value of 0.125 is optimal in the majority of situations.

Segment Meshing Options

These options specify how the segments that are produced get subdivided in the resulting surface mesh.

Max Points to Add

Specifies the maximum number of points that can be added to the resulting mesh to reduce thin triangle polygons. Thin polygons can produce visible artifacts when an image is rendered. Increasing this setting increases the number of polygons that result on the mesh. In general, this attribute is adjusted on the texture to geometry node in the Attribute Editor once the resulting mesh is completed and thin polygons are discovered.

Surface Fitting Options

These options specify how the resulting surface mesh is constrained to fit onto a selected surface in the scene.

Fit To Selection

Specifies that the resulting mesh will be constrained to fit the polygonal mesh currently selected in the scene. As a result, the converted mesh is modified to fit over top of the selected mesh using the Surface Offset specified and the existing UV texture coordinates for the selected mesh, unless an alternate UV Set is specified. When Fit to Selection is off, the resulting surface mesh is positioned at 0, 0, 0 in the scene view along the X,Y plane.

Surface Offset

Specifies how far the converted mesh will be offset away from the selected surface in centimeters. The range is between 0 and 1, with a default setting of 0.01 cm. The resulting surface mesh is offset perpendicular (normal) to the selected mesh. Offsetting the resulting mesh makes it appear as if it were actually mapped onto the surface when rendered.

UV Set

Lets you specify an alternate set of UV texture coordinates when the resulting mesh is fit to a selected polygonal mesh. The UVs must be non-overlapping and should be within the 0 to 1 texture mapping range as they appear in the UV Texture Editor. The name of the UV set you specify must explicitly match the name of the UV set as it appears in the UV Texture Editor.

NoteIt’s possible to fit the resulting mesh to a different mesh after the initial creation. To do this you must connect the output mesh attribute from the mesh shape node to the inputMesh on the converter node. For example:

connectAttr -f pSphereShape1.outMesh <n>Converter.inputMesh

Where pSphereShape1 is the name of the mesh you want to fit on, and <n>Converter.inputMesh is the name of resulting mesh, with n being the name of the original input image.

Surface Output Options

These option specify how shading materials are produced for the resulting surface mesh.

Generate Shaders

Specifies that shading materials get assigned to the resulting mesh based on the various Segment options. The number of shading materials that get produced directly correlates to the maximum number of segments produced in the segmentation phase (maximum = 100).

When shading materials are generated for the mesh with this option, they have a connection to the texture to geometry node. For example, if you update parameters for the texture to geometry node in the Attribute Editor, the assignment of shading materials will update automatically.

Shader Template

Lets you specify an existing shading material type for use as a template for the shading materials that are assigned to the resulting polygon mesh when Generate Shaders is turned on. The drop-down list lets you select shader types from the existing shading materials in the current scene so that the shading attributes for your resulting mesh match the attributes of the selected surface mesh when it gets applied.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License