Class WildlifeBodyMesh
Builds a species' procedural body (WildlifeBodySpec): one flat-shaded low-poly mesh, shared by every animal of the species, animated entirely in the vertex shader (FishMMO/Wildlife).
public static class WildlifeBodyMesh
- Inheritance
-
WildlifeBodyMesh
- Inherited Members
Remarks
The animal faces +Z, stands on y = 0 and is centred on x = 0.
The vertex contract: colour rgb is the albedo (back, belly, accent, horn); UV1 xyz is the pivot of the vertex's part in mesh space and w its part (WildlifeBodyMesh.Part). The shader swings each leg about its hip, the head group about the neck base and the tail about its root.
Methods
Build(WildlifeBodySpec, string)
Builds a body mesh from spec.
public static Mesh Build(WildlifeBodySpec spec, string name = "Wildlife")
Parameters
specWildlifeBodySpecnamestring
Returns
- Mesh
For(WildlifeTemplate)
The species' shared mesh, built on first use.
public static Mesh For(WildlifeTemplate species)
Parameters
speciesWildlifeTemplate
Returns
- Mesh