benoit-1842 Posted May 25, 2016 Share Posted May 25, 2016 Hi everybody !!!! I am using the new babylon exporter version 4.5 with Blender 2.76 and 2.77. I am using makewalk to load the bvh inside my character. Sometime (scarcely) my animation works in babylon but most of the time I get the spaghetti man. I am removing the key 0 with the dope sheet. I am using a character from the make human 1.1.0. Maybe I need to do something i don't know. In the link below, you will find my blend file, bvh and character...... Thanx in advance, Benoit..... File link : https://drive.google.com/folderview?id=0B_ZBy6q5jS8xY3FnQjNMbzROUGs&usp=sharing Quote Link to comment Share on other sites More sharing options...
ecv Posted May 26, 2016 Share Posted May 26, 2016 (edited) A shot in the dark, as I have zero experience with Babylon and the aforementioned programs except a little with Blender. The random behavior you mentioned sounds like it could be a performance issue. I checked the blend file and the animation is literally plagued with keyframes, like one keyframe per frame for several bones at a time. Maybe the problem has nothing to do with this but it's worth a try to remove most keyframes and just leave a few interpolations and see if the performance will get any better. If it does, then I guess you'll need to edit the original and leave only the most critical keyframes in. Edit: Maybe it's got too many polygons? Cheers Edited May 26, 2016 by ecv Quote Link to comment Share on other sites More sharing options...
gryff Posted May 26, 2016 Share Posted May 26, 2016 I looked at the .bvh file alone in Blender, and compared it to the character animation in your problem file, and to the character animation when I used MakeWalk to add it to a figure I exported from MH1.1 In all cases the animation looked alike - the walk of someone who had drunk far too much Crown Royal I exported both my file and the problem file to .babylon and observed them on my local server - both fine. This what I call spaghetti Can you post a picture of the alleged "spaghetti man" behaviour? cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 26, 2016 Author Share Posted May 26, 2016 Yeah the walk is very weird I know.... Yeah maybe too much beer..... Here's a screenshot of my behavior.... It's weird....... Quote Link to comment Share on other sites More sharing options...
gryff Posted May 26, 2016 Share Posted May 26, 2016 Well this is what I get when I export your problem.blend from Blender 2.76 with BE 4.5.0. No "spaghetti" just the er ... Crown Royal walk. Did you try exporting/importing as a .mhx2 file instead of a .dae? cheers, gryff benoit-1842 and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 26, 2016 Author Share Posted May 26, 2016 Yeah late last night i figured out to avoid the spaghetti demo you might have to only use .mhx2 files. It works with .mhx2 files. But i have many .dae files (rigged with mixamo) that i want to use in a babylon context. Those that mean that the exporter is unable to transform correctly .dae files ? Quote Link to comment Share on other sites More sharing options...
gryff Posted May 26, 2016 Share Posted May 26, 2016 Well try this on your problem.blend. The image below shows how your file loads for me - a 250 frame animation but you have set the length to 137 (purple box in image below). So change that to 250. And set the current frame to (the box with 71) to 1. Those are the only changes I made before I did my export. So try exporting with those changes. Quote i have many .dae files (rigged with mixamo) Well there seem to have been issues with such .dae files within the last year. DAE Import into Blender How old are your .dae files? I don't think the issue is the BJS Blender exporter - just remember that a dae file is exported from some program, then is imported by Blender. If there are differences between how the .dae file is exported and what Blender wants - there could be internal issues in Blender that are not visible. In the case of the .mhx2 files, the exporter from MH and the importer for Blender are written by the the people of the MH group. I wish people would not just blame @JCPalmer and @Deltakosh when things don't work right. cheers, gryff Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 26, 2016 Author Share Posted May 26, 2016 I think that the new exporter is fantastic !!!!!! What a good work. I clearly see the improvement over the year !!!! I remember I was doing the same work like 1 year ago with the blender to babylon exporter and I can see right now a sea of difference.... It take way less time to create the babylon file.... The .dae file I am using is the one from Mixamo auto-rigger... I will send you one later because I am right now working..... Thanks everybody for the good work, Benoit Wingnut 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted May 26, 2016 Share Posted May 26, 2016 Did the changes I suggested before exporting work? cheers, gryff GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 26, 2016 Share Posted May 26, 2016 Redoubled setting of frame for all objects, especially armature & mesh, to the same frame when exporting, see version 4.5.1. Think issues with bone animation are now behind us, except for non-applied scale / rotation on meshes with a skeleton. I do not want to have the exporter to apply the scale / rotation for you, changing your .blend, incase you save it. Too many times this got reported though. A message in a log file not good enough. Going to throw an outright exception in future to prohibit any .babylon output (exception will get written to log file) Quote Link to comment Share on other sites More sharing options...
gryff Posted May 27, 2016 Share Posted May 27, 2016 @JCPalmer: just a little image below to let you know what I'm currently playing with. Note the "Master" bone cheers, gryff JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 27, 2016 Share Posted May 27, 2016 You are really pull some strings. This is cmu, which is way too many bones for mobile. I am going to have to do something similar for "Game Engine" rig. Minus the 30 finger bones, it is only 23. Your master bone is where it's root bone is. Do not think root can do double duty. Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 27, 2016 Author Share Posted May 27, 2016 Hey guys hope you are having a wonderful day. So exporting in babylon.js with mhx2 looks fine with the new blender to babylon exporter..... That's very neat ! But I am trying to solve the problem with the .dae files. For example I am auto-rigging a character in Mixamo and export it to Blender everything is fine. I load an animation with Makewalk everything is fine in Blender. But when I export it to babylon... I got the spaghetti man.... I have tried everything Gryff suggest to me with no success... (But thank you Gryff btw)... Maybe my blender file isn't setup properly or I miss something..... I will investigate more this afternoon..... Here's the link to the model I am trying to use as a babylon file and the bvh used with make walk.... https://drive.google.com/file/d/0B_ZBy6q5jS8xVGZjeUtLTEVMT1U/view?usp=sharing thank you very much, Benoit Quote Link to comment Share on other sites More sharing options...
gryff Posted May 27, 2016 Share Posted May 27, 2016 Well Benoit, I've downloaded your files - and I will also try to take a look this afternoon. However I will be dog sitting my daughters two dogs - and her little Italian Greyhound has a wonderful knack of finding trouble cheers, gryff benoit-1842 1 Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 27, 2016 Author Share Posted May 27, 2016 LOL I Imported the .dae with all the options checked and it looks better but it's still distorted.....But at least its not a chef boyardee spaghetti..... Have fun with the dogs..... Me I have a tiny one and he's full of energy !!! Thanks btw, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 27, 2016 Author Share Posted May 27, 2016 I got it work !!!! First you need to check all the import settings for .dae and after ctrl-a to apply everything and as usual remove the keyframe 0.... Thanks Gryff and Mr Palmer for the great help, Regards, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 27, 2016 Author Share Posted May 27, 2016 I maybe shout victory too fast.....I got it work once but I am not able to reproduce it but when I check the log file in the .txt file it saying the same thing in between the good animated model and the faulty one.....weird....but at least I got one that have exported well in babylon. I have a silly question : is it possible to create bone animation directly in babylon.js instead of doing all the animation in blender.... Thanx, Benoit Quote Link to comment Share on other sites More sharing options...
gryff Posted May 29, 2016 Share Posted May 29, 2016 Well Benoit, I tried (twice) your latest .dae model (in your last link) - c3p0 - almost half a million faces. Blender went into a "not responding " mode both times when I tried to add the .bvh file. I gave up on that but I have experimented with some other .dae files - more later when I have it clearly set out. Quote I have a silly question : is it possible to create bone animation directly in babylon.js instead of doing all the animation in blender.... You are not really doing the animation in Blender - rather using it to get animations (mocap) from elsewhere through .dae or .bvh files. If you create animations in Blender it will likely involve IK - and I am not sure that BJS is capable of that but @NasimiAsl I believe has used shaders to create animations. And @JCPalmer did look at using BJS to load ASF/AMC mocap files directly - not sure where that led. cheers, gryff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 31, 2016 Share Posted May 31, 2016 I wrote parsers for both ASF/AMC and BVH in Typescript. I abandoned them in favor of IK in blender. This resulted in the ignoring of bones with .ik in the name as well as supporting Blender actions to BJS animation ranges in the exporter. Now that I got the skeleton interpolator working, I completely dropped using the BABYLON.Animation for storage for my own work. Development of Blender Pose Libraries exported to my own pose implementation in JS is nearly done. Seems like the improvements in the exporter are tied to my own needs, but nothing is stopping anyone from forking. benoit-1842 1 Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 31, 2016 Author Share Posted May 31, 2016 Thank you !!!! I will investigate more when I will have time (I am in the middle of a school teacher rush ;)) Thank you, Benoit Quote Link to comment Share on other sites More sharing options...
benoit-1842 Posted May 31, 2016 Author Share Posted May 31, 2016 I know I am using a big file with a lot of vertices....But i just had an idea while grading an history test ?Will it be possible to take only a bvh file in blender and transform this file as a .babylon and have in my code 2 separate entity but with the same skeleton produce in blender. And the two skeletons (one with a complex mesh and the other one just the skeleton)are animating in simultaneity. And the light babylon file is transparent.....Just an idea.....So tonight I will work on that !!!! If you have any thoughts to share dont hesitate.... Thanx Benoit 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.