Git Product home page Git Product logo

Comments (3)

chinedufn avatar chinedufn commented on June 30, 2024 1

Published a tutorial on this https://github.com/chinedufn/webgl-wield-item-tutorial

from skeletal-animation-system.

chinedufn avatar chinedufn commented on June 30, 2024

@kevzettler First off.. apologies on my end. This skeletal animation work is pretty new and we haven't yet gotten around to examples / posts about how to do some of the common things that one would want to do. Also I'm pumped that you're excited. Feel free to keep those issues and PRs coming so that we can tighten up that pipeline!


So I'm assuming (correct me if I'm wrong) that you have a non-skeletally animated mesh that you want to make follow a bone.

i.e...: a weapon that you want in a character's right hand.


So, given the above, you'd do something like this:

  1. Blend your keyframe poses using skeletal-animation-system
  2. skeletal-animation-system gives you a location and rotation for all of your joints that you blended
  3. Use that blended bone data to animate your character as normal
  4. Also use that same blended bone data to draw your static, non-animated mesh. Just grab the translation and rotation for the bone that you care about and use that to determine where to position your static mesh. In our weapon example that would be your right hand bone's data.

So in essence, skeletal-animation-system only cares about your armature and it's animations so it doesn't specifically know about this use case, but it does give you what you need in order to "do it yourself." Of course over time there should be a separate module that abstracts this grab-the-bone-data-that-you-need-to-position-your-static-mesh process, but for now you can grab it by hand using the returned skeletal-animation-system blended array of bone data.

Again, apologies for the lack of a succinct place to point you to. We'll surely have to make progress over time on this front.


Let me know if that makes sense

from skeletal-animation-system.

chinedufn avatar chinedufn commented on June 30, 2024

Oh and additionally... this is something that I'm soon to need to do in my game so I'll be making a light abstraction layer around this process soon. Feel free to do it on your own in the meantime though. Also feel free to point out anywhere that I was confusing / unclear.

from skeletal-animation-system.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.