Skinned Metaball Builder Manual -Introduction- (English)


Skinned Metaball Builder Manual -Introduction-


Brief Summary 

"Skinned Metaball Builder" is a Unity Asset that provides a functionality of Making Mesh data via metaball with features:

Works on editor and at runtime.


- No dependency on platforms.

- Created mesh can be saved as an asset.

- Skinned (optional) so that mesh can be animated.

- With "skeleton" objects for various use.


- Support simple linear-projection texture mapping


- Fully implemented with Unity C# script, letting you customize.


Quick Start

<Turn on "CC" for explanation.

  1. Drag and drop "Metaball/Prefabs/SkinnedSeed" into your scene.
  2. Choose "SkinnedSeed/SourceTree" in hierarchy.
  3. "Ctrl+Shift+C" or "Command+Shift+C" to create a new metaball node.
  4. Move it, modify its "base radius" as you like.
  5. Repeat 3-4 (Changing node selection to be the parent of new node).
    The hierarchy under "SourceTree" is reflected into the "skeleton" generated later.
  6. "Ctrl+Shift+R" or "Command+Shift+R" to generate mesh.
  7. Press "run" button in editor,
    select some node under "SkinnedSeed/BoneRoot",
    and rotate it to confirm that your mesh transforms.
  8. "Metaball->SavePrefab" to save full prefab
    or "Metaball->SaveMesh" to save mesh only.


Three samples within package.

Each implementation is quite simple and easy,
but introduces well about this asset.



"Dungeon" sample shows how to modify mesh at runtime.

You can walk and dig through metaball-modeled dungeon.



A,W,S,D to move

Space to "dig"

Mouse move to look around 




"Animation" sample shows how to animate skinned mesh.

Two objects are contained:

-"Golem" : Unity animation

-"Tentacle" : Physics (joint)


Various objects :)



Technical Introduction

Knowing about the algorithm helps you to find good parameter values.

Creating a metaball surface


1. Calcurate and fill scalar field by metaballs information (center, radius and density).

2. Create mesh data from the scalar field via "marching cubes" algorithm( Marching cubes - Wikipedia, the free encyclopedia ).





  • Numbers of grid cells and vertices are limited (1000000/300000 by default).
    These are defined in MetaballBuilder.cs.
    Search "_maxGridCellCount", "_maxVertexCount".
    Be careful : building mesh with too large values may Freeze your system.
  • Rebuilding mesh may take long time depending largely on the grid size.
    Per-frame rebuild is not recommended (excluding cases that you require low-resolution metaball or you suppose your application to run on a monster PC).
  • Only one material can be applied per mesh.
  • Texture mapping is supported but simple linear-projection only.