Automatic Mesh generator

(Updated 05/13/2021)

There are two types of mesh editing: “automatic generation,” which can be generated automatically by simply specifying values related to the density of points, and “manual editing,” in which points can be edited by hitting them one by one.
On this page you will learn how to automatically generate ArtMesh.

For more information on manual editing, see the page in “Edit Mesh manually.

 

Automatic Mesh generator

First, we will discuss the simplest procedure for generating a finer mesh from the state immediately after PSD import.
Press Ctrl+A to select all ArtMeshes.

Click on [Automatic Mesh generator] on the toolbar.

The [Automatic Mesh generator] dialog box will appear, so first confirm with the default settings.
Click on the text box portion (anywhere) in [Setting] and press Enter.

A mesh has been created with the set values.

TIPS
To allow you to select one ArtMesh after another and apply arbitrary values in the dialog,
the dialog does not close automatically and remains in the foreground.
It can be moved as needed or closed with the X in the upper right corner.

 

Automatic mesh generation can be applied to individual ArtMesh by itself.
Furthermore, the shape of the mesh can be changed after application, allowing adjustment until the desired shape is achieved.
* But automatic generation is not recommended because the shape will change after the parameters are set.

 

About the [Automatic Mesh generator] Dialog

Preset:
You can save the values in [Setting] in the dialog as a preset.

Combo box The name of the preset you created will be displayed.
Add Add the current value to the preset. Click to open a dialog box to enter a name, and after entering the name, click [OK] to save the file.
Delete Deletes the preset selected in the combo box.
Overwrite Clicking [Overwrite] after changing the value of the current preset will overwrite it with that value.
[>] button Other menus will be displayed. Click [Open Settings] to open the folder where the preset data (xml format) is saved.

Setting:

Dot spacing (pixels) Specifies the interval at which vertices are created. If 50 is specified, it will create one vertex in an area of roughly 50x50 pixels. (Images from left to right, with larger and smaller spacing)

Boundary margin (outside) Specifies the average margin between the opaque pixel (the area with the picture) and the surrounding mesh.*1

Boundary margin (inside) Specifies the average distance from the boundary of an opaque pixel (the part with the picture) to the inner mesh surrounding it.*1

Minimum margin of boundary If the opaque pixels and the mesh are close to each other, such as at a corner, add a point so that the [Boundary margin] specified above can be secured.*1
(Image shows comparison of large and small values)
Minimum number of points of boundary Specifies the minimum number of points that enclose a single area. In the case of 3, the triangle consisting of 3 points is the shape of the least case. In the case of 4, the shape of the quadrangle is the one with the fewest number of quadrants consisting of 4 points.
Alpha value to be considered transparent Specifies the alpha value (transparency from 0 to 255, where 0 is transparent) at which the texture is considered transparent. Increase the value if you do not want to capture near-transparent dust, etc. Usually 0 is fine.

*1 The specified value is expressed in terms of pixels when the texture size is 1024. If 10 is set and
the number of pixels is 2048, the margin is actually 20.

 

Default setting values for automatic mesh generation

The default settings for automatic mesh generation are shown in the figure below.

Standard Deformation degree (small) Degree of deformation (large)

 

What to do if automatic mesh generation does not work

If the automatic mesh generation does not result in a clean division, such as missing meshes, there may be unnecessary semi-transparent areas left in the PSD.
(e.g., trash left over from the creation of the illustration)

The figure below shows the unnecessary semi-transparent areas left in the PSD for easy viewing.

In such cases, gradually increase the “alpha value considered as transparent” from 0 and adjust the mesh division little by little.

In this example, the “alpha value to be considered transparent” is set to 10.
Of the opacity 0...255, up to the portion of opacity 10 will be considered transparent.

In this way, unwanted trash areas can be excluded from the calculation, resulting in a clean mesh shape.

 

What to do when the texture display disappears after automatic mesh generation

Automatic mesh generation may cause the texture display to disappear when there are meshes that are not closed.
In this case, the texture display can be restored by changing the value and automatically generating the mesh again, or by canceling the automatic generation with Undo.
Please note that if you change the key form and then perform automatic mesh generation, the deformation may be reset to its original shape.

© 2010 - 2022 Live2D Inc.