Jump to content

color attrib per frame in dops


Recommended Posts

Hi all,

Am trying to tweak a scene file that was passed to me from here (apologies, I don't know/can't find original poster, so can't credit).

It's a wire sim where points are activated based on their Y position - And I'm trying to tweak it to be based on color.

I've worked a nice way to animate my colour across the points in a way I like, but my question is:

 

How do i get my point color attrib to update per frame in the dopnet? And how do i associate it to the gluetoanimation value?

 

Been really trying to get this going today, but to no avail... Any help or tips gratefully received! :)

activate_sim_based_on_color.hip

Link to comment
Share on other sites

In your wrangle there write

@Cd = point(0, "Cd", @ptnum);

This sets Cd to the Cd of the first input. But you have no input yet, so go to the Inputs tab of the wrangle, and set input 1 to "First Context Geometry" - this is the first input of the DOP Network. 

edit: And then you can do

@gluetoanimation = @Cd.r;

This sets gluetoanimation to the same value as the red channel of Cd.

Edited by Skybar
Link to comment
Share on other sites

14 hours ago, Skybar said:

In your wrangle there write

@Cd = point(0, "Cd", @ptnum);

This sets Cd to the Cd of the first input. But you have no input yet, so go to the Inputs tab of the wrangle, and set input 1 to "First Context Geometry" - this is the first input of the DOP Network. 

edit: And then you can do

@gluetoanimation = @Cd.r;

This sets gluetoanimation to the same value as the red channel of Cd.

Perfect... Thanks Skybar!

I was going in the '$CR' direction for the @gluetoanimation, but would have taken me forever to reach your conclusion.

 

Going to spend the next few days playing with wrangles to try and learn them as much as possible. :)

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