2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[TouchDesigner]POPs Read-only Built-in Attribute まとめ

Posted at

はじめに

TouchDesigner公式によると、POPsには数多くの「read-only built-in attribute」が自動で生成され、これらを使うことでポイントのインデックスや正規化された位置、各種構造・時間情報などをすぐに参照でき、独自に属性を作成する手間が省けるようになっています。

Read-only Built-in Attributeとは、Built-in Attributeの中でもユーザーが変更できないread-only属性であり、ジオメトリ情報やシミュレーション状態を取得するのに使える特殊なアトリビュートです。
スクリーンショット 2025-08-06 155122.png

数値の確認方法

Read-only Built-in Attributeは特殊なアトリビュートのため、アトリビュートに数値をコピーすることではじめて数値を確認することができます。
スクリーンショット 2025-08-10 212507.png

カテゴリ別一覧

以下では、カテゴリ別に整理します

1. Point 関連

属性名 説明
_PointI int ポイントのインデックス(0始まり)
_PointU float ポイントインデックスを 0〜1 に正規化した値
_PointCy float ポイントインデックスを循環的に正規化した値。(_N-1)/_N まで進んだら0に戻る(1は最初のポイントを意味)

2. Primitive 関連

属性名 説明
_PrimI int プリミティブのインデックス
_PrimU float プリミティブインデックスを 0〜1 に正規化した値
_PrimCy float プリミティブインデックスを循環的に正規化した値

3. Vertex 関連

属性名 説明
_VertI int 頂点番号(頂点を処理している場合)
_VertU float 頂点番号を 0〜1 に正規化した値
_VertCy float 頂点番号を循環的に正規化した値

5. Dimension(多次元配列)情報

属性名 説明
_DimI[n] int n番目の次元インデックス(例:3Dグリッドなら _DimI[0] が列、_DimI[1] が行)
_DimU[n] float n番目の次元インデックスを0~1 に正規化した値
_DimCy[n] float n番目の次元インデックスを0~1 を循環的に正規化した値
_DimSize[n] int n番目の次元の数値(例:torusなら_DimSize[0]が行、_DimSize[1] )
_NumDim int 次元の数(例:3Dグリッドを3Dグリッドでコピーした場合は6)

6. Bounds(バウンディングボックス)情報

属性名 説明
_BoundsMinP vec3 バウンディングボックス最小座標
_BoundsMaxP vec3 バウンディングボックス最大座標
_BoundsCenterP vec3 バウンディングボックス中心座標

7. ステップ情報

属性名 説明
_StepFrames float 現在のステップのフレーム数 (通常の1フレーム更新なら1)
_StepSeconds float 現在のステップの秒数(_StepFrames / FPSの結果に相当する)

8. 定数・最大値

属性名 説明
_Pi float 円周率(3.14159...)
_MaxUInt uint 符号なし整数の最大値
_MaxInt int 整数の最大値
_NoNeighbor int 「存在しない」隣接要素を表す特殊値。内部的には _MaxUInt と同じ値を利用
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?