Parameters Lose Significant Data Values

   1700   4   1
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
I was working on some Python functions which utilize values in parameters.

The functions take in a combination of parameter values and return the results to the paramters.

I was perlexed all day with seemingly odd unexpected results, thinking there was something wrong with the logic of my code.

But then I realized Houdini does major rounding cutoffs to parameter expression values that makes it impossible to do the code I wish to do.

Unless of course if i can modify the parameter behaviour to not round.

Houdini lets you input very large decimal numbers so long as those numbers do not include any whole numbers to the left of the decimal place.

The moment you introduce those whole numbers as part of your value much of your decimal value can be lost, even all of it.

I was hoping I could modify this behaviour, if anyone knows how to do this I would appreciate it.

Thanks

Attachments:
Param-Rounding-Example.jpg (82.8 KB)

User Avatar
Member
8583 posts
Joined: July 2007
Online
houdini is not rounding the value, just the displayed value in the parameter, so any math you do with the number should be still correct
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
That's what I thought.

But when I tested that it turns out to not be true.

I may have to re-create an example of what I was doing in a file to show that.

Thanks for your thoughts though.
User Avatar
Member
8583 posts
Joined: July 2007
Online
BabaJ

But when I tested that it turns out to not be true.
….
not sure what you did to conclude that it didn't work, but just to save you headaches, Spreadsheet also shows rounded value

if you print the value using python or as well print out of VEX should show you the correct value, as well as any operation you do using Hscript, Python or VEX should produce expected results
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
Yeah your right tamte;

In evaluating my code which used alot of If and While statments I was so focused on making sure my “test traps” in that code was being set up correctly I lost sight of the fact that what I was using as reference input was an already a rounded parameter value.

It was a matter of not seeing the forest for the trees.

However, part of the reason for this was the desire to have a visual feedback of the actual parameter value as feedback for my other controlling parameters.

I tried using a string parameter which works to a degree better, but it would be nice to have the option of “toggling” a parameters value to display what it would be like in the python shell.

I guess that would be a feature request.

But anyways, thanks for your feedback tamte which let me find my own mistake, simple as it was but missed nevertheless.
  • Quick Links