Jump to content

Recommended Posts

If someone would help me with this I would greatly appreciate it:

1. I have a SOP with animation on it. 

2. It is instanced via the point instance technique

Question: 

How would I offset and randomize the animation timing on each instance? Copy sop is too memory intensive and the geometry is heavy as it is.  

Share this post


Link to post
Share on other sites
string model_1 = "$HIP/geo/StrandModel.1."; // here you load the path to your sequence
string model_2 = "$HIP/geo/StrandModel.2."; //they can be as many as you need

int Fr = @Frame - @frmn - @randFrame; // with this you create the frame number
// @frmn and @randFrame are attributes created previously. @Frame is the current frame
string frames = itoa(Fr); //transform the frame number variable into a string
string suffix = ".bgeo.sc"; //this is the extension of the sequence

//the following is to build the instance path string  attribute  wich will be load by the Instancer
//the @split is an integer attribute to make "clustering" of this instances
//so you can vary the models sequences, this 
if (@split==0) { 
s@instancepath = model_1 + frames + suffix;
} 
if (@split==1){ 
s@instancepath = mode_2 + frames + suffix;
} 


I had this same question not so long ago , 
I realize the trick is to create an instancepath variable wich loads the model sequence with a frame offset,
that code is exactly what you need to do this string variable,
you then play with the @frmn and @randframe to offset them (it could be just one att, I used 2 just because) 

..by the way, the guys here say that packed geometry is as fast as instancing , check that on the docs.
follow the Sepu link... this code I took it from those places , it's not mine, but I wrote the comments..hope they help.

odforce.jpg

Edited by jmquintela

Share this post


Link to post
Share on other sites

Tom recently commented on a related question I had on this topic. He suggested don't use sequences. Instead write out your animated sequence as a single animated Alembic file then you can just do time stamp offsets on a single object. Or instead of stamping simply write out a random attribute time offset, in a wrangle, and then have the time node use that attribute value instead of @Time. or $F.

Edited by Atom

Share this post


Link to post
Share on other sites
On 2017/2/15 at 10:49 PM, Atom said:

Tom recently commented on a related question I had on this topic. He suggested don't use sequences. Instead write out your animated sequence as a single animated Alembic file then you can just do time stamp offsets on a single object. Or instead of stamping simply write out a random attribute time offset, in a wrangle, and then have the time node use that attribute value instead of @Time. or $F.

How to do time stamp on instances(not copy)

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

×