Jump to content
Sign in to follow this  
Ber

Attribute at a given frame ?

Recommended Posts

Hi everyone,

I'm junior with houdini, so is it possible to returns the value of a point/prim attribute at a given frame ? with expressions or nodes ...
I want to use the age of my particles at a given/last frame, in a stamp expression... 

Like a point expression, but at a given frame ^^ 

Thanks 
Bertrand
 

Share this post


Link to post
Share on other sites

If your point source for the Copy node contains attributes you can reference them in a stamp simply by typing the name of the attribute you want to stamp in the Attributes Stamp field under the Stamp tab. Remember to turn on stamping as well.

 

Then you can just use the attribute name as if it were a stamp variable.

stamp("../copy1","age",0)
Edited by Atom

Share this post


Link to post
Share on other sites

Hi atom, 

Many thanks for your quick reply, but unfortunatly that doesn't answere my question, I want to return the value of an attribute at a given frame, for example, I need to return the age of a particle at the 250th frame of my timeline.
I tried chf(...) or cht(...)  expression to return the value of a variable at a given frame/time but doesn't work ... 

I'm new on houdini and I try to learn by myself, but today your help is welcome.

Cheers 
Bertrand 

Share this post


Link to post
Share on other sites

well you can get the value in attribute VOP or there can be many other ways

in attribute VOP 

frame => compare (Equal==250) => twoway switch =>add attribute (call it whatever name e.g. test)

age connect to input1 of twoway switch

and then stamp the attribute test

Share this post


Link to post
Share on other sites

Ok, now I see what you want. You are on say frame #1 and you want the age attribute of frame #250.You may want to just drop down a python node and use setTime to move to the frame you are on then fetch the attribute and then set the time back to the current frame.

Edited by Atom

Share this post


Link to post
Share on other sites

you can just put down Time Shift SOP, set frame to 250 and sample values from there

  • Like 1

Share this post


Link to post
Share on other sites

I think Tomas method is simple and will work, i have attach a trivial exemple.

 

I was also investigating with a SOP solver but it was kinda overkill at the end compare to the time shift.

sample_at_frame.hiplc

Share this post


Link to post
Share on other sites

Hi guys !!

Many thanks for the answers, I'll try all your solutions !

 

Cheers !
Bertrand

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×