ian Posted June 26, 2017 Share Posted June 26, 2017 Ok I make two animation actions. ElevatorComponent1 (timeframe 0-240) ->Elevator1Action and ElevartorComponent2->Elevator2Action (timeframe 0-200). In Blender it looks fine/OK. Each elevator animate (loop animation of each object 1.ElevatorComponent1 and 2.ElevartorComponent2) Play look fine in blender. You can see it. (I attach blender file) I use only (Visual Location) for both animations. When I export from blender to .babylon. Exporter doesn't export as it should! Range and positions values are not OK !! WHY? IS THERE ANY BUG IN BLENDER->BABYLON EXPORTER ? (IS THERE ANY WAY TO MAKE FOR EACH OBJECT ITS OWN TIME_LINE FOR ANIMATION? HOW?) Can anybody take a look (ATTACHED FILE) and export it into babylon.js and see what is with range and positions values - is there bug??? Here is video https://www.dropbox.com/pri/get/Public/Screencast 2017-06-26 10%3A49%3A24.mp4?_subject_uid=20766916&w=AADvbTlbugqn3hWDvW0TvcKrFlvCsAGWkYMR1IlRIqyGdg (if I export to .babylon (ATTACHED FILE) file and put load it or put in sandbox it is confusion !! @gryff @JCPalmer @Deltakosh Maybe we can fix with editor inside babylon file. BUT IF I BUILD MODEL OVER AND OVER (WORKFLOW) THAN IF EXPORTER DOES NOT WORK OK. THAN THIS IS USELESS. Is possible to fix exporter? Greetings Ian ModelFInish_1.blend.zip ModelFInish.babylon Quote Link to comment Share on other sites More sharing options...
AndyBeaulieu Posted June 26, 2017 Share Posted June 26, 2017 What I have done in the past with Blender animations is to just create a _single_ animation in Blender that separates the animations by frames. So for example, frames 0 to 30 are walking, 31 to 60 are standing, and 61 to 90 are jumping (example here - http://www.spritehand.com/2014/08/babylonjs-physics-and-character.html) The exporter tries to combine the animations in some way, but as you can read below it can get complicated So maybe easier to start with single animation in blender? Quote Link to comment Share on other sites More sharing options...
ian Posted June 26, 2017 Author Share Posted June 26, 2017 I don't understand why each object has own Actoion and why each action does not have own timeframe? I would like to create more complex model with many separated animated objects with own fimeframes. Is possible to achieve this or not? Quote Link to comment Share on other sites More sharing options...
Lynxerious Posted June 26, 2017 Share Posted June 26, 2017 I think the Towel of Babel exporter supports multiple Actions. You should check it out: https://github.com/BabylonJS/Extensions/blob/master/QueuedInterpolation/Blender/README.md The difference between ToB and the Blender exporter is ToB export as .js rather than .babylon. As I personally use the Blender exporter and have no need for multiple Action so I havent tried ToB yet but it seems really cool. Quote Link to comment Share on other sites More sharing options...
ian Posted June 26, 2017 Author Share Posted June 26, 2017 Yes I read about about ToB. I'll try to see how ToB works. @gryff and @JCPalmer What do you suggest? Which should we preferred ToB or babylon exporter? greetings Ian Quote Link to comment Share on other sites More sharing options...
gryff Posted June 26, 2017 Share Posted June 26, 2017 @ian: Morning Ian Is this what you are looking for? Two actions Green cube and red cube rotate differently at different speeds. The cube are set up as shown in the image below. Note the" -" in the names of the actions for each cube. So cube0 has an animation called "cube0-Action" and cube 1 has an animation called cube1-action in the Dopesheet Action Editor. cheers, gryff Quote Link to comment Share on other sites More sharing options...
ian Posted June 26, 2017 Author Share Posted June 26, 2017 Can you share your blender file. So I can see it? By the way. I setup scene and try ToB. And I think I found some problem maybe bug and probably fix for ToB. Problem around physics imposters and imposters on instances. I try Cannon and Oimo and both have problems and I change some code in exported .ja file and it looks better. I will report and send tomorrow project and exported js file and repaired js. See you tomorow Greetings Ian Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted June 26, 2017 Share Posted June 26, 2017 To clarify, Blender has problems identifying which meshes participate in what actions. It cannot tell. @gryff, is right, the exporters rely on hints embedded into the name of the action to know what to generate, when an action is specific to a certain mesh. When it come to Tower of Babel, instead of JSON it generates inline javascript source code, & a d.ts file (for typescript integration). It is for object oriented development in that it generates un-parented meshes as sub-classes. You also do not "load" meshes per say. You instance them as "new blendname.mymesh('name', scene)". You can also specify the base class to inherit from. There is an alternate animation system, QueuedInterpolation, which has a couple Mesh subclasses( QI.Mesh, QI.Automaton, & QI.Hair). You can still use Blender action animation (with the same name limitations), but QI meshes also have a more advanced morphing capability, and to skeleton animation from a Blender pose library. ian 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted June 26, 2017 Share Posted June 26, 2017 Here you go @ian 2actions.zip It contains all the files including the .blend and .babylon cheers, gryff ian 1 Quote Link to comment Share on other sites More sharing options...
xtreemze Posted July 4, 2017 Share Posted July 4, 2017 Had this exact same issue but simply added the dash character as @gryff suggested. My action name went from SuzanneAction to Suzanne-Action and then it worked as expected! Thanks @gryff! Previously I would have to go in and check the exported babylon file and see exactly what keyframes were used. The exporter aparently adds extra frames to the end of the current timeline. In this example I used the default 120 frames in blender. If I did not do this, then both meshes would use the entire combined timeline for the actions. With @gryff's suggestion, I can easily delete these lines from my code and just check the Auto Launch Animations inside Babylon Exporter options within Blender. const suzanne = scene.getMeshByID('Suzanne'); scene.beginAnimation(suzanne, 131, 250, true); const iceberg = scene.getMeshByID('iceberg'); scene.beginAnimation(iceberg, 1, 120, true); Quote Link to comment Share on other sites More sharing options...
ian Posted September 5, 2017 Author Share Posted September 5, 2017 So I test ToB exporter now. with two animation (auto). If you have object name el1 and el2. If you make simple (location) animation. you should name it el1-action and el2-action. So name of object desh acttion. If you mark el1 as box collider and el2 as box collider with mass 0. You should mark thees to object el1 and el2 as Quaternion !!! And check "Auto launch animation " under mesh in Blender. Then you export ToB. and these animations should work with collision. Then if you Greetings Ian Quote Link to comment Share on other sites More sharing options...
Eric McG Posted October 30, 2017 Share Posted October 30, 2017 @ian, can you help me find "Auto launch animation". I can not find it for the life of me. I'm using version 2.79. Thank you, Eric 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.