Jump to content

Blender Animation Multiple Mesh Problems


Suphi
 Share

Recommended Posts

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 :P (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 :)
polygonworld.png

polygonworld2.png

Link to comment
Share on other sites

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 :)

 

Link to comment
Share on other sites

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 :)

 

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...