Jump to content

Recommended Posts

assuming you have pieces neatly separated, kind of what a voronoi fracture would output you, you can just pack via an assembleSOP (check "create Name attribute" and "create packed geometry").
This will give you one packed primitive per piece and thus one point. You can manipulate them as you need via the intrisic attribute "transform"

A point wrangler running this code should get you on the tracks.

float _seedpiece = rand(@ptnum);            // multiplier per piece
float _seed = fit01(_seedpiece, 0.5, 1);    // unique rotation speed multiplier

float _startframe = ch("startframe");       
float _fadeout = ch("fade_out") * _seedpiece;

matrix3 _m = ident();   // initial transformation matrix

float _angle = (clamp((@Frame - _startframe), 0, 1000) * _seed) * ch("speed");
vector _axis = set(rand(@ptnum + 1), rand(@ptnum + 5), rand(@ptnum + 9));   // random rotation acix

_fadeout = 1 - fit(clamp(@Frame - _startframe, 0, _fadeout), 0, _fadeout, 0, 1);
vector _scl = set(_fadeout);

rotate(_m, _angle, _axis);
scale(_m, _scl);
setprimintrinsic(0, "transform", @ptnum, _m);

 

Edited by iamyog
typo
  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...