Jump to content

Creating a boolean attribute that returns the frame number?(like a hit


Recommended Posts

Hi,

I want to get the frame number in which an attribute changes its value, and keep it stored.

 

Maybe my brain ain´t at its best today, but I´m struggling. Currently taking a look at CHOPs triggers...

 

Any quick solutions out there?

Edited by Netvudu
Link to comment
Share on other sites

well, if its convoluted I would like to know of a better way because that´s exactly what I had tried before....(only I forgot the handy "and" and "or" nodes which complement so nicely the conditions)

 

Thanks!

 

Edit: also, I was missing the key idea of having a different attribute to check if the conditions had been meet before

Edited by Netvudu
Link to comment
Share on other sites

Edit: also, I was missing the key idea of having a different attribute to check if the conditions had been meet before

 

Actually, that is not strictly needed, you can delete those nodes from the vop sop and the stored frame numbers still work.

It was just a step in the process when I built it - sometimes the path to success is not straight and narrow. (read: never)

Link to comment
Share on other sites

Yes, not strictly needed but it is very useful for debugging and/or using it as another condition later on (on a switch or something).

 

This could be a mighty useful tool to have as a regular tool (very simple to "fire" cached animations using this, which is what I´m doing) but it is quite difficult to "assetize" because you can´t give the user options to choose attributes and/or conditions as it implies changing a lot of connections.

For instance, I changed your example to fit my needs which was using color as opposed to Y position and I had to change several connections inside the VOPSOP as well as the compare conditions....which was trivial, but again, makes this un-assetizable AFAIK.

Maybe with a VEX Wrangle instead of a VOPSOP?

Link to comment
Share on other sites

Yes, David.

I took a look at your scene. It is very useful for specific attributes or animation channels but, probably because of my lack of vision, I couldn´t make it work to trigger cached animations.

Link to comment
Share on other sites

 here's the pointwrangle version .. maybe a bit easier to assetize.  The only thing to change would be the line:

 

int cond2=(@P.y<0 && prev_P.y>0) ? 1 : 0;   // this is the trigger condition

 

 to whatever the condition you wanted to test for.

 

 -G

 

Yes, not strictly needed but it is very useful for debugging and/or using it as another condition later on (on a switch or something).

 

This could be a mighty useful tool to have as a regular tool (very simple to "fire" cached animations using this, which is what I´m doing) but it is quite difficult to "assetize" because you can´t give the user options to choose attributes and/or conditions as it implies changing a lot of connections.

For instance, I changed your example to fit my needs which was using color as opposed to Y position and I had to change several connections inside the VOPSOP as well as the compare conditions....which was trivial, but again, makes this un-assetizable AFAIK.

Maybe with a VEX Wrangle instead of a VOPSOP?

ee_attrib_changed_at_frame_v2.hip

  • Like 1
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...