I took a quick look at the script and there were a few things wrong.
First the quaternion needed to be transposed (i.e. transpose the associated rotation matrix) :
Code: Select all
BoneQuat = NoeQuat( (bs.readHalfFloat(), bs.readHalfFloat(), bs.readHalfFloat(), bs.readHalfFloat()) ).transpose()
Then there was a problem with these lines :
Code: Select all
if Parent is not -1:
RotKeys.append(NoeKeyFramedValue(rotationkeyframe, BoneQuat * BoneLocalRotList[Parent]))#Not sure what this means
else:
RotKeys.append(NoeKeyFramedValue(rotationkeyframe, BoneQuat))
According to your comment you were confused about what this step was for. These lines here are used to convert the quaternion from
local space (relative to the parent) to
model space (relative the model's origin/root), by accumulating the transforms along the bone hierarchy (assuming the bones are well ordered in this case).
However in Noesis, contrary to the bones' transforms that are expected to be in model space, animation data is expected to be in local space, as this is what most games use. So instead you just need to give the transform as is :
Code: Select all
RotKeys.append(NoeKeyFramedValue(rotationkeyframe, BoneQuat))
and
Code: Select all
TrnKeys.append(NoeKeyFramedValue(positionkeyframe, BonePosition))
You also gave the timing data as frames whereas Noesis expects it as time. So I created a variable called framerate that I set at 30 (no clue what the actual anim framerate is, you'll be able to change it if it's not the correct value) and divided all your timings by it to get the value in seconds :
Code: Select all
positionkeyframe = bs.readUShort()//33/framerate
Finally you set your animation to be at 1fps for some reason. I corrected it to use the framerate variable above :
Code: Select all
anims.append(NoeKeyFramedAnim("BlackDesert anim", wholeBones, kfBones, framerate))
And set the Noesis preview to it too
Code: Select all
rapi.setPreviewOption("setAnimSpeed", str(framerate))
If you have several different framerates later and want to use the anim framerate instead of a global one, go to Tools->DataViewer->Persistent Settings->Other->"Always use anim framerate" and set it to 1.
Do all that and you should end up with something like this, not sure if this is perfect but at least it looks better
Hope that helps
fmt_Black_Desert_paa.zip
You do not have the required permissions to view the files attached to this post.