maui.94
Can someone explain what the X bone is used for? Specifically femurX and humerusX. Why are they there?
A technical discussion on the purpose of 'X bones' (femurX, humerusX) in Jedi Academy models, focusing on preventing mesh twisting and how to implement constraints for better deformations during the rigging process.
[2024-09-02 14:45] <maui.94> Can someone explain what the X bone is used for? [2024-09-02 14:45] <maui.94> femurX, humerusX for example [2024-09-02 19:23] <archangel35757> X-axis rotation only... to alleviate mesh candy-wrapper twisting (edited) [2024-09-02 19:31] <maui.94> At the knees you mean? [2024-09-02 19:31] <archangel35757> At the joint where the X bone begins [2024-09-02 19:32] <maui.94> Why would that twist? I don't understand the use of it [2024-09-02 19:32] <archangel35757> Upperarms, Forearms and thighs (edited) [2024-09-02 19:34] <archangel35757> The upper arm would twist if the lower arm is rotated. So that X bone is there to alleviate the twisting (edited) [2024-09-02 19:35] <archangel35757> Google "twist bones" [2024-09-02 19:36] <archangel35757> Or likewise if you rotated the upper arm bone at the shoulder joint (edited) [2024-09-02 19:38] <maui.94> I am googling it, found a video that explains it (fast) [2024-09-02 19:38] <maui.94> https://www.youtube.com/watch?v=LTQ9gyeaeWI [2024-09-02 19:39] <maui.94> But here, he is using constraints on the bones [2024-09-02 19:39] <maui.94> If we make changes to the bones, will the game still accept it? (edited) [2024-09-02 20:31] <mrwonko> It depends [2024-09-02 20:33] <mrwonko> What kind of changes, and how do you define accepting it? [2024-09-02 20:34] <mrwonko> New animations using the same base pose? Adding or removing bones? Should existing models continue to work? Do you want the model to be playable in multiplayer without code changes? [2024-09-02 20:36] <mrwonko> If you create something like a new NPC, you can go wild and do whatever. If you're willing to change the code, the sky is the limit. Outside of those cases, some limitations apply, but it depends [2024-09-02 21:24] <maui.94> No adding or removing bones, just adding constraints or something which could make the deformations look better [2024-09-02 21:24] <maui.94> But I don't know if those changes are applied when exporting the glm [2024-09-02 21:26] <maui.94> I suppose I'll have to learn more about rigging and preparing a model by fixing its topology before even attempting to weight or fix weighting on jka models [2024-09-02 21:26] <.mjt> Constraints only help when animating [2024-09-02 21:27] <.mjt> The glm doesn't care or know about them [2024-09-02 21:27] <.mjt> And a gla won't either, as in you cannot prepare a skeleton that retains constraints into the game [2024-09-02 21:28] <.mjt> As in for broadsword [2024-09-03 11:31] <minilogoguy18> I did this in softimage. Rotating the wrist constraint let the arm twist organically and evenly by running a silver that essentially rotated the twist bone at 50% of the next bone up the chain [2024-09-03 11:31] <minilogoguy18> You should easily be able to replicate this in blender [2024-09-03 11:32] <minilogoguy18> Just don't build the rig onto the actual skeleton @Maui [2024-09-03 11:33] <minilogoguy18> Build another skeleton that matches the global transforms over top the games skeleton, build your rig around that then constrain the JA skeleton to it [2024-09-03 11:33] <minilogoguy18> Since the JA skeletons hierarchy doesn't work at all for building a rig [2024-09-04 11:25] <maui.94> ? [2024-09-04 13:24] <maui.94> Something like? / https://i.imgur.com/vzjvZt7.png [2024-09-04 14:03] <minilogoguy18> Yeah but I would avoid adding the twist bones to the chain. Ot doesn't work well. Just have 2 arm and leg joints but add nulls where the twist bones are. Add a constraint with a solver that rotates the nulls 50% based on the rotation of the joint down the chain. [2024-09-04 15:21] <minilogoguy18> I gotta learn blender so I can actually explain more [2024-09-04 17:37] <minilogoguy18> Lol [2024-09-04 17:38] <maui.94> What are nulls? [2024-09-04 17:38] <maui.94> And what are solvers [2024-09-04 17:41] <minilogoguy18> I dunno if blender uses the same terms [2024-09-04 17:41] <minilogoguy18> Nulls or dummy objects as max calls them are just like empty objects [2024-09-04 17:41] <minilogoguy18> IK solver [2024-09-04 17:42] <minilogoguy18> Inverse kinematics [2024-09-04 17:56] <maui.94> Ah IK's [2024-09-04 17:56] <maui.94> Yeah I'll have to follow a tutorial on how that works [2024-09-04 21:46] <tempust85> nulls = empty objects in blender, I know that much 😄
Can someone explain what the X bone is used for? Specifically femurX and humerusX. Why are they there?
They are for X-axis rotation only, used to alleviate 'mesh candy-wrapper twisting' at the joint where the X bone begins. You'll see them on upper arms, forearms, and thighs.
The upper arm would twist unnaturally if the lower arm is rotated, so that X bone is there to distribute that twist and keep the mesh looking organic. If you rotate the upper arm bone at the shoulder joint, you get the same issue. You can search for 'twist bones' to see the general concept in 3D modeling.
I found a video explaining it, but the author is using constraints on the bones. If we make changes like adding constraints to the bones, will the game still accept it? https://www.youtube.com/watch?v=LTQ9gyeaeWI
It depends on what kind of changes you mean and how you define 'accepting it.'
Are you making new animations using the same base pose? Adding or removing bones? Do you need existing models to continue to work, or do you want the model to be playable in multiplayer without code changes? If you're creating a new NPC, you can basically do whatever you want. If you're willing to change the code, the sky is the limit. Outside of those cases, there are limitations.
I'm not adding or removing bones, just considering adding constraints to make the deformations look better. I just don't know if those changes are actually applied when exporting the .glm. I suppose I'll have to learn more about rigging and fixing topology before I even attempt to fix weighting on JKA models.
Constraints only help when you are actually animating. The .glm file doesn't care or know about them, and a .gla won't either. You cannot prepare a skeleton that retains constraints once it is exported into the game format.
I used to do this in Softimage. Rotating the wrist constraint lets the arm twist organically by running a solver that essentially rotates the twist bone at 50% of the next bone up the chain. You should be able to replicate this in Blender easily.
My advice: don't build the rig onto the actual skeleton. Build another skeleton that matches the global transforms over the top of the game's skeleton. Build your rig around that, then constrain the JKA skeleton to it. The default JKA skeleton hierarchy doesn't work well for building a functional rig directly.
I would avoid adding the twist bones directly into the IK chain, though. It doesn't work well. Just have two arm and leg joints, but add nulls where the twist bones are. Add a constraint with a solver that rotates the nulls 50% based on the rotation of the joint down the chain.
What are nulls and solvers in this context? Is that like IK?
I'm not sure if Blender uses the same terms, but 'nulls' (or 'dummy objects' in 3ds Max) are just empty objects. And yes, IK solver stands for Inverse Kinematics.
Nulls are definitely 'Empty' objects in Blender, I know that much!