time based POP Wrangle DOP

   4794   5   1
User Avatar
Member
152 posts
Joined: June 2008
Offline
If I have a POP Wrangle DOP with code:
@bla = smooth(@Frame, 24, 48);

I get a bla value of 1 until frame 48, where it then turns 0. It is not smoothly interpolating from 1 to 0 from frames 24 to 48.

The Help Docs say:
Unlike the Attrib Create SOP, this does not use local variables. Further, all backtick expressions and $F variables will be evaluated at frame 1, not the current time. Use Frame, Time, or TimeInc instead.

I was under the assumption when it says to use Frame, Time or TimeInc instead, that it would be able to do time-based calculations.

Any ideas here?

Thanks
User Avatar
Member
152 posts
Joined: June 2008
Offline
And what would you suggest is the best way to set up time-based attributes on particles in DOPs? I was used to the Attribute POP, but that seems to be gone in DOPs.
User Avatar
Member
8582 posts
Joined: July 2007
Offline
yes, @Frame is correct, just arguments in the smooth function are in wrong order
try this
f@bla = smooth( 24, 48, @Frame);
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
152 posts
Joined: June 2008
Offline
Looks like the hscript smooth function is layed out differently than the VEX function. Thanks!
User Avatar
Staff
6219 posts
Joined: July 2005
Offline
Yes, unfortunately VEX inherited the smooth() arguments from renderman to match RSL, but then they are backwards from what we have in HScript. I'm sure there is a parable about trying to serve two masters buried in here somewhere.
User Avatar
Member
152 posts
Joined: June 2008
Offline
It ain't easy bein' pleasey!
  • Quick Links