Problem rigging a cube


As simple as it sounds, I’m having problems rigging a cube to enable different kind of bendings to make a game character. However so far it’s looking more challenging than a normal human body. :confused:

Image of my case:
(uploading this .jpg from my computer failed and it didn’t accept the url either so it’s just a link for now)

The selected cube is the one to be rigged and the ones next to it are the forms I want it to be able to have (forms made with deformations)

I tried all kind of star forms of bones to all corners and middle sections but I was only able to achieve the 2 bending forms on the top and I couldn’t scale the center body to make the two “breating” bendings.

I’m looking for advise of how I’m supposed to place bones on the cube so that I could have all those variations?

As far as I know, animations need to be done with bones, at least to enable .fbx exporting. If my desired rig is impossible to achieve, can blender deformations be animated to bones?

Interesting problem. So since it’s .fbx exported and for a game engine, it can be only bones?? Would the bones that deform the cube be the only animated bones? Are those 5 shapes the only shapes you need?? If so, I think it’d be simple to rig and animate.


Well the mesh comes with the .fbx but I think Unity doesn’t support vertex animations without scripts so it has to be done somehow with bones. Those 5 forms would currently be the only shapes I need. What kind of rig did you have in mind?

Something like this, see attached file. There’s one bone that runs from the top to bottom of the cube, at the bottom of the cube there are 4 bones that extend out to each side of the cube. Those 4 bones can be scaled to control the size of the base of the cube. From here, I’d subdivide the vertical bone so it’s 2 bones. At the junction of these 2 bones, I’d create another 4 bones like the bottom ones. At the top of the top vertical bone, I’d add another 4 bones like to bottom ones. Top 4 horizontal bones would be connected children of the top vertical bone. Middle 4 bones would be connected children of the bottom vertical bone. Then I’d probably add a bone at the base to be the master bone and parent of the bottom 4 bones and the bottom vertical bone. Careful weight painting of the horizontal bones to the mesh, and several subdivisions of the sides of the cube should get you pretty much there. Some other tricks might be useable to improve deformation, depends on .fbx export from blender. Thought unity supported other formats from blender…

Since you’re only creating 5 shapes, I wouldn’t mess with a nice control set up for the bones. Just pose the bones for each shape and store the bone’s pose in a pose library. When animating, it’s just a simple matter of inserting the poses where needed in the time line.



example_cube_rig.blend (449 KB)

Thank you very much Randy for the effort! Your idea worked and I can continue to animate the cube.

To leave no one else wondering, here’s the results:

I did the bones almost liked you said and then the top bottom and top vertexes were weight painted out from the middle bones’ influence. As I feared, weight painting was needed and the results were not perfect but since my shapes don’t deform that much, it’s not too noticable. For example, the cube won’t deform to a smooth ball shape

I find the weight painting tools really inaccurate and tedious to control and I’d wish there’d be something like Mayas interactive skin binding cylinders or whatever they are called. Anyway, lesson learned and all praise Randy!

Great minds think alike!
I made an animation with a cube character rigged the exact same way,
(not as nice as yours though)

Don’t know how I missed your reply, but anyhow here’s a couple of thoughts…

I was really unhappy with the results of my example, but it was just a quick ‘down n dirty’ example, after all you were just after 5 shapes. Add in the fact that your are exporting in FBX to a game engine that I know nothing about, so I played it safe with the example. I’m not sure what the fbx export from blender supports or what the game engine supports, and I’m not sure what maya’s interactive skin binding cyli thingys are, but blender has a nice mesh deform modifier which would probably improve results at the cost of more work. Would it work in the game engine? No idea… You tell me…

As to weight painting in blender, not something that can be rushed. First, there is an ‘auto-normalize’ option that should be checked before starting. This will subtract weight from verts weighted to one bone, when weight is painted to a second bone. Without checking this option, it’s possible to weight a vert 100% to one bone and 100% to another, but a vert’s total weight can never be 200%, so it’s a 50/50 split, but you’re not seeing that on screen while weight painting… You have several vertical loop cuts, perhaps some horizontal ones would help out as well.

If you want to improve it, we can toss around ideas…