Back to Filament

skinning

docs/android/dokka/filament-android/com.google.android.filament/-renderable-manager/-builder/skinning.md

1.75.02.8 KB
Original Source

//filament-android/com.google.android.filament/RenderableManager/Builder/skinning

skinning

[main]
open fun skinning(skinningBuffer: SkinningBuffer, boneCount: Int, offset: Int): RenderableManager.Builder

Enables GPU vertex skinning for up to 255 bones, 0 by default.

Skinning Buffer mode must be enabled.

Each vertex can be affected by up to 4 bones simultaneously. The attached VertexBuffer must provide data in the BONE_INDICES slot (uvec4) and the BONE_WEIGHTS slot (float4).

See also setSkinningBuffer, setBonesAsMatrices or setBonesAsQuaternions, which can be called on a per-frame basis to advance the animation.

Return

this Builder object for chaining calls

Parameters

main

skinningBuffernull to disable, otherwise the SkinningBuffer to use
boneCount0 to disable, otherwise the number of bone transforms (up to 255)
offsetoffset in the SkinningBuffer

See also

setSkinningBuffer
SkinningBuffer

[main]
open fun skinning(boneCount: Int): RenderableManager.Builder

[main]
open fun skinning(boneCount: Int, bones: Buffer): RenderableManager.Builder

Enables GPU vertex skinning for up to 255 bones, 0 by default.

Skinning Buffer mode must be disabled.

Each vertex can be affected by up to 4 bones simultaneously. The attached VertexBuffer must provide data in the BONE_INDICES slot (uvec4) and the BONE_WEIGHTS slot (float4).

See also setBonesAsMatrices, which can be called on a per-frame basis to advance the animation.

Parameters

main

boneCountNumber of bones associated with this component
bonesA FloatBuffer containing boneCount transforms. Each transform consists of 8 float. float 0 to 3 encode a unit quaternion w+ix+jy+kz stored as x,y,z,w. float 4 to 7 encode a translation stored as x,y,z,1

See also

SkinningBuffer