Forgot your password?   Click here   •   No account yet?   Please Register    •   Or login using  
JA ログイン
SideFX Homepage
  • 製品
    • What's New in 19.5
      • 概要
      • Solaris
      • Karma
      • Character FX
      • Pyro FX
      • FLIP Fluids
    • Houdini
      • 概要
      • FX 機能
      • CORE 機能
      • Solaris
      • PDG
    • Houdini Engine
      • 概要
      • Engine プラグイン
      • バッチ処理
    • Houdini Indie
    • 比較
    • SideFX Labs
    • Partners
  • 業界
    • Film & TV
    • ゲーム開発
    • モーショングラフィクス
    • Virtual Reality
  • コミュニティ
    • フォーラム
    • ニュース
    • カスタマ ストーリー
    • Gallery
    • Contests & Jams
    • Houdini HIVE Events
    • イベントカレンダー
    • User Groups
  • 学習
    • Start Here
    • My Learning
    • ラーニングパス
    • チュートリアル
    • Tech Demos
    • Houdini 講演
    • 学校紹介
    • 教育プログラム
      • 概要
      • 学生
      • 講師
      • 管理者
  • サポート
    • Customer Support
    • ヘルプデスク FAQ
    • Houdini システム環境
    • ドキュメント
    • Changelog / Journal
    • Report a Bug/RFE
  • Get
    • 購入
    • Download
    • Content Library
    • お問い合わせ
 
Advanced Search
Forums 検索
Found 5 posts.

Search results Show results as topic list.

Technical Discussion » Round off to third decimal places

User Avatar
mujuningaiza
5 posts
Offline
 2022年12月14日 05:05:55
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.
Edited by mujuningaiza - 2022年12月14日 05:10:02
See full post 

Technical Discussion » Round off to third decimal places

User Avatar
mujuningaiza
5 posts
Offline
 2022年12月13日 11:06:11
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.
Edited by mujuningaiza - 2022年12月13日 11:08:03
See full post 

Houdini Indie and Apprentice » About substance material sop

User Avatar
mujuningaiza
5 posts
Offline
 2022年11月17日 05:13:25
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.
See full post 

Houdini Learning Materials » Pragmatic VEX: Volume 1 [4K] [H19.5]

User Avatar
mujuningaiza
5 posts
Offline
 2022年11月17日 05:09:35
Thanks for sharing free chapters, I should get this ASAP. Thank you
See full post 

Houdini Indie and Apprentice » About substance material sop

User Avatar
mujuningaiza
5 posts
Offline
 2022年7月24日 15:56:08
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.
See full post 
  • Quick Links
Search links
Show recent posts
Show unanswered posts
製品
  • Houdini
  • Houdini Engine
  • Houdini Indie
学習
  • ラーニングパス
  • チュートリアル
  • Houdini 講演
  • 学校紹介
  • 教育プログラム
サポート
  • Customer Support
  • ヘルプデスク FAQ
  • ドキュメント
  • Report a Bug/RFE
  • Sales Inquiry
LEGAL
  • Terms of Use (英語)
  • Privacy Policy (英語)
  • License Agreement (英語)
  • Accessibility (英語)
  • Responsible Disclosure Program
COMPANY
  • SideFX社について
  • Press
  • T-Shirt Store
  • Careers
  • Internships
  • お問い合わせ
Copyright © SideFX 2023. All Rights Reserved.

使用言語