caching substeps

   7030   14   2
User Avatar
Member
220 posts
Joined: 2月 2016
Online
Hello,

Caching sub steps using the file cache node doesn't seem like a full proof solution if you want to cache sub steps from such data as a particle sim, etc. For example, I wanted to cache (bgeo) of a particle simulation with 5 substeps. If you look at my photo, you can see that I get frames like 2.200000000000000001 instead of 2.2. I tried everything, I tried setting the substeps to 5, I tried setting the increment to things such as (0.2 or 1/5) but nothing works. Some times it works, sometimes it does not (meaning some frames get the right number and some get long decimals). If I am only doing 2 substeps, it usually works fine. The more substeps you add, it starts to become less stable. Even the documentation says, “The disadvantage of using $FF is possible binary-to-decimal arithmetic errors causing $FF to have a value like 31.99999.” So does that mean there is no way to guarantee 100% success rate when caching substeps? If so, that seems like something that would be worth fixing.

Thanks
Edited by evanrudefx - 2020年11月23日 16:36:14

Attachments:
sub.jpg (166.8 KB)

Thanks,

Evan
User Avatar
Member
1 posts
Joined: 8月 2016
Offline
Did you find the solution?
Am also facing the same issue when caching out Particles, using the File Cache node with substeps 4, and changed the step count(Global Animation Option) to 0.25. It cached out perfectly but when I tried to read (with the File node) it showing an error.


Solution(Kind of):-
I found a solution don't know whether it's correct or not but i get what i want, I didn't use any increment in the File Cache node, I turned off the Real-Time Toggle, and the file node reading cache perfectly.

If you did find anything other than this, please tell me that process.
Thank you.
User Avatar
Member
220 posts
Joined: 2月 2016
Online
hello, sadly I didn't find a solution and no one replied with a solution that worked on here, odforum, or the facebook houdini group. I guess its just a limitation. I just had an idea of maybe trying to get $SF from the dopnet, and getting that value to the file cache node. Gonna try that see if it works.
Edited by evanrudefx - 2021年7月19日 15:21:10
Thanks,

Evan
User Avatar
Member
220 posts
Joined: 2月 2016
Online
actually, that doesn't work in the geometry file section. For some reason even if I try to round it off, it doesn't work there even though just above I can round it off just fine. Its like rounding a float in a string doesn't work. The slider "time" is a float that I made. So it works in a float expression, but not a string.
Edited by evanrudefx - 2021年7月19日 15:42:08

Attachments:
test.jpg (77.1 KB)

Thanks,

Evan
User Avatar
Member
236 posts
Joined: 3月 2013
Offline
Houdini absolutely sucks when it comes to built in sub-frame caching. Why even have the option to cache sub frames
on the file cache, when you cannot read them back in! It's mind boggling. Even Maya mdd caches work with substeps
with no problems for 10yrs+, still a bit shocked sidefx hasn't seen the need to fix this.

Rant over. Here is the solution for you. You set your subframe interval and you're done.
Edited by lewis_T - 2021年7月19日 22:08:40

Attachments:
Capture.JPG (43.4 KB)

I'm not lying, I'm writing fiction with my mouth.
User Avatar
Member
159 posts
Joined: 2月 2016
Offline
An alternative would be to use the "ROP Geometry Output" node(needs to be a ROP) with the $N variable instead of $F.
The $N variable increments the number once per save/substep. Then you end up with whole numbers instead of decimal hell.

Thanks to John Kunz for showing it off
https://www.twitch.tv/videos/1075507991?t=00h13m45s [www.twitch.tv]
User Avatar
Member
236 posts
Joined: 3月 2013
Offline
That method is not as flexible in terms of making tools around caching, and
requires additional nodes to transform time back, the above that I have shown only
requires a relative reference to the file cache path.

One additional note, $FF should never be used to read anything subframe back in, it has
rounding/precision errors as frame numbers increase. The more accurate way is $T*$FPS+1.
Edited by lewis_T - 2021年7月22日 19:39:58
I'm not lying, I'm writing fiction with my mouth.
User Avatar
Member
28 posts
Joined: 11月 2017
Offline
Hey guys
What is written here?
its too grainy to decipher...

Attachments:
002.jpg (116.0 KB)

User Avatar
Member
220 posts
Joined: 2月 2016
Online
itai
Hey guys
What is written here?
its too grainy to decipher...
Back tick
Thanks,

Evan
User Avatar
Member
28 posts
Joined: 11月 2017
Offline
I think I'm missing something in the frame numbers,
houdini cant read this sequence back,
I'm not sure how to add padding to this expression,
so it will read correctly.
smoke.001
smoke.002
etc.

this is the text I copied from here:
$HIP/geo//$HIPNAME.$OS.`pythonexprs('hou.frame()/hou.pwd().evalParm("f3")')`.bgeo.sc

thanks!
itai
Edited by itai - 2023年5月7日 08:41:38

Attachments:
001.jpg (226.7 KB)
002.jpg (56.0 KB)

User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
The new File Cache SOP is supposed to handle subframes properly for read and writes.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
28 posts
Joined: 11月 2017
Offline
By ticking this option?
It doesn't do anything for me here...
It is writing just whole frames, no in between.
Edited by itai - 2023年5月7日 09:25:25

Attachments:
006.jpg (94.8 KB)

User Avatar
Member
28 posts
Joined: 11月 2017
Offline
When I write the $FF as the Help file says,
it gives me a file sequence that Houdini cant read back,
Im not sure how to write the naming correctly, with good padding,
thanks!

wheelsIntersectSubframe_$FF.bgeo.sc

Attachments:
007.jpg (100.4 KB)
008.jpg (325.6 KB)

User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
What node is that?

File Cache SOP handles file paths automatically by default:

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
28 posts
Joined: 11月 2017
Offline
Got it, thanks!
  • Quick Links