Page 1 of 1

makehuman+Ogre model problem

PostPosted: Sat Apr 12, 2014 11:09 am
by robel
Hi,
hope i get solution to my problem
i animate my model using bvh files manually .
So i create model using makehuman , i select armature model , and i export it as i use ogre , i export it to ogre3d formt
when i read the .skeleton
i get it have
hips,thigh.L
hips,thigh.R
as bones , i said ok

but when i export it as .bvh file i get this joints (or bones)
hips,__thigh.L,thigh.L
hips,__thigh.R,thigh.R

why in my skeleton file i don't have "__thigh.L" and"__thigh.R"

i need them because in my programe i use nbones names to animate the model
for exemple
if skel->getBone(i)== bvh_name(j) // animate bone (i) using the orientation of the joint in the bvh file

so i will never use __thigh.L of the bvh file ,

Re: makehuman+Ogre model problem

PostPosted: Sun Apr 13, 2014 9:05 am
by robel
HI there
there is noway to turn off dummy bones in the bvh file ?

Re: makehuman+Ogre model problem

PostPosted: Mon Apr 14, 2014 8:52 am
by ThomasL
Dummy joints seem to be hardcoded into the bvh exporter currently. It should be easy to make it into an export option instead.

Re: makehuman+Ogre model problem

PostPosted: Mon Apr 14, 2014 10:13 am
by duststorm
The API supports this already, it's just not a GUI option.

Exporting dummy joints in BVH is a sane option as it is the only way to get consistency across all importers. Dummy joints are easily ignored (it does not hurt if you do not set or read their orientation, they usually have no animation data of their own). Ignoring joints with names starting with '_' is probably what you will want to do in your code.

Otherwise, you can use the shell in MH and enter the following to export a BVH without dummy joints:
Code: Select all
import gui3d
human = gui3d.app.selectedHuman
import bvh
b = bvh.createFromSkeleton(human.getSkeleton(), animationTrack=None, dummyJoints=False)
b.writeToFile("path/to/my/file.bvh")


Perhaps we could add the option to the gui, but I wonder how often it will be used. More importantly, how to call the option? "Export dummy joints" is correct but might sound like chinese to many. If added it should be accompanied with the necessary documentation. But perhaps the documentation in the bvh.py module can be quickly converted.