TyFlow Rubik's Cubes
File: https://rman197.gumroad.com/l/euxna Main controls for cubes generation (pieces amount/variation,piece size) are in the SpawnAxis Script UI in the "Root" event. The main difficulty of this setup was to combine 90 degree axis particle rotation with PhysX dynamic sim. Spin is quite unpredictable and can be stopped by some collisions. So solution is a kind of hack - rotate hard binded axis particle with the Rotation operator with unchecked "Affect particle shape orientation" option (thanks to Lance Culvert for this hack). Rotation and interpolation values were chosen experimentally so that the axis was rotated by 90 degrees during the rotation period (10 frames in my case). There are 3 main flow branches - the first one for the root cube particle, the second one for the axises particles (they are attached to root particle and do random rotation) and the third one is for cube pieces and color labels (they are attachet to root particle or to active axis particle). Only the root and the axis particles are involved in the PhysX calculations. They are interpenetrating but have different sim groups so they don't affect each other. Both groups (1 and 3 here) are checked in the PhysX ground collision filter. You can turn on the Display operators in the root and the axis flow branches to see what particles are actually colliding. The cubes are initially in an "solved" state and become increasingly scrambled as the axes are randomly rotated. If you want them to be unsolved at the beginning and solve in a process to certain frame (frame 305 in this example) you need to do next - activate the SendOut op in the "FinalFlash" event and then color labels will be send in to "GetCorrectColors" event at the end frame (305) where they get correct "solved" color (matID) based on root particle and moved to the initial position. Do the export of these corrected labels (export just end frame - 305 in this case). Collapse exported TyCache (or objects) in to one mesh object. Pick this object in the "GetCorrectID" material operator in the "CubeColors" event - then cubes get unsolved" state at the begining and will solve to the end frame. Music: Herbie Hancock "Rockit"
Download
0 formatsNo download links available.