Vertex Mass Editing
Tools to edit the vertex masses of Geometry LODs
Last updated
Tools to edit the vertex masses of Geometry LODs
Last updated
Object Builder tab in the 3D viewport sidebar.
Live Editing: enable dynamic editing of selection masses
Current Mass: sum of masses of selected vertices
Value Type: type of data in Value
Mass: mass value in kg units
Density: density value in kg/m3 units
Value: mass or density value to use in calculations
Distribution: method to use when distributing mass among vertices
Uniform: mass is divided equally
Weighted: mass is divided proportional to the volume belonging to each vertex
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)
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 All Masses/Remove Mass: remove masses set on the object/vertex
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
In order to display and edit the Current Mass value, the vertices of the currently edited mesh are looped through upon every draw call of the UI property. To save computing power, the tool panel is disabled by default.
On every draw call of the Current Mass UI property, the vertices of the currently edited mesh are looped through, and the masses summed.
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).
The mass of each selected vertex (or all vertices in Object mode) is set to the value of the Value property.
With uniform Distribution, the Value is divided by the number of selected vertices (or all vertices in Object mode), and each selected vertex is assigned this value.
With weighted Distribution, 3D Voronoi cells around each closed component vertex are generated. The Value is divided up in a way that is weighted by the volumes of these cells.
The calculation only considers closed components, when used with weighted Distribution. When used in Edit mode, only fully selected components are used.
With uniform Distribution, the overall volume and mass of the closed components is calculated, then the mass is equally split among the vertices of the component.
With weighted Distribution, 3D Voronoi cells around each closed component vertex are generated. Mass is then calculated for each vertex from the given density and the corresponding cell volume.
The calculation only considers closed components. When used in Edit mode, only fully selected components are used.
In Object mode, the data layer containing the vertex masses is removed, effectively setting the mass of each vertex of the currently edited object to 0.
In Edit mode, the mass of all selected vertices is set to 0.
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.
The best way to utilize the Visualize function is 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.