mapping layer

表面材質のマッピングの一つのレイヤの操作に使用する。


xshade
shape
mapping_layer

メソッド一覧

load_image イメージを読み込む

プロパティ一覧

actual_size マッピングイメージの実寸サイズ(横、縦)
actual_size_mode 実寸のオン/オフ
area マッピング画像の使用範囲
blend_mode 合成モード
blur スムーズのオン/オフ
bump_height 高さ
channel_mix イメージのチャンネルの合成方法
flip_color 反転のオン/オフ
horizontal_flip 左右反転のオン/オフ
image イメージオブジェクト
mapping_color マッピングの色
mapping_size マッピングサイズ
origin 原点の位置
parameter_mapping UVの種類
pattern マッピングパターン
pattern_name パターンの名前
phase 位相
projection 投影の種類
repeat_image マッピングイメージのタイリングのオン/オフ
repetition_x 横方向の繰り返し回数
repetition_y 縦方向の繰り返し回数
softness ソフト
swap_axes 縦と横の交換
transformation テクスチャーの座標変換マトリクス
turbulence 乱れ
type マッピングタイプ
uv_mapping マッピングレイヤのUV
vertical_flip 上下反転のオン/オフ
weight 適用率




xshade.scene().active_shape().surface.mapping_layer(0)(マッピングレイヤの取得)のようにマッピングレイヤを取得して使用する。

メソッド詳細

load_image

イメージを読み込む。
引数 :
  file_path
マッピングパターンをイメージに設定してから使用しないと無効。

#jpgイメージファイルを読み込む
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(True, '*.jpg|jpg')
xshade.scene().active_shape().surface.mapping_layer(0).load_image(file_path)

プロパティ詳細

actual_size

マッピングイメージの実寸サイズ(横、縦)。

  • 取得
  • 設定

型 :
  float : 横(mm)
型 :
  float : 縦(mm)
投影が「ラップ」「球」以外で「実寸」がオンでないと無効。

print xshade.scene().active_shape().surface.mapping_layer(0).actual_size

actual_size_mode

実寸のオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).actual_size_mode

area

マッピング画像の使用範囲。

  • 取得
  • 設定

型 :
  rectangle

print xshade.scene().active_shape().surface.mapping_layer(0).area

blend_mode

合成モード。

  • 取得
  • 設定

型 :
  int :

0通常
1αブレンド
2加算
3減算
4乗算(レガシー)
5比較(明)
6比較(暗)
7乗算
print xshade.scene().active_shape().surface.mapping_layer(0).blend_mode

blur

スムーズのオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).blur

bump_height

高さ。

  • 取得
  • 設定

型 :
  float

print xshade.scene().active_shape().surface.mapping_layer(0).bump_height

channel_mix

イメージのチャンネルの合成方法。

  • 取得
  • 設定

型 :
  int :

0アルファ乗算済み
1アルファ透明
2アルファ乗算
3グレイスケール(A)
4グレイスケール(R)
5グレイスケール(G)
6グレイスケール(B)
7グレイスケール(輝度)
8グレイスケール(平均)
9未使用
print xshade.scene().active_shape().surface.mapping_layer(0).channel_mix

flip_color

反転のオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).flip_color

horizontal_flip

左右反転のオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).horizontal_flip

image

イメージオブジェクト。

  • 取得
  • 設定

型 :
  imageオブジェクト
参照 :
  image

#マッピングレイヤー0のイメージをウインドウに表示する
xshade.scene().active_shape().surface.mapping_layer(0).image.create_window('mapping_image')

mapping_color

マッピングの色。

  • 取得
  • 設定

型 :
  rgb

print xshade.scene().active_shape().surface.mapping_layer(0).mapping_color

mapping_size

マッピングサイズ。

  • 取得
  • 設定

型 :
  float

print xshade.scene().active_shape().surface.mapping_layer(0).mapping_size

origin

原点の位置。

  • 取得
  • 設定

型 :
  vec3

print xshade.scene().active_shape().surface.mapping_layer(0).origin

parameter_mapping

UVの種類。

  • 取得
  • 設定

型 :
  int : 0:距離補正、1:UV

print xshade.scene().active_shape().surface.mapping_layer(0).parameter_mapping

pattern

マッピングパターン。

  • 取得
  • 設定

型 :
  int :

0なし
1未使用
2ストライプ
3チェック
4スポット
5大理石
6木目
7丸太
8未使用
9未使用
10
11
12
13未使用
14イメージマッピング
827326721グリッド
827326722バンプアレイ
827326723レンガ
827326725ブロブ
827326726蜂の巣
827326727
827326728葉脈
827326729三角チェック
827326737グラデーション
827326739fBm
print xshade.scene().active_shape().surface.mapping_layer(0).pattern

pattern_name

パターンの名前。

  • 取得
  • 設定

型 :
  string

print xshade.scene().active_shape().surface.mapping_layer(0).pattern_name

phase

位相

  • 取得
  • 設定

型 :
  float

print xshade.scene().active_shape().surface.mapping_layer(0).phase

projection

投影の種類。

  • 取得
  • 設定

型 :
  int :

0
1
2
3ラップ
4円筒
5
6ボックス
print xshade.scene().active_shape().surface.mapping_layer(0).projection

repeat_image

マッピングイメージのタイリングのオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).repeat_image

repetition_x

横方向の繰り返し回数。

  • 取得
  • 設定

型 :
  int

print xshade.scene().active_shape().surface.mapping_layer(0).repetition_x

repetition_y

縦方向の繰り返し回数。

  • 取得
  • 設定

型 :
  int

print xshade.scene().active_shape().surface.mapping_layer(0).repetition_y

softness

ソフト。

  • 取得
  • 設定

型 :
  float

print xshade.scene().active_shape().surface.mapping_layer(0).softness

swap_axes

縦と横の交換のオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).swap_axes

transformation

テクスチャーの座標変換マトリクス。

  • 取得
  • 設定

型 :
  mat4

print xshade.scene().active_shape().surface.mapping_layer(0).transformation

turbulence

乱れ。

  • 取得
  • 設定

型 :
  float

print xshade.scene().active_shape().surface.mapping_layer(0).turbulence

type

マッピングタイプ。

  • 取得
  • 設定

型 :
  int :

0拡散反射
1光沢1
2光沢2
3反射
4透明度
5バンプ
6トリム
7環境
8発光
9バックライト
10マット
11屈折
12反射の荒さ
13異方性反射
14フレネル反射
15屈折の収差
16環境光
17ボリューム減衰距離
18ボリューム色
19ボリューム透明度
20ボリューム発光
21ノーマル
22ディスプレイスメント
23ライトマッピング
24不透明マスク
print xshade.scene().active_shape().surface.mapping_layer(0).type

uv_mapping

マッピングレイヤのUV。

  • 取得
  • 設定

型 :
  int

print xshade.scene().active_shape().surface.mapping_layer(0).uv_mapping

vertical_flip

上下反転のオン/オフ。

  • 取得
  • 設定

型 :
  bool

print xshade.scene().active_shape().surface.mapping_layer(0).vertical_flip

weight

適用率。

  • 取得
  • 設定

型 :
  float

print xshade.scene().active_shape().surface.mapping_layer(0).weight