lowenware / dotrix

A 3D engine with ECS and Vulkan renderer for Rust developers
https://dotrix.rs
MIT License
290 stars 11 forks source link

Hybrid skeletal animation #164

Open Lowentwickler opened 2 years ago

Lowentwickler commented 2 years ago

We need a possibility to mix animations, for example run and shoot

QuantumEntangledAndy commented 2 years ago

Perhaps on a compute shader.

Load a two bones transform matricies and the vertex buffer and weights.

Apply both to the vertex buffer separately.

Combine the verts with weighted average on the result.

Write result to a buffer.

For multiple mixes we simply apply the compute multiple times with appropriate weights.

Lowentwickler commented 2 years ago

Moving of animation calculations to compute shader in general is a quite interesting idea.