Jump to content

Copy Stamping question


thanaras

Recommended Posts

Hello,

The solution to my problem might be easy but I can't get my head finding a solution at the moment. So lets say we have some points and we want to copy some spheres on them. And let's say we want to start scaling the spheres randomly based on a point attribute (let's say random_seed) that assigns to each point a number which is a frame between $RFSTART and $RFEND. I then want to start scaling the sphere once $F >= $RANDOM_SEED and have the size to be between 0.05 and 2.0 for example. I attached a simple file where I start scaling the spheres when $F >= $RANDOM_SEED but because of the wrong expression I am using, each sphere starts growing from a certain scale and on, and not from 0.05. If you could take a look guys I would be very thankful. Cheers.

Link to comment
Share on other sites

Hey thanaras,

Without seeing your scene file, it's difficult to judge just what you are after.

If you have the spheres copied at the right random sizes - [ try using this as a random size stamping function in your copy SOP: fit01(rand($PT),0.05,2) ], then you could try this expression in a Scale param (on the Particle tab) of a point SOP, before the copy node:

if($F >= $RANDOM_SEED, 1 + ($F * 0.1), 1)

This will only work if the $RANDOM_SEED value is available to the template points coming in to the copy SOP.

I have used $F*0.1 as a value that will change each frame and scale the objects by that value.

You can of course substitute any value that works for you.

Hope this helps,

Matt.

Link to comment
Share on other sites

Hello Matt_K,

Thanks for the reply. Sorry that i forgot to attach the file. I will attach it later on in the day.

Using your expression i still have the same problem. For example in frame 40, I have 5 spheres "enabled" because their random seed exceeded $F, and they start growing, but they have the same size. So a couple of frames later that another one is enabled, its going to be the same size as the others which they keep growing. The question is how can each one grown in random frames and to start from (lets say) 0.1 and end to 2.0 all the way. Hope this is more clear. Thanks

Link to comment
Share on other sites

just subtract the starting frame so every scale starts at 0

so expression like if($F>$RANDOM_SEED, $F-$RANDOM_SEED, 0) will be 0 until the frame specified by $RANDOM_SPEED then it will start growing by 1 each frame

so you can easily do this

fit(if($FF>$RANDOM_SEED, $FF-$RANDOM_SEED, 0), 0, 10, 0.05, 0.2)

and you spheres will start at 0.05 and grow from 0.05 to 0.2 over 10 frames from frame defined by $RANDOM_SEED

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