xuyennguyen Posted October 27, 2016 Share Posted October 27, 2016 Hello, I am working animation on blender, after that I want to export to .babylon. But I have problem with them. The animation that I exported from blender is wrong. I fixed follow this topic but the problem still happen. I attached my blender file and the screenshoot. Could you help me fix the problem. PlayerBody.blend Untitled.mov Quote Link to comment Share on other sites More sharing options...
gryff Posted October 27, 2016 Share Posted October 27, 2016 @xuyennguyen : welcome to the forum Well I downloaded your .blend file, exported it with version 5.0.6 of the exporter and here the character is doing the animation in your .mov file. Animated Figure The only changes I made were 1. To replace the light with a hemi 2. To change the camera to an ArcRotate camera. NO changes to figure or armature set up. What is the "problem still happen". ? I will post the files I used in a few minutes. cheers, gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted October 27, 2016 Share Posted October 27, 2016 @xuyennguyen; Here is a zip file containing the exported figure and a simple index.html (with a script) file. animated.zip Go to line 116 of the index.html file You will see: newScene.beginAnimation(skeleton, 0, 41, true, 1); That plays the "Attack" animation. Use the lines below instead to play the "Walk" or "Stand" animations. Your animations are being exported as ranges - just have to pick the correct range. cheers, gryff Quote Link to comment Share on other sites More sharing options...
xuyennguyen Posted October 28, 2016 Author Share Posted October 28, 2016 @gryff Hello Gruff, Thank you so much for your support. I mean in the blender, the player body only have walk animation, but when I exported to .babylon file the player body has animations "walk" and a animations same as the video. I don't understand why. And this is blender file I use more mesh, I export and see in .babylon file "ranges":[{"name":"run","from":0,"to":20},{"name":"runRepeating","from":30,"to":110},{"name":"walk","from":120,"to":140}]}], I added the code in my file but the money doesn't run. Sorry, I am newbie babylon and blender, so sometime i don't understand why. Could you please help me? I attached money key blender and babylon. var flyingAnimation = new BABYLON.SceneLoader.ImportMesh("", "client/res/test/", "monkey.babylon", newScene, function(newMeshes, particleSystems, skeletons){ newScene.beginAnimation(skeletons[0], 120, 140, true, 1.0); }); monkeyManRunCycleTutFinal (2).blend monkey.babylon Quote Link to comment Share on other sites More sharing options...
gryff Posted October 28, 2016 Share Posted October 28, 2016 1 hour ago, xuyennguyen said: I mean in the blender, the player body only have walk animation, but when I exported to .babylon file the player body has animations "walk" and a animations same as the video. I don't understand why. @xuyennguyen: Hi again xuyen Actually all the animations are in your .blender file - and so get exported Look at the image below. If you click on the little image outlined in red - a list of all the animations will popup and as you see with a letter "F" beside them. They are all there If you want to delete an animation select it from that box (it will now appear where the word "Walk" currently appears). Now Shift + Click on the "X" button (in the green box). You will get a warning about the animation will not be saved. Now save your .blend file and then reopen it. The animation will be gone. I will look at your new .blend files in the morning - it is after midnight where I live 2 hours ago, xuyennguyen said: I am newbie babylon and blender, so sometime i don't understand why. Could you please help me? Well there are quite a few people on this forum who are "newbies" to blender - so, take heart, you are not alone. I will try to help cheers, gryff Quote Link to comment Share on other sites More sharing options...
xuyennguyen Posted October 28, 2016 Author Share Posted October 28, 2016 @gryff: Hello, Thank you so much. I will wait for you. Quote Link to comment Share on other sites More sharing options...
gryff Posted October 29, 2016 Share Posted October 29, 2016 @xuyennguyen : Well I looked at your "monkey" file - and recognized it Xuyen . It is a file from these tutorials by ianscott888. Looking at your .blend file there are a couple of issues which will cause problems with exporting to .babylon. 1. The rigged mesh has 14 bones and 12 meshes - two of the bones are IK bones - but the method chosen to parent the bones to meshes does not work with the exporter. 2. The 12 meshes all have un-applied rotations and scaling It could probably be fixed - but is likely to involve a lot of work. You might want to look at other models. I will look again tomorrow - see if I can find a quick work around. cheers, gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted October 29, 2016 Share Posted October 29, 2016 @xuyennguyen : Hi again xuyen As I said above you should maybe look at another rigged character rather than spend a lot of time trying to make the "monkey" work. Try this YouTube tutorial by Sebastian Lague : Blender Tutorial: Basic Walk Cycle The rigged model he is using can be obtained from the first link below the video. How he rigged the character is here on YouTube cheers, gryff xuyennguyen 1 Quote Link to comment Share on other sites More sharing options...
xuyennguyen Posted October 31, 2016 Author Share Posted October 31, 2016 @gryff hello Thank you so much for your support. I understand some problem I met. So I have another question. My team made a animation by Maya. I tried to import unity and 3ds max and I saw they ran fine. When we imported this animation in 3ds max to export to .babylon but they was wrong. The asixs is not correct. We are making a animation with more mesh. So we should make animation by 3ds max or blender directly, right? ElephantFly1.fbx Quote Link to comment Share on other sites More sharing options...
gryff Posted October 31, 2016 Share Posted October 31, 2016 3 hours ago, xuyennguyen said: When we imported this animation in 3ds max to export to .babylon but they was wrong. The asixs is not correct. @xuyennguyen;: maybe you should start a new thread with 3dMax in the title - I have no experience with Maya and my 3dmax days were 14 years ago, and I have forgotten most of that 3 hours ago, xuyennguyen said: o we should make animation by 3ds max or blender directly, right? I make my animations in Blender, but you should be able to to do the same thing in 3DMax - whatever your skills are. Maybe @dbawel : can help cheers, gryff Quote Link to comment Share on other sites More sharing options...
dbawel Posted October 31, 2016 Share Posted October 31, 2016 @gryff and @xuyennguyen - Unfortunatley, FBX has lost it's complete compatability on many issues, as well as even Autodesk cannot seem to manage their development teams between applications in full support of the format - ascii or binary. It is very straight forward as we had this working more than 5 years ago, but it has virtually been ignored since. On my current project - if you're exporting more than geometry from any package and the target in a .babylon file format, I now have abandonded FBX alltogether, as it causes more issues than it solves. I've looked at all aspects of the pipeline (what my job has been for years), and the best solution currently is to not export an FBX other than between Autodesk products - only export FBX if the setup of your scene is simple. However, I recommend the shortest method I've personally found - which is why Blender users have few questions - which is to export from your Autodesk application as an OBJ file, import into Blender, and then rebuilt your parenting, textures, etc. as needed. And very important to "apply all transform deltas" on all objects to value of 0 before parenting, and after parenting to set your entire hierarchy to a world position of 0,0,0 - and add a single parent object if you don't have one. Once this is done and it doesn't take long, is you must then apply all deltas in Blender to be reset. As the .babylon exporter is the most complete and most updated .babylon exporter in ANY application, a Blender compatible scene will provide you with great joy and simple work within the BJS framework. This includes cloning nad instancing the parent object without requiring to import and re-parent children, and all information is retained. However, you must understand which renerder you use in unwraping UV maps etc., or you'll stil have issues. However there are MANY quick tutorials online in both video and text to quickly understand how to prepare your scene for BJS, and certainly video for most al Blender functions. It sound like a drag, but please remember we're all working on a new frontier - and it will pay of royally. Also, once you do this a single time, it becomes routine and fast - as you'll lter the way you prepare your scenes in the application you prefer to create. And don't loose hope - I have on good authority that you'll see an FBX importer for BJS next year. DB 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.