Jump to content

Copy Stamp / For-Each / Compile-Block


Recommended Posts

Hi all,

I'm building a crude crowd-like system using POPs and I'd like to copy my imported walkcycle on to the particles with a random timeoffset. The old method of copystamp with a timeoffset value on a timeshift node works - but it's really slow. I've been reading up on the for-each / compile block method but I'm unable to compile timeshift or file nodes.

So my question is - is it possible to do it with a for-each/compile setup or am I stuck with the old copystamp method?

Link to comment
Share on other sites

Indeed, File node is not compilable (you can display the "badges" to see which nodes can be compiled, in the Display option).

But I remember from the video of Jeff Lait there are tricks to use non-compilable nodes, but outside of the network : you need to create many "Compile Begin" nodes as you want and setup them as "fetch input", so that they serve as input point for the compiled blocks.

You can try that to use Files node to read a cache of your particles, and also the crowd-agents. But I am afraid that by doing so, you don't gain a lot of time multithreading the instancing of cache files on points... I am pretty sure the speed of hard drive and then the graphic card are more limitating than the CPU tasks for this kind of things... but I may be wrong :-)

Let us know if this works and how many times you gained !

Look around 00:25 of this video, he talks about using Copiled Begin setup for Fetch Input :


Link to comment
Share on other sites

@anim - I'm curious. I've been buggering about with this today and I'm lost as to what's going on.

I've been trying to use your suggested setup for offsetting alembics. i.e. wrangle and timeoffset value and then applying it after a copy to points SOP using a setprimintrinsic(0, "abcframe", @primnum, f@time);

I don't see the animation offset on the copies unless I unpack. Do you know why this would be?

cheers for all your help

Edited by garf
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.

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