unreal.NearestNeighborModelSection

class unreal.NearestNeighborModelSection(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

The section of the nearest neighbor model. Each section contains a set of vertices in the original skeletal mesh. The nearest neighbor search is performed on each section separately. For example, if a character asset has both shirt and pants mesh, user can define sperate two separate sections for shirt and pants, and the nearest neighbor search will be performed separately on those two sections.

C++ Source:

  • Plugin: NearestNeighborModel

  • Module: NearestNeighborModel

  • File: NearestNeighborModel.h

Editor Properties: (see get_editor_property/set_editor_property)

  • attribute_name (Name): [Read-Write] A float vertex attribute that is used to compute weight maps

  • excluded_frames (Array[int32]): [Read-Write] Frames to be excluded from the nearest neighbor ROM

  • external_txt_file (str): [Read-Only] The path to the txt file containing vertex weights. The number of lines equals to the number of vertices in skeletal mesh with each line being a float for vertex weight.

  • neighbor_meshes (GeometryCache): [Read-Write] Geometry cache of the nearest neighbor ROM.

  • neighbor_poses (AnimSequence): [Read-Write] Poses of the nearest neighbor ROM.

  • num_pca_coeffs (int32): [Read-Write] Number of PCA coefficients for this section. // TODO: rename to NumBasis

  • num_vertices (int32): [Read-Only] Number of vertices in this section

  • runtime_num_neighbors (int32): [Read-Only] Number of neighbors in this section after excluding frames

  • vertex_map_string (str): [Read-Write] A string containing vertex indices for this section, e.g. “2, 3, 5-8, 9, 11-20”

  • weight_map_creation_method (NearestNeighborModelSectionWeightMapCreationMethod): [Read-Write] Method to create weight map for this section.

does_use_pca() bool

Does Use PCA

Return type:

bool

get_asset_neighbor_coeffs() Array[float]

Get Asset Neighbor Coeffs

Return type:

Array[float]

get_asset_num_neighbors() int32

Get Asset Num Neighbors

Return type:

int32

get_basis() Array[float]

Get Basis

Return type:

Array[float]

get_num_basis() int32

Get Num Basis

Return type:

int32

get_vertex_map() Array[int32]

Get Vertex Map

Return type:

Array[int32]

get_vertex_mean() Array[float]

Get Vertex Mean

Return type:

Array[float]

get_vertex_weights() Array[float]

Get Vertex Weights

Return type:

Array[float]

property num_pca_coeffs: int

rename to NumBasis

Type:

(int32)

Type:

[Read-Write] Number of PCA coefficients for this section. // TODO

property num_vertices: int

[Read-Only] Number of vertices in this section

Type:

(int32)

property runtime_num_neighbors: int

[Read-Only] Number of neighbors in this section after excluding frames

Type:

(int32)

set_basis_data(vertex_mean, basis) None

Set Basis Data

Parameters:
set_neighbor_data(neighbor_coeffs, neighbor_offsets) None

Set Neighbor Data

Parameters: