Lymond Ngaiza

mujuningaiza

About Me

EXPERTISE
Generalist
INDUSTRY
Film/TV

Connect

LOCATION
Mwanza, Tanzania, United Republic of
WEBSITE

Houdini Skills

BEGINNER
Procedural Modeling  | Digital Assets  | Solaris  | Karma  | Pyro FX  | Fluids  | Destruction FX  | VEX

Availability

Not Specified

Recent Forum Posts

Round off to third decimal places Dec. 14, 2022, 5:05 a.m.

jsmack
Assuming adding a layer of vex to convert from float to string is a pain, the ftrim() expression can be used to pretty print floats as strings.

ftrim(detail(-1, "test", 0))

Thanks @jsmack for showing me how to use ftrim expression this is helpful, although I can't trim to how many decimals I want. Although with
sprint("%.3f", 0.7838759687)
I can Trim to 3 decimal place.
I believe adding
sprintf
under the belt is not bad idea.

Round off to third decimal places Dec. 13, 2022, 11:06 a.m.

tamte
as mentioned previously, it's has to do with floating point precision
even if you do: f@target = 0.998;
you will see that the Font SOP will still print something else, like: 0.99800002574920654

it's because it can't represent 0.998 precisely as a floating point number

so you'll need to format your floating point number into a string using sprintf() for example


From Tomas attachment there's some function & argument am not familiar with, so incase someone is struggling as I was

When you use
sprint("%f", floatValue);
will convert float value into string
This work whether you type hard core floats or you're using chf values.

When you want to trim decimal places like 1 or 2 or 3 decimal place you will have to write like

sprint("%.2f", floatValue);
This means convert trim to 2 decimal places, i.e 0.256234 will become 0.256

Hopefully this will be helpful as well.

About substance material sop Nov. 17, 2022, 5:13 a.m.

mujuningaiza
Anyone got Substance Archive working in Houdini? I've tested the Archive in Substance Player and Maya working fine, when I load it in Houdini I can't get substance parameters. ANy help will be appreciated, thank you.

I finally found that Substance archive in Houdini should be old version, I tried Substance Designer 2019 and it worked as expected.