Animations (Syncing and getting started) #1556
Replies: 1 comment
-
Yes
JoltPhysics/Samples/Utils/RagdollLoader.cpp Lines 124 to 137 in c93401e
You can't. You connect rigid bodies to joints. The vertices of a rigid body are by definition fixed so you don't have to skin them. Skin weights are usually stored with the render mesh rather than the skeleton or the animation.
The API doesn't require using See e.g.: JoltPhysics/Jolt/Physics/Ragdoll/Ragdoll.h Lines 163 to 164 in c93401e |
Beta Was this translation helpful? Give feedback.
-
Hi there,
In my game engine I already have code for loading in animations from
.fbx
files through assimp, I have this function calledset_bone_transforms
:https://github.com/cpp-toolbox/rigged_model_loading/blob/b11401e02585ba9738133a2fa4eab974210856ec/rigged_model_loading.cpp#L509
it returns a vector of
glm::mat4
which represent the transformations for each bone (they are the full transforms after the skeletal hierarchy is parsed), then in my shader each vertex has a collection of indices into the bone animation transform matrix, resulting in a weighted transformation.Note: in my shader each vertex can only be influenced by at most 4 bones and only has support for 100 bones in total right now
Now I want to have a low poly player model that I can use for hitscan against an animated player in jolt that is synchronized to the animated player model that we see in-game
Research:
I found
SkeletalAnimation
which seems promising and looks like I need to call theSample
function there which takes in aSkeletonPose
which I think is initialized by theSetSkeleton
function which takes in aSkeleton
, which seems to contain the hierarchy of bones (armature in blender?)Questions:
Joint
s the same thing as bones?Beta Was this translation helpful? Give feedback.
All reactions