Rigging a Rubik's Cube

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  11 November 2005
Rigging a Rubik's Cube

well, I've tried lots of things out already but none of the rigs seem to be very useful. At first sight this seemed a very easy piece to rig but once I tried to find a solution, I realized that a Rubik's Cube is in fact quite hard to rig properly. The most userfriendly rig atm seems to be just linking all the little independent cubes to a bigger inner cube or sphere (which you don't see, it's just there to fill the gaps between the little cubes so you can't look trough the little holes between the little independent cubes when looked at in profile).
anyway, I then linked the inner cube to a bigger dummy for easy selecting and keying.

So now I've got to manualy select a side (with 9 little cubes), rotate it, deselect and select another side, rotate........ quite a hassle!

I thinks it's a nice challenge for all you riggers, I would appreciate it if somebody could help me on this.

Thanks in advance,

Foane
 
  11 November 2005
you could try this...
setup a link constraint controller on all the cubes (all separate)
and link them to controller objecst that represent lines (either horizontal or vertical)
and animate them rotating then.. aniamte the link constraint and repeat

mark
__________________
Morph Controls Script
*NEW Website*
comming soon!!!



 
  11 November 2005
I've tried what you said Mark but all these kind of techniques come down on the same problem, individual animating. I mean, after I animated the controllers I also have to animate the weights of EACH little cube....impossible to work with. The best system would be to have some kind of influence box that 'grabs' all the assigned geometry within its boundries. So then I could animate these influence boxes.... does this make any sense?

I don't know if something like that exists in MAX 8 but it would really help me on this.

Thanks anyway Mark...
 
  11 November 2005
hi are you sure you tried the link constraint and not pos orientation constarints, link constraint is a transform contoller and does not have any weight(s),
i would say this would probably be your best bet

mark
__________________
Morph Controls Script
*NEW Website*
comming soon!!!



 
  11 November 2005
yeah I know, wrong choice of words...sorry about that

Either way, with the link constraints I still have to fix each seperate cube after I animated the cube (with 'fix' I mean giving the small cubes new link targets)

Foane
 
  11 November 2005
i wouldnt use link constraint for this, it would become clunky for animation having to readjust all the all the links over time. I do know of a possible way but id have to use my pose tool for it.

So theres three rotations going on , of a possible 27 cubes. You would have to build a dynamic constrainst relationship of a 81 constraints.

For each cube, it has 3 dynamic positions and rotations for each twist axis, so in theory you need a set weight sliders to change what the cubes being driven by. Also a global parent to keep everything local. Umm...

So the number of possible positions is:



You would probably have to deal with localised xform space, on a local root too.

hmm.. interesting challenge.

eek
__________________
Disclaimer: My opinions are not those of my employer.


 
  11 November 2005
hey eek,

yeah I know, it's strange how these simple things can get so ugly
you pretty much summed up the things I was thinking about...lots of data!

let me know if you found something.
cheers,

Foane
 
  11 November 2005
I'll give it a shot this week, if you dont here from me my head will have probably exploded...

eek
__________________
Disclaimer: My opinions are not those of my employer.


 
  11 November 2005
ok, thanks Eek

I've tried binding the little cubes to FFD spacewarps but that was just gambling.... it didn't work.
 
  12 December 2005
Interesting challenge indeed. Not sure what this is for so a complicated solution may be more than is really needed but it certainly does present some curious possibilities.

If I had more time I would play with it myself but with majors deadlines at work and my vehicle rigging series I dont' have time. However for anyone you might want to give it a shot I will at least say the direction I would go with it.

I wouldn't animate the 26 individual boes at all. I would look for a way to animate the 6 different sides only. And then what ever boxes happen to be in the volume of that side at the time of rotation get moved with it. This would almost certainly require some scripting but there are lots of ways to find if things are within a certain volume..like volume select for instance. This method would have to assume that no two sides would ever be moving at the same time...or else things would break. ...damn I wish I had some free time...
__________________
- Chris Harvey
VFX Supervisor & Technical Director
 
  12 December 2005
dammit Harvey,

My secret is revealed! hehe ala transforms through volume space


eek
__________________
Disclaimer: My opinions are not those of my employer.


 
  12 December 2005
yeah Harvey,

exactly the same thing as I was thinking (and Eek ). Volume selection could be the key. however, when I use this method on the cube it all works fine untill you rotate a little box that already has been rotated (then the axis are screwed up so the little box turn in a unexpected orientation). It seems that the changing of local space isn't doing any good...

don't know Maxscript (yet), so I have to rely on you guys.

by the way, the cube is for my short (thesis). The short is about two burglars, one of them is a real moron and plays with a rubik's cube all the time...

Thanks,

Foane
 
  12 December 2005
From the responses I assume you all are using Max, wich I dont use (Im a Blender guy).. so maybe this wont be of any help to you.

Does Max supports solid body dinamics? If it does them worry no more.

Just assign all your colored cubes some sort of attraction constraint.. all linked to a inner sphere or some other filler figure. Im talking like gravitational attraction, axis independent.

Everytime you push a cube, been solid, it will push its neigboors, creating a domino fx that will make the entire row to rotate. It the rows are not well aligned the movement will be obtructed, just like in the real thing.
__________________
Photography works (portfolio in the making)
www.apollux.smugmug.com
 
  12 December 2005
oh lord...not this again.....

I suggested this back in the spring over at od[force]...
http://odforce.net/forum/index.php?showtopic=2731

it's actually a really dificult problem...at least as I described it...
most of the solutions that people came up with involved either writing data to disk or dynamics or some such thing...but none of those solutions allow for the cube to be animated in a scene by an animator just like any other type of prop...animate forward, back, scrub in the timeline etc etc...
good luck...have lots of asprin around for when you get a headache
__________________
Michael Goldfarb
 
  12 December 2005
yes, altough I don't understand most of that Houdini stuff, I do understand it's not easy at all. it's a pitty they didn't found a real solution over there as well. For the moment it looks like my first (stupid) solution was best, just grabbing the cubes of the side you need and rotate them + an easy parented system to have a bit of quick keying control. The thing that Apollux describes is not quite satisfactory because you're working with simulated dynamics and that doesn't allow itself to be animated on the fly. Maybe there's an easy way to fix the problem by just 'faking' what the viewport does (where grabbing a side with cubes and just rotating them, but in our case + some sort of animation control). Maybe there's a way to script the thing, I don't know if this is hard or not but it would work if somebody could make a piece of code that says: if a certain vertical or horizontal animation control rotates (bound to 90 rotations), then these cubes get linked constrained to it.....
but because where dealing with 27 cubes here, each containing 9 potential link targets this could be a bit cluttered doesn't it?

let's keep it going...

Foane
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:01 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.