For loops and timeshift

   16734   10   5
User Avatar
Member
1803 posts
Joined: May 2006
Offline
I can timeshift things in a for loop if its in ‘by count’ mode, but not in the other modes.

Either I'm missing a trick, or there's Reasons that I don't fully understand. Anyone have some insight here?

Attachments:
forloop_timeshift.hip (106.4 KB)
forloop_timeshift.gif (220.5 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hey Matt,

interesting pickle! My best guess would be that having the block begin set to fetch input grabs the incoming geometry on each iteration, whilst iterating over pieces grabs to the incoming geo once, and then runs - meaning that the time shift hasn't got anything to refer back to within it's own scope.

Pretty much a stab in the dark though. I'd also be interested to know of Reasons
Henry Dean
User Avatar
Member
555 posts
Joined: Feb. 2017
Offline
thanks Matt,

you screwed up my head real gooooooood now !!!

Anyway, this is not a fix in any way shape or form, it's more of me dissecting the problem…I notice these ‘clock’ icons…so sorta tweaked…got anything to do with timeshift ? dunno, anyway I moved the spin around into the loop…as said…i don't claim to have fixed anything…just dissecting…
Edited by vusta - Jan. 11, 2018 21:14:25

Attachments:
forloop_timeshift_vu.hipnc (111.0 KB)

User Avatar
Member
8833 posts
Joined: July 2007
Offline
If you try to timeshift current piece it will not work as that geo is cached and split at the current frame, I suppose the reason is that by evaluating that input at different time input you'd force block end to recompute number of pieces etc. As the node that does the splitting is actually Block End and geo for pieces is it's second input, which was for convenience as well redirected to input of linked Block Begin, but that's just my guess, jlait will know the real reason

so while Fetch Piece has cached current piece you don't have to use it at all
you can easily timeshift in By Pieces mode by using Block Begin/Fetch Input in the similar way as you do in Count mode, just use ‘value’ detail attrib
Edited by tamte - Jan. 19, 2018 17:19:29

Attachments:
forloop_timeshift_x.hip (116.9 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1803 posts
Joined: May 2006
Offline
Neat trick! Good to have the ‘how’, but would still love to know the ‘why’. I also assumed it was some kind of caching or optimisation thing, but its not clear when that kicks in, or what to look for in these cases.

Cheers Tomas.

-matt
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
63 posts
Joined: May 2006
Offline
Hi guys, just found this thread as I was searching for an answer on how to do random time offset. In my case I have an alembic with deforming geo that I want to pointcopy to a number of simulated particles (also an alembic).

The setup in this thread seemed to be working, but then i noticed that the timeshift not only shifts the time of the object to be copied but also of the points to copy them onto.

How to make the timeshiftnode understand that it's only one of the two to shift and not both?

(In my scene I also found a way to randomize the time in a way that suited my needs better, the switch allows for switching back to the original timeshift)


Thanks,
Jasper
Edited by druitre - April 17, 2018 10:20:20

Attachments:
forloop_timeshift.hip (118.8 KB)

User Avatar
Member
174 posts
Joined: March 2014
Offline
Hi druitre,
Have a look at the alembic abcframe intrinsic attribute ;-) that's the same as the “shape instance time” of softimage.

In the meantime if you use timshift please use packed geo and not alembic files ;-)

here's how I manage the time of an alembic file in a “primitive wrangle” (the important bit is the last one)
That's a wrangle that taking a @shapeinstancetime attribute and using that to make random shift of alembic files
float abcfps = chf ("abcfps");
float shapeinstancetime = @shapeinstancetime;
float frame = ( shapeinstancetime + chi ("loopstart") ) % chi ("loop");
setprimintrinsic( geoself(), "abcframe", @primnum, frame/abcfps, "set");
Edited by NNois - April 19, 2018 19:45:22
User Avatar
Member
2129 posts
Joined: Sept. 2015
Offline
Just wanted to say thanks to Tomas for providing examples back in January.

Although I didn't have the same set up or intention to do what mestela was doing - I was having issues trying to get the timeshift to work as intended within Sop loop block nodes.

Those examples helped me try some different configurations to finally get my set up to work.
User Avatar
Member
4 posts
Joined: Oct. 2017
Offline
NNois
Hi druitre,
Have a look at the alembic abcframe intrinsic attribute ;-) that's the same as the “shape instance time” of softimage.

In the meantime if you use timshift please use packed geo and not alembic files ;-)

here's how I manage the time of an alembic file in a “primitive wrangle” (the important bit is the last one)
That's a wrangle that taking a @shapeinstancetime attribute and using that to make random shift of alembic files
float abcfps = chf ("abcfps");
float shapeinstancetime = @shapeinstancetime;
float frame = ( shapeinstancetime + chi ("loopstart") ) % chi ("loop");
setprimintrinsic( geoself(), "abcframe", @primnum, frame/abcfps, "set");
Hi! I am interested to know your solution but I didn't understand it. Could you please make a hip file or explain it more?
thanks in advance.
User Avatar
Member
3 posts
Joined: Nov. 2018
Offline
This was very useful. Helped me to create an improved trail node so that my version outputs an “iteration” int on Points (can always be promoted higher if needed) and surfaced the Clamp options. Seems to me that detail(-1,'iteration',0) requires a $F to evaluate by count, otherwise it evaluates once and provide an incorrect result.
Image Not Found

Attachments:
improved_trail.hiplc (92.9 KB)

User Avatar
Member
1 posts
Joined: Feb. 2018
Offline
Hi Houdini enthusiast's

here is my first ever post on this forum!

I am quite new to Houdini and wish to pose a new question on this subject in the hope of finding the answer.

I have a animated heightfield where a mountain grows in elevation over time and I wish to have the erode node update over time a bit like a million year timelapse. so as the mountain grow over time the erosion progress at a controlled rate.

I hope given knowledge on display here this should be easy to figure out.

Looking forward to your replies, kind Regards, Ian.
  • Quick Links