■ [Houdini]テクスチャを頂点カラーに転写
- https://www.sidefx.com/forum/topic/18597/
- vertexuv_to_point-2.hipnc
- vopsopで、uvとcmapを取得してからcolormapに突っ込んでテクスチャをサンプリングし、outputのCdに入れることでテクスチャの模様の頂点カラーを生成
■ [Houdini]Game Development Toolset
Game Development Toolset は SideFX が提供するゲームコンテンツ制作で便利なツール集。Github から提供されている。ここでは、そのインストール方法と主要なツールを紹介する。
■ [Houdini]カーブ上の先頭からの距離を求める(1)
カーブ上の距離を求める準備段階として、一つ前の点との距離を新規Attributeで追加するPoint VOPを作るとこうなった。
- ptnumをsubConst→importPoint(P)でひとつ前の頂点座標を取得
- Pからひとつ前の頂点を引いてlengthで距離を計算
- ひとつ前の頂点との差分はptnum==0で破綻するので、ptnumをcompare==0して、two Wayでptnum==0のとき0を返すように
- addAttributeしておいたアトリビュートに、setAttributeで値を入れる。このとき、i1には頂点番号を入れる必要がある
■ [Houdini]カーブ上の先頭からの距離を求める(2)
- how to get length of a curve?
You can get the length of a curve primitive with the arclen expression function. Example:
arclen(“../curve1”, 0, 0, 1)
You could also use a Resample SOP after the curve, choose the Maximum Segment Length option, specify a segment length, and use the resampled curve as a template geometry (second input) in the Copy SOP, using the box you wish to duplicate along the curve as the first input of the Copy SOP.