ワークフロー

WebGL material ワークフロー

Three.js、custom WebGL renderers、browser-based material previews 向けに、軽量で予測しやすい procedural maps を使います。

書き出し先
対象
Three.js / custom WebGL
推奨ルート
素早い load には GLB、custom shaders には PNG maps
主な出力
GLB material または individual PNG maps

チャンネル設定

Color map

Three.js の visible base color texture には sRGB color space を使い、custom shaders では同等の color conversion を行います。

Normal

normal maps は data textures として sample し、texture を rebake せず material 側で normal scale を調整します。

Roughness と AO

roughness と AO は linear のままにします。Three.js で AO を使う場合は UV2 または同等の secondary UV 処理も必要です。

Repeat と wrapping

seamless surfaces では repeat wrapping を有効にし、同じ export を複数の asset sizes に使えるよう code で repeat values を設定します。

インポート手順

1

GLB か map files を選ぶ

素早い carrier material が必要なら GLB を使います。renderer が shader と texture binding を管理するなら individual PNG maps を使います。

2

texture color space を設定

color maps に sRGB を割り当て、roughness、normal、height、AO は linear data textures として扱います。

3

repeat behavior を有効化

seamless surfaces では wrapS と wrapT を repeat にし、material repeat values または shader uniforms で scale を制御します。

4

map budget を計測

production で大きな map sets を使う前に、target device で resolution、compression、channel 数を確認します。

よくある確認

AO 用 UV2 がない

Three.js で AO が見えない場合、geometry が material に必要な UV set を持つか確認します。

colorSpace が違う

base color を linear として扱うと暗く見え、data maps を sRGB として扱うと roughness や normal response が崩れます。

大きな maps が多すぎる

browser scenes は texture memory に敏感です。camera distance に耐える最小 resolution を使います。

ワークフロー FAQ

WebGL では GLB が一番簡単ですか?

素早い material review には便利です。production renderers では individual maps の方が compression、loading、shader inputs を制御しやすいことが多いです。

seamless maps は Three.js で repeat できますか?

できます。texture wrapping mode を repeat にし、material または texture instance で repeat scale を制御します。