Geometry Spreadsheet: Too Many Digits = Negative Value?

   338   2   0
User Avatar
Member
1251 posts
Joined: 4月 2017
オフライン
Hi!

In a detail wrangle, I'm multiplying the number 1029701632 by 4. The result is a negative value (result: -176160768) in the geometry spreadsheet. Is it because there's a limit to the amount of digits Houdini allows? Is there a way not to do that?

My wrangle is calculating the polycount after subdivisions (before actually subdividing). The idea is the alert the user to make a better choice when subdividing.

-Olivier

Attachments:
Houdini_Geo_Spreadsheet_Huge_Numbers_01.jpg (10.7 KB)

-Olivier
User Avatar
Member
39 posts
Joined: 1月 2016
オフライン
Most likely you are just hitting the limit of 32bit integer with that multiplication which can result in negative numbers (last bit is a sign bit). You can cast the attribute to 64bit with Attribute Cast and it should behave as you expect.
User Avatar
Member
1251 posts
Joined: 4月 2017
オフライン
Ah pefect, it works!

I simply set my wrangle to 64 bit (in the Bindings tab) instead of using the Attribute Cast sop.
-Olivier
  • Quick Links