Jump to content

Using the shift Sop to shift CHOP curves

Recommended Posts

I'm trying to use point color to trigger animations. When the point color rises above a certain value, I want the animation to start.


To do this i'm reading in the changing point color into CHOPS, creating the same number of channels which represent the animation(using a channel CHOP) and then attempting to use the shift CHOP along with my color data to move the animations to start when the correct value of color is reached.


This is the bit I'm struggling with - I cant work out how to shift the animations based on the color channels I read in. 


Any help? Is this the right way to trigger animations based on color?

Eventually I'll use the shifted data and read it into the pscale attribute of the points just before I use the copy node.


I've attached a simple example of as far as I can get it.


Thanks for any help!


Link to comment
Share on other sites

Something like this you mean? 


Using the expression "fit01(rand($C), 0.5, 1)", where $C is the current channel. So I create a random number based on each channel, and fit that between how much I want them to be shifted. 


You also did a typo in your Delete CHOP which I fixed, you didn't delete the blue channel. I also changed the amount of channels you created in the Channel CHOP, because you only have 216 points it's unnecessery to have more channels than that right?

Link to comment
Share on other sites

This is close Skybar, but I want the color information i'm collecting in the geometry CHOP to be the thing that shifts the animation.


So for example, if a point color goes full red on frame 42, that's the frame the animation will start.


Thanks for catching my typos and channel number errors.

Link to comment
Share on other sites

Ah right, I see. So like this then?



I'm a total noob in CHOPs btw, first time really using it. It looks like fun! So, what I'm doing here is creating a channel for each point with $F, and since the color goes directly from 0 to 1 it acts like a trigger. So I'm using the Hold CHOP to hold the frame number on each channel when that point goes white. Now we have what frame each point turns white on, so if we then set the Shift CHOP to work in frames instead, we can simply specify ecah channel with the frame numbers as the Scroll Offset. 


Makes sense?


Finally, I couldn't quite figure out how to no let the black boxes NOT grow. So I simply delete all black points before the Copy SOP. 


Hope this helps! It sure helped me understading CHOPs a bit more :)

  • Like 1
Link to comment
Share on other sites

This works!


It took me awhile, thinking about how you got it to work with the Hold CHOP, but I'm following it now and managed to recreate it on a more complex scene.


Thanks Skybar - I'm impressed you can just crack open CHOPS for the first time and work that out.

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