Rubik's cube solver

   4083   8   1
User Avatar
Member
5 posts
Joined: Nov. 2017
Offline
Hello everybody
So I'm currently trying to model a rubik's cube in Houdini 16.5 Apprentice. I followed this tutorial [www.youtube.com], but sadly it doesn't really explain how to make the actual jumbler/solver. I tried it myself with a couple of switches and solver (see attachment), but I can't seem to get it working.

My main problem at the moment is that the transformations (the turns) are always applied to the “original” geometry, so the solved cube and not ontop of the already applied turns. So the cube gets one turn, snaps back into the original, solved geometry before another turn is applied.

Many thanks for your help and/or nudges in the right directions in advance!

Attachments:
rubicscube_final.hipnc (667.0 KB)

User Avatar
Member
5 posts
Joined: Nov. 2017
Offline
Hi Mestela

Thanks for your quick answer.
I actually already stumbled across your scrambler before, but I don't really know if it would be compatible with my cube? Your approach is to build your cube from nine small Box-elements, whereas I cut one Box into smaller bits and then group them, so the small bits can't really move at their own as far as I know.
User Avatar
Member
1850 posts
Joined: May 2006
Offline
If you've cut your shape into separate polygon islands, you should be able to make it work. Try an assemble sop with pack mode enabled. Otherwise post a hip file and the hive mind here can take a look.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
5 posts
Joined: Nov. 2017
Offline
Thanks, I'll have a look at your code again
I have already attached the file to the original post (I assume a .hipnc file is more less the same than a .hip file?), but anyway, here it is again:

Attachments:
rubicscube_final.hipnc (685.8 KB)

User Avatar
Member
1850 posts
Joined: May 2006
Offline
Here you go. The idea here is to find a correspondence between your cube and my point setup, laziest way to do that is to set a @id attrib on my cube, get your cube and my cube roughly aligned, then attribtransfer @id.

With that done, can use the transformpieces sop, which is designed to transfer anim from a lowres rbd onto a highres one, but here transfer anim from my points to your cube components.

Attachments:
rubicscube_final_with_solver.hipnc (390.1 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
5 posts
Joined: Nov. 2017
Offline
Hey thanks a lot for yoiur work! However, I seem to do simething wrong. Whenever I open your file, I can't see anything on the pane (see picture), even if I add for example a new Box-element.
I'm running Houdini Apprentice 16.5.268 and tried it on Linux (Debian Stretch 9.3) and Windows 10. Other files work without any problems. Is there something I'm missing or might it have something to do with me using the Apprentice version?
Edited by AlexN - Dec. 14, 2017 04:21:46

Attachments:
Houdini.PNG (1.1 MB)

User Avatar
Member
1850 posts
Joined: May 2006
Offline
Ah, it's flipped into manual cook mode in the lower right corner. Set that to ‘auto update’.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
5 posts
Joined: Nov. 2017
Offline
Alright, many thanks, works like a charm now!
  • Quick Links