Jump to content

[SOLVED] Simple copytopoints question


caskal

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
Link to comment
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

Link to comment
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
Link to comment
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!

 

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...