Skinned Metaball Builder Manual -Tips- (English)

Skinned Metaball Builder Manual -Tips-




Confirm metaball structure (Skinned Metaball)


Disable "SkinnedMesh" or "StaticMesh" to see metaball structure (and bones for Skinned).


Convert From Static to Skinned (or reverse)

Just copy GameObject tree under "SourceRoot" to other MetaballSeed (Static or Skinned) and the metaball structure is ported.

But some parameter modification on seed may be required.


Using multiple Materials


One metaball mesh can be rendered with only one material.

But you can simply combine ones (although they are not blended).


Deletable Objects

After you created your mesh, some of GameObjects and Components can be deleted.

- MetaballSeed(Static/Skinned) component

- SourceRoot GameObject (and its children)

- TextureGuide GameObject

- MetaballCellObject component (but it is recommend to set MetaballSeed's "CellObjPrefab" null and rebuild mesh instead)

Although the mesh will not be modified, doing this helps you publish your model data without dependency on this asset.


Usage of "CellObjPrefab"

Although it is set to null by default,

CellObjPrefab can be used in various ways.

- Building Joint connection ( see "Tentacle" in "Animation" sample scene )

- As "handles" to control bones ( for skinned metaball )

- As "waypoints" for AI ( "Dungeon" like usage )


Building mesh fails

In most case, it is because of exceeding the limitation of the number of grid cells.

In that case, an error message says

"Too many grid cells for building mesh (1168200 > 1000000 ).
Make the area smaller or set larger (MetaballSeedBase.gridSize)."

To solve the error, follow the message.

Another solution is to modify the limit value


    const int _maxGridCellCount = 1000000;


But using too many grid cells may cause your system freeze

(the capacity depends on the spec and condition of your system).


Logs says mesh has been leaked

When you build a mesh and save the scene, you may see a log saying

"Cleaning up leaked objects in scene since no game object, component or manager is referencing them
 Mesh  has been leaked (some number) times."

But it seems that there are no actual leaks in usual case.