Jump to content
Sign in to follow this  
caskal

[SOLVED] Simple copytopoints question

Recommended Posts

Hey magicians,

I have 3 alembics with time offset for randomness wich I'm copy stamping with a switch node. Is working good except after some frames I get a weird "jump" on the clone position, any thoughts?

2018-08-29_17-14-19.gif.ba90edef1ff6746d5b36b03d0e7c80f0.gif

2018-08-29_17-16-36.png.7e079a89554a5a984482762aff96735e.png

2018-08-29_17-15-57.png.38daa3ad7e7e2932d2bb8fb6b1ecd22d.png

Thanks!

Edited by caskal

Share this post


Link to post
Share on other sites

Is your point count changing?

Also, you could avoid copy stamping entirely by just setting the `abcframe` primitive intrinsic per-copy. Might make things a little simpler.

Share this post


Link to post
Share on other sites
7 minutes ago, toadstorm said:

Is your point count changing?

Also, you could avoid copy stamping entirely by just setting the `abcframe` primitive intrinsic per-copy. Might make things a little simpler.

Thanks @toadstorm the point count you mean the points where the girls are cloned? if so they don't change, is a resampled line with a ray for terrain projection.

Can you elaborate more on the primitive intrinsic per copy please? what I'm doing with the 3 alembics is delaying 20 frames for randomness, and using the copy to copy a bunch of them over a line

2018-08-29_17-38-00.png.d4403a79c781667f5971ad6c449f1c63.png

Share this post


Link to post
Share on other sites

Packed Alembics have an intrinsic primitive attribute called "abcframe". It determines the time (not the frame, it's badly named) that the Alembic primitive should read from. If you haven't messed with intrinsics before, they're sort-of-hidden attributes that you can reveal in the Geometry Spreadsheet using the Intrinsics dropdown (in Primitives mode).

You can set the attribute using the setprimintrinsic() VEX function in a primitive wrangle, like this:

float frame = 1.0;

setprimintrinsic(0, "abcframe", @primnum, frame*@TimeInc, "set");

This will work even after the Alembic primitives are copied to points, so there's no need to stamp. If you want each primitive to go to a different frame, just create a float attribute however you like, then use that attribute to set your "abcframe" using setprimintrinsic().

  • Thanks 1

Share this post


Link to post
Share on other sites
14 minutes ago, toadstorm said:

Packed Alembics have an intrinsic primitive attribute called "abcframe". It determines the time (not the frame, it's badly named) that the Alembic primitive should read from. If you haven't messed with intrinsics before, they're sort-of-hidden attributes that you can reveal in the Geometry Spreadsheet using the Intrinsics dropdown (in Primitives mode).

You can set the attribute using the setprimintrinsic() VEX function in a primitive wrangle, like this:


float frame = 1.0;

setprimintrinsic(0, "abcframe", @primnum, frame*@TimeInc, "set");

This will work even after the Alembic primitives are copied to points, so there's no need to stamp. If you want each primitive to go to a different frame, just create a float attribute however you like, then use that attribute to set your "abcframe" using setprimintrinsic().

@toadstorm thanks a lot for the explanation, didn't know about all of these alembic parameters, will come super handy. I hate stamping and this fixed the issue so thanks a lot.

Also in case is useful for someone else, on this thread @anim posted some cool examples for optimizing copies

Cheers and thanks again!

 

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
Sign in to follow this  

×