Suphi Posted February 14, 2016 Share Posted February 14, 2016 Hey So i'm trying to make a character for my game i'm making and i wanted to have things like armor, hats, etc... so i'm guessing i need multiple meshes that i can attach to the parent and change parts when needed. but I'm having problems with animation when exporting from blender. here are three attempts i had: PLAYGROUND here are my 3 models in action (none of them are working)http://www.babylonjs-playground.com/#TX3FX#0 BLENDER FILES this model has no bones just 3 cubes each cube parented to the cube under it and pivot point has been moved to the bottom of the cube and the animation is simple rotating that object 1: https://dl.dropboxusercontent.com/u/64938148/no_bones_animation.blend this model has 3 bones and 3 cubes each cube is attached to each bone then the bone is animated 2: https://dl.dropboxusercontent.com/u/64938148/bones_animation.blend this model has 3 bones and 3 cubes and the 3 cubes are attached to the armature with automatic weights 3: https://dl.dropboxusercontent.com/u/64938148/bones_animation_weights.blend I'm open to all suggestions i'm just trying to find a easy way to have multiple objects all animate together as if they where 1 model that way i can easy change parts as armor is equipped or unequipped and just for fun here are some images of my game so far Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 14, 2016 Share Posted February 14, 2016 God of blender will soon be with us (@gryff :)) Quote Link to comment Share on other sites More sharing options...
Suphi Posted February 14, 2016 Author Share Posted February 14, 2016 OK cool ill be waiting. Quote Link to comment Share on other sites More sharing options...
gryff Posted February 14, 2016 Share Posted February 14, 2016 Hi Suphi, welcome to the BJS forum This I think is what you are looking for: Rotating Cubes I started with your .blend file # 3 above (armature,weight painted). So a couple of issues and a suggestion. Issue 1. The armature has its origin at 0,0,0 but the cubes do not. So the first step is put the origin of all the cubes at 0,0,0. a.) Shift + C will put the cursor at 0,0,0. b.) Now select each Cube and in the Object menu Transform -> Origin To 3D Cursor. The animation will look better - but it is still not quite right. Issue 2. With the mouse over the 3D window hit the N Key. This brings the properties panel. Now for each cube in the Transform properties check the scale - it is not 1. So, selecting each cube in turn in the Object menu Apply -> Scale. The animation now looks ok. And the suggestion, you are using LocRotScale to record keyframes you only need LocRot at most. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Suphi Posted February 14, 2016 Author Share Posted February 14, 2016 Thanks gryff that's perfect i was using automatic keyframes how would i prevent automatic keyframes from adding scale? or would i need to manually delete it once iv finished the animation Quote Link to comment Share on other sites More sharing options...
gryff Posted February 14, 2016 Share Posted February 14, 2016 Quote i was using automatic keyframes how would i prevent automatic keyframes from adding scale? Beside the red button that you use to trigger automatic keyframing is a drop down box - pick LocRot in that box. Glad things worked Suphi . Most common issues with exporting animations to BJS is the position of mesh origins and the scale of the meshes. Remember that as you build stuff to go on your mesh. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Suphi Posted February 14, 2016 Author Share Posted February 14, 2016 Make sure mesh Origin is the same as the armature.Make sure scale is set to 1. got it thanks again for your help once i make some progress ill post my project into the Demos and Projects section. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 15, 2016 Share Posted February 15, 2016 I can't count the number of posts where I just summon Gryff like this. so THANK YOU so much for your help 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.