Jump to content

Recommended Posts

Hey guys,

I would usually do this easily with a Copy Sop (Copy to Points now), just like on Rohan Dalvi's Mograph Series but, since the fragments are not over points, I have no idea on how to do this without a stamp.

Here's something very similar from what I need:
LqOJzO4.gif

Thx,
Alvaro

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

If one of you would share a scene with this code working, i'd be very grateful.
My attempt has failed... would like to be able to grok this.

Share this post


Link to post
Share on other sites

there is also Transform Pieces SOP, so that you can do your animation on particles and then just transform packed pieces with it

  • Like 1

Share this post


Link to post
Share on other sites

maybe not the most intuitive, but tends to work once you understand how it works

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×