Manipulating bones
xyz nope, already tried that.. the only way to rotate the balls into place of bones is to do this, but this wont solve the flipped action when you try to move them with mouse
new_ball.global_transform = pos.rotated(Vector3.UP,PI)
If you rotate from behind the face and try to move the ball then it moves but its flipped.
xyz yeah, it makes no difference. here is project.
i deleted the blend files because they are too big. if you cant open the project without them let me know.
main.tscn
is the main world that holds garbanzo_anim3.tscn
garbanzo_anim3.tscn
spawns the balls inside it.
ball_node.tscn
holds info and movement about the ball.
xyz what do you mean minimal? this is the minimal it has like 14 bones or something that i placed manually.
without mesh? then whats the point if you cant see the deformation?.
The problem is that somehow the skeleton3d global transform is rotated 180 for some reason. maybe its a bug?
ill try to do that later but what am i testing in the minimal project? i will still have to have a ball node, a camera and a mesh with bones.
- Edited
kuligs2 what do you mean minimal? this is the minimal it has like 14 bones or something that i placed manually.
without mesh? then whats the point if you cant see the deformation?.
Two bones, so the asset file size is minimal. Your problem is not with mesh deformation, it's with joint transforms. Nothing to do with the mesh. Cultivate the ability to fully isolate the problem. That's what "minimal" means in the "minimal reproduction project".
kuligs2 maybe its a bug?
Of course it's a bug. It's just much much more likely it's situated in your code, not in the engine code.
xyz idk.. well i recreated with simpler char body and few bones.
Kinda works, kinda doesnt.
Bone manipulation works but not all bones are located where they are in blender.
The arm bones.. hmm. maybe the bone base is at the junction/joint? there are few balls that spawn at the same spot.
But the head/nose bone is not visible in godot but it is present in blender and i can move it around. Ofc.. blender does not allow them arm bones to be moved like i do in godot (only rotation is allowed)
- Edited
kuligs2 Then it doesn't reproduce the initial problem. Create the exact same hierarchy above the joints as initially, with all the same transforms (in Blender and in Godot), just use few bones and no mesh. Some of those parent transforms may be messing the things when transforming from/to local joint spaces, if your code doesn't properly take them into account.
Replicate the initial problem in a minimal project, check if the project is self contained, then post it.
xyz Create the exact same hierarchy above the joints as initially, with all the same transforms (in Blender and in Godot)
i just did that, and i posted the project above. Not sure what you mean joints, but i created new skeleton armature with new bones and simple box mesh. I never rotated armature in blender, not in this or previous projects.
Not sure what you mean..
But later i will play more with this..
But i still dont understand why the additional bones (free floating) are not visible in godot, while they are in blender.
xyz problem is more of a question, why not all bones are visible in correct locations in skeleton3d and why as previously stated the left right movement is flipped in some cases?
I will do more tests.
But i will never be able to replicate the initial face armature because it was hand made (bone placement). And recreating simple skeleton, kinda fixed the left-right movement problem but the floating bone problem is still persistent.
- Edited
kuligs2 The bone misplacement is likely due to improper setup in Blender or import/export process. So double check there and try a different file format. If you want to get it checked by somebody else, again make a minimal Blender file that still causes the problem.
When hunting bugs always proceed by cutting down their potential dwelling space little by little until they are completely cornered, hence easy to probe and eventually catch. Just like you'd do with an actual insect buzzing around your house.
xyz Interesting observation, godot cuts off last bone.
Previously in blender..
Added more bones
Now the root bones are visible in godot
Global transforms seem to be correct now, (new blend file, reimpored from scratch)
And now manipulating the root bone of that bone chain works kinda, still jumping around like mad sometimes, but manipulating the tip bone is still opposite,random.
So maybe my question is - is there a better way to create manipulators to pose the mesh in godot game? like for character creation, you create hooks/grabbing points for user to grab and stretch to create the face they want, record the position of the manipulations and then on model load apply these manipulations to have the consistent facial deform.
I thought the bone manipulation would be easy, it seem its not so...
I think i know whats the problem. When the ball is clicked it rotates to look at camera, but when ball is moved the bone sets the ball global position and transform and so the ball rotates back facing away or whatever and so this messes up the position left-right, so in one frame it tries to go left in other right because it flips from looking at camera to the transform of the bone wich is different..
Ill try to fix this tomorrow.
kuligs2 So maybe my question is - is there a better way to create manipulators to pose the mesh in godot game?
If I understand correctly, you're trying to use bones for what is normally done with shapekeys. That's a very interesting approach. I'll keep an eye on the topic. My plan is to start experimenting on this topic in about a month
But i will never be able to replicate the initial face armature because it was hand made (bone placement).
It's a strange approach to learnflow. Usually first, as a base, do something simple that can always be easily repeated.
Tomcat It's a strange approach to learnflow. Usually first, as a base, do something simple that can always be easily repeated.
imo this is as simple as it can get using sort of production mock up models.. i mean why would i try to do this on a cube mesh with one bone where if you start adding more bones it gets very complex?
Also this way i learn how to and not to create bones in blender.
Tomcat If I understand correctly, you're trying to use bones for what is normally done with shapekeys.
whats a shape key?
xyz uhm, i think i did that because i needed the x/y/z axis to be in aligned position with the mouse positive negative x/y axis so that it could translate without the trying to convert them somehow i cant even imagine right now..
kuligs2 lol I was about to suggest that your origin axis or something to that effect was flipped in Blender