Page 1 of 1

FrostBite skeleton hierarchy

Posted: Sun Jul 27, 2014 11:27 am
by dainazinas
Hi,
So I`m trying to figure out how skeleton hierarchy work in frostbite games. The hierarchy that is laid out in the file does not make much sense in 3ds max for me and I cannot find a proper way of how to parent the bones using skeleton file. So I turn to you guys for help with this, as I know you have tons of experience with this.
Here is the skeleton file https://dl.dropboxusercontent.com/u/881 ... tSke01.txt
and here is my maxsript that deals with it https://dl.dropboxusercontent.com/u/881 ... 81.3%29.ms

Guys please give me a hand with this :)

thanks

Re: FrostBite skeleton hierarchy

Posted: Sun Jul 27, 2014 10:06 pm
by shakotay2
not sure what you mean.
Check whether your parenting looks like this:
bonename boneparentname
Spine Hips
Spine1 Spine
Spine2 Spine1
LeftShoulder Spine2
LeftArm LeftShoulder
LeftArmRoll LeftArm
LeftForeArm LeftArmRoll
LeftForeArmRoll LeftForeArm
LeftForeArmRoll1 LeftForeArmRoll
LeftHand LeftForeArmRoll
LeftHandMiddle0 LeftHand
LeftHandMiddle1 LeftHandMiddle0
LeftHandMiddle2 LeftHandMiddle1
LeftHandMiddle3 LeftHandMiddle2
LeftHandMiddle4 LeftHandMiddle3

Re: FrostBite skeleton hierarchy

Posted: Sun Jul 27, 2014 11:10 pm
by dainazinas
shakotay2 wrote:not sure what you mean.
Check whether your parenting looks like this:
bonename boneparentname
Spine Hips
Spine1 Spine
Spine2 Spine1
LeftShoulder Spine2
LeftArm LeftShoulder
......
Well it seems it`s using integer based hierachy like this:
hips = 1
spine = 4
spine1 = 5
spine2 = 6
leftshoulder = 7

https://www.dropbox.com/s/9y8h8m9fvn7jag5/Capture.PNG

and so on. Tried many different ways using arrays, offsetting them, reversing them. Getting different results but not what I want. And doing it by hand gets very messy as I go near the facebones. Just can`t figure out the proper parenting routine.

Re: FrostBite skeleton hierarchy

Posted: Sun Jul 27, 2014 11:55 pm
by shakotay2
in your script
after this line: BoneParent = hierarchy_array
insert
BP_ID = BoneParent as integer +1

instead of
if (BoneParent != -1) then
newBone.parent = BNarr
use
if (BP_ID!=0) then newBone.parent = BNarr[BP_ID]

Re: FrostBite skeleton hierarchy

Posted: Mon Jul 28, 2014 5:31 pm
by dainazinas
shakotay2 wrote:in your script
after this line: BoneParent = hierarchy_array
insert
BP_ID = BoneParent as integer +1

instead of
if (BoneParent != -1) then
newBone.parent = BNarr
use
if (BP_ID!=0) then newBone.parent = BNarr[BP_ID]


Thank you so much Shakotay2, it works like a dream. Big thanks again. ;]

Re: FrostBite skeleton hierarchy

Posted: Fri Aug 01, 2014 4:08 am
by artworkplay
Just curious but does this mean you can extract Frostbite engine-run game assets with intact in-game skeletons and weights already (cough Battlefield 4 cough)?

Re: FrostBite skeleton hierarchy

Posted: Wed Aug 20, 2014 9:01 pm
by dainazinas
artworkplay wrote:Just curious but does this mean you can extract Frostbite engine-run game assets with intact in-game skeletons and weights already (cough Battlefield 4 cough)?
Yes and no. For now I have only released a version that works with BF3 and MOHWF.
And version for BF4, BFHL ,Plants vs Zombies and Need for speed rivals is coming soon.
https://www.youtube.com/watch?v=GyBvFlj ... LUHUfcuvSA