Vertex Mass Editing

Tools to edit the vertex masses of Geometry LODs

Object Builder equivalent

Object Builder mass

Tool panel

Vertex mass editing tool panel
Vertex mass editing tool panel
sub-panel

Location

Object Builder tab in the 3D viewport sidebar.

Properties

  • Live Editing: enable dynamic editing of selection masses

  • Current Mass: sum of masses of selected vertices

  • Mass: mass to use for operator functions

  • Density: volumetric density to use to calculate mass distribution (kg/m3)

Sub-panel:

  • Empty Color: color to assign to vertices/components with 0 mass

  • Color Ramp: colors to represent masses from lowest to highest (intermediate values are interpolated)

  • Layer: name of the vertex color layer to use/create

  • Method:

    • Vertex: visualize per-vertex masses

    • Component: visualize per-component masses (sum of vertex masses on each component)

Operators

  • Set Mass On Each: set the mass of each selected vertex to the value set in the Mass property

  • Distribute Mass: distribute the value of the Mass property equally among all selected vertices

  • Mass From Density: calculate the volume of each geometry component and set vertex masses according to the Density property

  • Clear Masses: remove all masses set on the object

Sub-panel:

  • Visualize: create a vertex color layer to visualize vertex mass distribution

  • Center Of Mass: move 3D cursor to the center of mass defined by the vertex masses


Process

In order to display and edit the Current Mass value, the vertices of the currently edited mesh is looped through upon every draw call of the UI property. To save computing power, the tool panel is disabled by default.

Current mass

Display

On every draw call of the Current Mass UI property, the vertices of the currently edited mesh are looped through, and the masses summed.

Change

When the Current Mass property is changed, the sum of the masses on the selected vertices is calculated, then the difference of that sum and the new target mass is equally distributed among all selected vertices (the mass ratios between points are not equal before and after the change, the vertices; vertex masses can move away from 0, or become 0).

Set Mass On Each

The mass of each selected vertex is set to the value of the Mass property.

Distribute Mass

The value of the Mass property is divided by the number of selected vertices, and each selected vertex is assigned this value.

Mass From Density

The operator recalculates the masses for the entire edited object, not just the current selection.

The edited mesh is split up into loose components. The volume of each component is calculated, then multiplied by the value of the Density property. The resulting mass value is then equally distributed among the vertices of the component.

The calculation ignores any components that are not closed (eg.: loose vertices or faces).

Clear Masses

The data layer containing the vertex masses is removed, effectively setting the mass of each vertex of the currently edited object to 0.

Visualize

Depending on the Method setting, the function goes through all vertices or components, and collects their mass data. The non-zero values are linearly converted to the [0.001 - 1.0] range, and colors are calculated on the color ramp. A new vertex color layer is created (or the existing one is used) with the name set in the Layer setting, then each vertex is set to the calculated color.

Tips

The best way to utilize the Visualize function is by setting the Lighting to Flat and the Color to Vertex (or Attribute as it is called in the latest versions of Blender) in the Viewport Shading settings, and enabling X-Ray view. Also make sure that the appropriate vertex color layer is active.

Last updated