Force VOP - way to access to @TimeInc or equivalent?

   1752   4   0
User Avatar
Member
33 posts
Joined: Aug. 2014
Offline
I'm using a Force VOP to control some rigid bodies, and I need to access TimeInc for part of it, but the Force VOP context doesn't provide access to it, and binding it just returns zero.

I'm resorting to just piping it in using a parameter, with an HScript expression, but that's a bit hacky considering TimeInc has to be calculated from $FPS in HScript, plus I then need to take substepping into account with the calculation, and have no way of accounting for any variable-timestepping solvers might use.

Is there any more elegant/robust way? Seems bizarre that it's excluded just in this one context, when all other “force”-altering contexts provided access.


I know that it's generally preferable to just use POP wrangles and whatnot on Packed Objects these days, but those don't work for Houdini volumetric RBD objects… and I've had to ditch Bullet because it causes so much trouble interacting with the FLIP solver.
Dan Wood
Vortex VFX Ltd
User Avatar
Member
8514 posts
Joined: July 2007
Online
VortexVFX

I'm resorting to just piping it in using a parameter, with an HScript expression, but that's a bit hacky considering TimeInc has to be calculated from $FPS in HScript, plus I then need to take substepping into account with the calculation, and have no way of accounting for any variable-timestepping solvers might …
Did you try using $TIMESTEP variable directly?
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
33 posts
Joined: Aug. 2014
Offline
tamte
VortexVFX

I'm resorting to just piping it in using a parameter, with an HScript expression, but that's a bit hacky considering TimeInc has to be calculated from $FPS in HScript, plus I then need to take substepping into account with the calculation, and have no way of accounting for any variable-timestepping solvers might …
Did you try using $TIMESTEP variable directly?
Ah, that was the one I couldn't find in the docs. Thanks!

I don't think it's ideal though, as it presumably still wouldn't take into account substepping in individual solvers? (Does @TimeInc, come to think of it? I've assumed it would incorporate whatever substepping was used on whatever solver was associated to the object a node that referenced it was acting on… but now I think about it, I'm not certain)

(Edit: Heh, it's not just me, is it? Now I know what to look for - $TIMESTEP appears to only be mentioned once, in passing, in a description for another variable on the “Rendering > Expressions in file names” doc page.)
Edited by VortexVFX - June 30, 2019 14:51:51
Dan Wood
Vortex VFX Ltd
User Avatar
Member
8514 posts
Joined: July 2007
Online
VortexVFX
I don't think it's ideal though, as it presumably still wouldn't take into account substepping in individual solvers?

it considers global DOP substeps

VortexVFX
(Edit: Heh, it's not just me, is it? Now I know what to look for - $TIMESTEP appears to only be mentioned once, in passing, in a description for another variable on the “Rendering > Expressions in file names” doc page.)

it's mentioned on the page of every DOP that supports it, even VOP Force DOP, under Locals
https://www.sidefx.com/docs/houdini/nodes/dop/vopforce.html#locals [www.sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
33 posts
Joined: Aug. 2014
Offline
Ah whoops, sorry, being stupid. I've gotten so used to glossing over the “Locals” section on docs pages over the years, it seems I've become completely blind to it.

Thanks for your help anyway. As usual, I should probably rein in the frustration and just dig a bit more - it's usually just something I've missed.
Edited by VortexVFX - June 30, 2019 16:25:34
Dan Wood
Vortex VFX Ltd
  • Quick Links