Guido Posted February 18, 2021 Share Posted February 18, 2021 Hello, I'm struggling to invert attribute "@partdist" [attach]partdist.jpg[/attach] I created this expression but seems dosen't work f@partingMask = fit(@partdist, 0, 1, 1,0); [attach]partingMask.jpg[/attach] Maybe the value of partdist isn't 0 to 1 ? i see some strange values in geometry Spreadsheet like 3.34558e-05 [attach]geometrySpread.jpg[/attach] Thanks if anyone want help me to understand Quote Link to comment Share on other sites More sharing options...
ryew Posted February 19, 2021 Share Posted February 19, 2021 The expression you've listed should work fine. If you're concerned about the ranges, you can always manually clamp your range between 0 and 1, and then just take the absolute value of (partdisk - 1) which will effectively do the same inversion and you can check your values against that to confirm: f@partingMask = abs(clamp(@partdist, 0, 1)-1); Quote Link to comment Share on other sites More sharing options...
underscoreus Posted March 16, 2021 Share Posted March 16, 2021 Just to chime in, the "3.34558e-05" values you mention is simply an abbreviation that the attribute spreadsheet does, actually, this happens everywhere in Houdini. Basically just means that a number had too many 0 to be displayed easily so it was made into this mathematical abbreviation. I think if you were to write this number out it would be 0.00000334558. So whenever you encounter e-xx (where x can be any number) it just means that there are that many zeros behind the punctuation mark before you get to the other values displayed. Same if you ever see e+xx, just means that there are that many zeros before getting to the other numbers displayed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.