glairedaggers,
@glairedaggers@peoplemaking.games avatar

Got GPU skinning & skeletal animation up and running in Praxis :)

#gamedev #gameengine #tooldev #enginedev #praxisengine

eniko,
@eniko@peoplemaking.games avatar

@glairedaggers how'd you make this work? Whenever I look up how to do it there's very little info about what formats to use or how to actually animate things once a model is loaded

glairedaggers,
@glairedaggers@peoplemaking.games avatar

@eniko I'm currently loading binary GLTF models.

The gist is that I have a hierarchy of "nodes", each of which may or may not correspond to an entry in the final bone matrix array.

To calculate the matrix that actually gets written to that array, you multiply the inverse of the node's bind pose by the current transform of the node (both relative to the skeleton root).

For a set of vertices weighted to that node, you can think of that as first un-transforming the vertices (placing those vertices at origin), then applying the bone's transform (moving them back to where the bone currently is)

For animating, I store a set of "animation channels", which stores what node the channel applies to and a set of animation curves for position, rotation, and scale (relative to the node's immediate parent). These curves are imported from the GLTF's animations.

Then each frame I just traverse the skeleton and sample each node's animation curves to determine its new local transform.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • gamedev
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • provamag3
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • megavids
  • anitta
  • tester
  • JUstTest
  • lostlight
  • All magazines