j00ey Posted August 6, 2016 Share Posted August 6, 2016 I wonder if anyone can give me a hand with a problem. I'm trying to make a large grid of cubes [but for the purpose of figuring out how to do it, it could be one cube], 'walk' around - that is rotate around one edge which is flat on the ground, then rotate around another edge on the ground, then another. The cubes must be copied onto points that have attribs stored on them to do all the rotation and transformation - at present I'm figuring out all the direction of travel in a solver and storing a direction attribute [left, right, up, down], I want to use that to drive the rotations but I'm a bit stuck with. I presume I need to use orient as well as some translation but my matrix / quaternion maths isn't good enough yet. The first stage is VEX but I've been trying to work out the rotation in VOPs.. eventually I want to convert it to VEX. Attached is a movie to make it a bit clearer. The cubes shouldn't slide, they should rotate into the next position around one of their edges, then repeat. Thanks blocks_odforce.mp4 Quote Link to comment Share on other sites More sharing options...
mestela Posted August 6, 2016 Share Posted August 6, 2016 I've done some similar experiments you might find useful; http://www.tokeru.com/cgwiki/index.php?title=HoudiniExperiments#Generic_rolling_cubes http://www.tokeru.com/cgwiki/index.php?title=Houdini#Cubes_marching 1 Quote Link to comment Share on other sites More sharing options...
edward Posted August 7, 2016 Share Posted August 7, 2016 Other threads that may be relevant: Quote Link to comment Share on other sites More sharing options...
j00ey Posted August 7, 2016 Author Share Posted August 7, 2016 @ Matt - thanks a lot. That's very nearly what I'm after. I ported your method into my scene and with a box it appears to be working fine but if I swap out the box for a file SOP you can see they actually flip every time they change direction [see attached mp4]. The way I thought I would need to do it was to use the orient attrib before copying but perhaps doing it with primintrinsics is adaptable somehow, I need to do some learning on that topic. @ Edward. Thanks very much. Looks like a lot of useful information there, I will have a read and look through the files there. blocks_odforce_flip.mp4 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.