0
\$\begingroup\$

I'm working with 3D models from an existing game with its own proprietary file formats, however the way they work is pretty standard:

  • Skeleton is defined as a set of bones, each bone either has a parent bone or not (in which case it's the root of the model) and a matrix which moves the bone into the coordinate space of its parent (if I am using the right terminology).
  • Skin is defined as a set of vertices and faces. Each vertex links to 1 or more bones, each with a weighting value that adds up to 1.
  • Animation keyframes store values for each bone as translations (x, y, z) and quaternions (x, y, z, w).

I have the source code for the graphics engine, and by combining it with LearnOpenGL's Skeletal Animation (and a lot of trial and error) I was able to render the animation keyframes in wireframes.

What I'm trying to achieve is a visual editor to be able to define my own animation keyframes. I don't need to edit the skeleton/bone structure, relations or matrices, or edit the skin vertices/faces/weights.

So my question is, how can you do this in a visual way? How can you "draw" a quaternion on the screen and let the user move it around with the mouse? It's just a bunch of numbers - by my understanding the (x, y, z) defines a vector and thereby the plane that is perpendicular to that vector, and the w defines the angle of rotation in that plane. That's well and good as a mathematical explanation, but nobody can type in numbers for that vector/angle and get the result they want. They think in terms of "move the leg right a bit" or so on, but that small movement would likely change all 4 values in the quaternion. How do mainstream 3D editors handle this?

Many thanks!

\$\endgroup\$
2
  • \$\begingroup\$ "How do mainstream 3D editors handle this" sounds like a question you could answer with a search. What do you need us to tell you that you can't get from looking at images or videos of existing tools, or grabbing a free game engine like Unity and trying it its rotation tools yourself? \$\endgroup\$ Commented May 2, 2023 at 22:03
  • \$\begingroup\$ Only if I knew what to search for. I wouldn't have known that 3-axis-thingy is called a "rotation gizmo" to search it. And it rather demonstrates my point anyway, that's a visualization of roll-pitch-yaw, you grab one of the 3 handles and rotate in one of 3 directions. Its exactly the system that quaternions are there to avoid. What if I want to rotate it on a plane tilted 25 degrees left of the red arrow? \$\endgroup\$ Commented May 5, 2023 at 9:41

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.