Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7168603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:48:48+00:00 2026-05-28T14:48:48+00:00

I am trying to do skeletal animation with GLSL. For each bone, I have

  • 0

I am trying to do skeletal animation with GLSL. For each bone, I have a translation(x,y,z) and a rotation(pitch, roll, yaw) (in degrees). I could construct a 4×4 matrix for each bone but that would take alot of register space in the shader, so I would like to only have to store the 6 values I have per bone, but I don’t know how to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:48:49+00:00Added an answer on May 28, 2026 at 2:48 pm

    What I don’t know how to do is how to rotate a point using the rotation vec3 I have.

    Simple: don’t.

    Yaw-pitch-roll is a terrible way to encode an orientation, especially for an animation system. Use a quaternion instead. It’s 4 values rather than 3, and the code for rotation is well-known.

    Also, it doesn’t require heavy-weight operations like sin and cos.

    If you want to compare and contrast the effort needed, consider the math.

    Given a quaternion q, a position v, you need to do this to rotate it:

    vec3 temp = cross(q.xyz, v) + q.w * v;
    vec3 rotated = v + 2.0*cross(q.xyz, temp);
    

    That’s a fair bit of math. Now, consider what you have to do for your YPR case, given :

    vec3 cosYPR = cos(ypr);
    vec3 sinYPR = sin(ypr);
    

    That’s not everything. But that’s enough. That’s three cos and three sin operations. These are not fast operations. That alone probably takes about as long as the entire quaternion/vector rotation computation. But after doing this, you now have to do several multiplies and adds to compute the 3×3 matrix. And then, after all that, you still have to do the actual matrix multiply to rotate the vector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple skeletal mesh created with Blender and I'm trying to export
Trying to get comfortable with jQuery and I have encountered some sample code that
So what I'm trying to do is take the Kinect Skeletal Sample and save
Trying to figure out how to do this. I have the style but I'd
Trying to format a mutliline string in Ruby heredoc and %q{ } have the
Trying to comply with StackOverflow's suggestion of asking a question, not creating a discussion,
Trying to use this method (gist of which is use self.method_name in the FunnyHelper
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to parse an HTML document and extract some elements (any links to text
Trying to avoid the SomethingManager trap here... Let's say I'm going to write a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.