Davin Posted February 1, 2016 Share Posted February 1, 2016 so i've blown the last few days, so i thought, perfecting the MH->blender->makewalk->babylon sequence.... The main question gets messy and confusing, but first i'll try to explain what i'm doing so far. I've got my animations figured out, and i've extracted them on a bone by bone basis.... I've then applied them pragmatically to other [model].babylon that share the same bone structure... working well! Although --- i have questions on this, there must be a better way to do this. not the main issue I thought i was golden, animations play pretty well.... until i got to moving meshes... for hours i was puzzled trying to figure out why avi's were not moving, until i realized just the eyes were moving... further research led me to realize that the whole "parent" structure was missing so my main question is.... what IS the correct parent->child structure for an imported mesh? Is is something i can reconstruct pragmatically? or do i need to go fix somethign in blender? (ultimately the .babylon files will go away, as customization will be saved in serialized objects... but not quite there yet) as a secondary question... is there a better way to deal with these animations? for example... several different imported meshes (with the same bone structure of course) will share the same animations... I've been toying with an animation serializer / deserializer, but i dont quite have that working yet. Quote Link to comment Share on other sites More sharing options...
Davin Posted February 1, 2016 Author Share Posted February 1, 2016 side note... my parenting issue is not related to my animation import process.... i've tested bypassing that Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 1, 2016 Share Posted February 1, 2016 I think @gryff could help you Quote Link to comment Share on other sites More sharing options...
Davin Posted February 2, 2016 Author Share Posted February 2, 2016 I've worked out a solution --- I'll make mention of it here in case its useful for anyone else: So i never really found a good way to automatically add a parent node in blender, and i wanted to make the the whole makehuman->blender->babylon process as simple as possible, as i hope to incorporate some help building out avatars and animations... as I'm already pre-processing .babylon files on the server, this seems to be working out just fine : php code: if (!isset($avi->meshes[1]->parentId)){ array_unshift($avi->meshes, array('name'=>$name, 'id'=>$name, 'position'=>[0,0,0], 'rotation'=>[0,0,0], 'scaling'=>[1,1,1], visibility=>1, 'skeletonId'=>'-1', 'isEnabled'=>true)); for ($i = 1; $i < count($avi->meshes); $i++){ $avi->meshes[$i]->parentId = $name; } } which basically pops a minimalist mesh at the top of the stack, and parents everything else to it. Animations still seem to be happy, and the world is good! Not the most graceful work around, but it works! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.