General Category > ASL Scripts
BVH File Import into Anim8or
nemyax:
--- Quote from: Steve on June 17, 2015, 08:33:45 am ---I'll post the code it uses
--- End quote ---
Have you thought of publishing Anim8or on something like Github?
SubDrag:
Can you look at this bvh to see why it's not cooperating like your two examples, using your tool.
Here is for sure a valid bvh, I can look at it fine in bvhacker, but it looks off in anim8or after conversion.
http://goldeneyevault.com/priv/animationdamjump.bvh
NickE:
SubDrag,
The file from the link is working fine for me. I have attached the latest version of the program (executable and source) and the an8 file from the conversion. The latest version is smarter about white space in the bvh file than the previous version. I found that GoldenEye bvh files tend to use multiple spaces as a separator rather than the single space or tab. In the previous version, multiple spaces as a separator would cause parsing errors.
The only parameter I changed in BVH2Animator is the scale factor to 0.15, so the figure (originally at 638) would not be so large (more like 100).
SubDrag:
Hi NickE, that is an improvement to the version I had, but there is still an issue actually in conversion.
This is what the bvh looks like in bvhacker:
In the file you posted, the legs cross or something weird at some point:
Trevor:
Ok, so, Ill post our little solution to the problem we found.
First the Problem is that AN8 has Gimble Lock at ZY while most other software has Gimble Lock at XY.
Now, an8 actually proves to be far supirior since the liklyhood of getting GimbleLock is reduced as not many things run the ZY axis.
(It should be noted that an8 uses quaternuions internally which do NOT suffer gimble lock, however this is not the problem)
HOWEVER this proves to be a real problem when directly importing animations made in other software, since as other software approach gimble lock the start to add values to both X and Z which themselves do nothing. An8 however shows these values literally and so you get weird effects.
So, our solution was to move the Gimble Lock back to the XY axis by adding 3 bones at each joint. (originally was 5 as seen in image, however quaternuions do not suffer gimble lock and so the 2 rotations could be combined)
First we take whatever direction the bone is coming from and point it X+
(Image shows z90, this is variable depending on original bone orientation, i.e. had the bone already been pointing X+ then it would rotate 0. If the bone was pointing X- then the bone would rotate 180)
Then we rotate it Y90 (these 2 operations being combined in quaternuions)
Then we add the 'Joint' as a 0 legnth fat bone. (this sets the bone dialoge angles to 0,0,0)
Then we undo all before.
Rotate -Y90
Rotate back to original cource pointing to next bone. (in image the next bone was directly above the first, so we rotate -Z90. Had the next bone been to the right we would rotate 0, had the bone been to the left slightly then we would rotate 100 etc.
All connecting bones are 0 legnth and 0 diameter.
One final consideration and we are done.
Ignore all lables in the bone Orientation Dialoge, the Order is Z, X, Y, Not P Y R.
Attached is an example of a working animation direct from GoldenEye.
Trev
P.S. can anyone tell me if the atached .an8 shows the guard in scene mode?
He works in sequence mode but in scene mode his model is invisible, all I can see is his skeleton working
If he is invisible then does anyone know why?
(clearly something went wrong since the animation pictured above, which actually shows him)
P.S.S Doesnt matter I found it... Sub put him on the root bone accidently in the latest version.
The root bone is useless grrr
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version