Page 2 of 2

Re: [Help] Weights issue in Noesis script

Posted: Sun Feb 16, 2020 10:12 pm
by jayn23
I try to mimic the script in the thread provided. Unfortunately, the result is still a mess :[ . Could you help to take a glance if I need to modify something? Here is the full version:
unfortunately i am not sure where the problem is, my TempMat is in world space so i guess that should be converted as well, but when i tried converting it didn't work for me, maybe someone with a bit more experience can step in and help us? :D

Re: [Help] Weights issue in Noesis script

Posted: Mon Feb 17, 2020 10:12 am
by srbvn
Yes, hope someone could help us a hand. Also, do you have any idea about the matrix (parentMat) below every bone matrix? We are currently not using it. Hope to hear your advise.

Code: Select all

	# read 4x4 bone matrix
        boneMat = NoeMat44.fromBytes( bs.readBytes(0x40), NOE_LITTLEENDIAN )
        # convert and inverse to 4x3 matrix
        boneMat43 = boneMat.toMat43().inverse()
        # read 4x4 parent bone matrix
        parentMat = NoeMat44.fromBytes( bs.readBytes(0x40), NOE_LITTLEENDIAN )
        # convert and inverse to 4x3 matrix
        parentMat43 = parentMat.toMat43().inverse()
I had thought it is the maxtrix of parent bone so I named it parentMat, but it seem not true.

Re: [Help] Weights issue in Noesis script

Posted: Mon Feb 17, 2020 11:08 pm
by jayn23
well i tried something very simple to check if the extra matrix is the locale space:

i extracted the skeleton to collada (.dae) which stores the matrix in locale space as far as i know, printed out the matrix in noesis and compared
they were not the same. so still no clue, but if its not the locale space it not very helpful anyway.

Re: [Help] Weights issue in Noesis script

Posted: Sat Feb 22, 2020 6:20 pm
by srbvn
Hi jayn23,
I still could not know how the matrices in animation files work, but I could now found the animation file that has the same numbers of bone with the model. So, hope you could try again if your algorithm work. In game, this is a fox being jump and bite.

To be honest, I have tried to read about matrices in 3D graphics, DirectX (the game use DirectX), local space and world space but still have no clue T.T.
Also, here is my curent script (new lines added but still not work): https://pastebin.com/4sgQwuJR

Kindly refer to the attachments
Example file has 5 animations inside and model has 41 bones.