pesky 1.#INF values showing up on floats?

   2820   8   1
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
hey guys, has anyone seen these weird values show up on floats after passing through an attribVOP that divides the sum of the values of a for loop by their count (i.e. average) ?

it seems very sporadic and causes sometimes this attribute to be invalidated in my next operations which is bad

any help to avoid or work around this issue would be appreciated!

Attachments:
INF.JPG (13.2 KB)

-G
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
update - this seems to happen even after the for loop “sums” my float values ): division does not seem to have anything to do with it
-G
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
OMG thank you… I am going to give that a whirl for sure.. did not realize there were vops to handle NANs..
-G
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
look at that… there is even a “is finite…”

thanks man!
-G
User Avatar
Member
4520 posts
Joined: 2月 2012
Offline
Glad it worked
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 | pragmaticvfx.gumroad.com
User Avatar
Member
7724 posts
Joined: 7月 2005
Offline
I don't think VEX should “produce” NANs if they didn't exist from the input. So double-check that your input values don't have NANs first. If they didn't, then I'd almost say it's a bug in VEX.
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
i'll double check my attributes but I think the non real number surged after summing the distance in between a point and all its neighbours inside a for loop. It also seems to oddly sometimes show up and sometimes not show up which is weird (but when it shows up, it “breaks” my attribute creation ): )
-G
User Avatar
Member
1799 posts
Joined: 10月 2010
Offline
ok upon further investigation, it seems like the infinite (1.#INF00) are being generated by the import into the for loop VOP (most likely since the index in my result screenshot is set to 0) OR potentially when calculating the distance in between this point and the neighbour points. it always seems to happen at the first iteration though

I suspect there may be a bug in the subinput VOP or the distance VOP that can sometime cause infinite numbers?

now that I can catch this, I am going to see if I can gracefully recover from it

thank you for the help!

Attachments:
finiteCatchRig.PNG (26.2 KB)
result.PNG (28.3 KB)

-G
  • Quick Links