No More Retake

3DCG屋さん向けTips&Referenceサイト

メニュー

Houdiniレシピ:N番目に近いポイントの情報を取得する

Houdini回。
VEXです。
今回は、評価ポイントからN番目に近いポイントを取得する方法です。
評価ポイントから2番目に近いポイントや、5番目に近いポイントを取得するってことです。
以前、Noiseについて調べた時の副産物だったりします。

N番目の前に、もっとも近いポイントの探し方から。
これはnearpoint(VEX)を使うことでわかる。もっとも近いポイントの番号を教えてくれます。
下のは、それを使ってWorleyノイズを作ってるとこ。

PointCloudN_v012

ではN番目に近いポイントを取得するにはどうすればよいのか。
PointCloudOpen(VEX)とPoint Cloud Import by Index(VEX)のコンボで可能です。

PointCloudN_v02

PointCloudN_v03

Found Point Indexの値で取得したいpointのIndex番号を設定します。
0だと一番近いポイントということです。
Channelで欲しいパラメータを指定することで、情報を取得できます。

そんな感じです。

簡単ですがここまで。
変なとこあったらご指摘を。
サンプルファイルこちら、WorleyNoise_sample.hiplc。

関連記事

  1. 2014.12.03

    Houdini:FluitDrop

コメントをお待ちしております

このサイトについて

3DCG Tipsサイト。Houdiniの記事が多めです。

RSS

follow us in feedly

Archives

  • 2024 (1)
  • 2023 (2)
  • 2022 (9)
  • 2021 (14)
  • 2020 (46)
  • 2019 (17)
  • 2018 (33)
  • 2017 (29)
  • 2016 (36)
  • 2015 (64)
  • 2014 (54)
  • 2013 (60)
  • 2012 (55)

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

Houdiniを使えるようになる本


Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2Fnomoreretake.net%2F2015%2F12%2F17%2Fhoudinin_pointcloud_n%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.b.st-hatena.com/entry.count?url=http%3A%2F%2Fnomoreretake.net%2F2015%2F12%2F17%2Fhoudinin_pointcloud_n%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132