physical_sky

無限遠光源の第一レイヤにて割り当てられているフィジカルスカイの操作に使用する。


xshade
scene
physical_sky

メソッド一覧

get_sky_color 視点から天空方向に向かうベクトルを指定することによる空での色を取得する
set_datetime 日時を指定する
set_datetime_end アニメーション時の終了日時を指定する
set_now_datetime 現在日時を指定する
set_now_datetime_end アニメーションの終了時の日時を、現在日時として指定する

プロパティ一覧

background_auto_color 背景の色の自動調整
direction 光源の方向
color 光源の色(未使用)
datetime_day 日付時間の日 (1 - 31)
datetime_day_end 終了フレームでの日付時間の日 (1 - 31)
datetime_hour 日付時間の時 (0 - 23)
datetime_hour_end 終了フレームでの日付時間の時 (0 - 23)
datetime_minutes 日付時間の分 (0 - 59)
datetime_minutes_end 終了フレームでの日付時間の分 (0 - 59)
datetime_month 日付時間の月 (1 - 12)
datetime_month_end 終了フレームでの日付時間の月 (1 - 12)
datetime_second 日付時間の秒 (0 - 59)
datetime_second_end 終了フレームでの日付時間の秒 (0 - 59)
enable_animation_end 終了フレームを指定してのアニメーションを行うかどうか
gamma 背景と光源色のガンマ値
intensity 明るさの調整値
latitude 緯度
longitude 経度
north_angle 北向きを示す回転角度
utc UTC(タイムゾーン)
turbidity 大気(濁り)
update_light_color 光源色を自動更新するか
use_background 背景での上半球基本色で、無限遠光源の向きにより空模様の描画を行うかどうか
use_sun 無限遠光源の1番目を太陽光計算にて使用




フィジカルスカイのオブジェクトの取得は「xshade.scene().distant_light.physical_sky()」にて行う。

メソッド詳細

get_sky_color

視点から天空方向に向かうベクトルを指定することによる空での色を取得する。
戻り値 :
  rgb
引数 :
  vec3 : 視点から天空方向への向き

#視点から真上方向(0, 1, 0)での天空の色を出力
print xshade.scene().distant_light.physical_sky().get_sky_color([0, 1, 0])

set_datetime

日時を指定する。
引数 :
  int : 月 (1-12)
  int : 日 (1-31)
  int : 時 (0-23)
  int : 分 (0-59)
  int : 秒 (0-59)

#02/20 14:15:00を指定
print xshade.scene().distant_light.physical_sky().set_datetime(2, 20, 14, 15, 0)

set_datetime_end

アニメーション時の終了日時を指定する。
引数 :
  int : 月 (1-12)
  int : 日 (1-31)
  int : 時 (0-23)
  int : 分 (0-59)
  int : 秒 (0-59)

#アニメーション時の終了日時として、02/20 16:15:00を指定
print xshade.scene().distant_light.physical_sky().set_datetime_end(2, 20, 16, 15, 0)

set_now_datetime

現在日時を指定する。

#現在日時を指定する
print xshade.scene().distant_light.physical_sky().set_now_datetime()

set_now_datetime_end

アニメーションの終了時の日時を、現在日時として指定する。

#アニメーションの終了時の日時を、現在日時にする
print xshade.scene().distant_light.physical_sky().set_now_datetime_end()

プロパティ詳細

background_auto_color

背景の色の自動調整。

  • 取得
  • 設定

型 :
  bool

#背景の色の自動調整のOn/Offを出力
print xshade.scene().distant_light.physical_sky().background_auto_color

direction

光源の方向。

  • 取得
  • 設定

型 :
  vec3

#光源の向きを出力
print xshade.scene().distant_light.physical_sky().direction

color

光源の色。

  • 取得
  • 設定

型 :
  rgb

Shade 13.1では未使用。

#光源の色を出力
print xshade.scene().distant_light.physical_sky().color

datetime_day

日付時間の日 (1 - 31)。

  • 取得
  • 設定

型 :
  int

#日付時間の日を出力
print xshade.scene().distant_light.physical_sky().datetime_day

datetime_day_end

終了フレームでの日付時間の日 (1 - 31)。

  • 取得
  • 設定

型 :
  int

#終了フレームでの日付時間の日を出力
print xshade.scene().distant_light.physical_sky().datetime_day_end

datetime_hour

日付時間の時 (0 - 23) 。

  • 取得
  • 設定

型 :
  int

#日付時間の時を出力
print xshade.scene().distant_light.physical_sky().datetime_hour

datetime_hour_end

終了フレームでの日付時間の時 (0 - 23)。

  • 取得
  • 設定

型 :
  int

#終了フレームでの日付時間の時を出力
print xshade.scene().distant_light.physical_sky().datetime_hour_end

datetime_minutes

日付時間の分 (0 - 59)。

  • 取得
  • 設定

型 :
  int

#日付時間の分を出力
print xshade.scene().distant_light.physical_sky().datetime_minutes

datetime_minutes_end

終了フレームでの日付時間の分 (0 - 59)。

  • 取得
  • 設定

型 :
  int

#終了フレームでの日付時間の分を出力
print xshade.scene().distant_light.physical_sky().datetime_minutes_end

datetime_month

日付時間の月 (1 - 12)。

  • 取得
  • 設定

型 :
  int

#日付時間の月を出力
print xshade.scene().distant_light.physical_sky().datetime_month

datetime_month_end

終了フレームでの日付時間の月 (1 - 12)。

  • 取得
  • 設定

型 :
  int

#終了フレームでの日付時間の月を出力
print xshade.scene().distant_light.physical_sky().datetime_month_end

datetime_second

日付時間の秒 (0 - 59)。

  • 取得
  • 設定

型 :
  int

#日付時間の秒を出力
print xshade.scene().distant_light.physical_sky().datetime_second

datetime_second_end

終了フレームでの日付時間の秒 (0 - 59)。

  • 取得
  • 設定

型 :
  int

#終了フレームでの日付時間の秒を出力
print xshade.scene().distant_light.physical_sky().datetime_second_end

enable_animation_end

終了フレームを指定してのアニメーションを行うかどうか。

  • 取得
  • 設定

型 :
  bool

#「アニメーション時の終了日時を指定」のOn/Offを出力
print xshade.scene().distant_light.physical_sky().enable_animation_end

gamma

背景と光源色のガンマ値。

  • 取得
  • 設定

型 :
  float

#ガンマ値を出力
print xshade.scene().distant_light.physical_sky().gamma

intensity

明るさの調整値。

  • 取得
  • 設定

型 :
  float

#明るさの値を出力
print xshade.scene().distant_light.physical_sky().intensity

latitude

緯度。

  • 取得
  • 設定

型 :
  float

#緯度を出力
print xshade.scene().distant_light.physical_sky().latitude

longitude

経度。

  • 取得
  • 設定

型 :
  float

#経度を出力
print xshade.scene().distant_light.physical_sky().longitude

north_angle

北向きを示す回転角度。0の場合に-Z方向を北向きとする。

  • 取得
  • 設定

型 :
  float

#北向きを示す回転角度を出力
print xshade.scene().distant_light.physical_sky().north_angle

utc

UTC(タイムゾーン)。日本の場合は9.0。

  • 取得
  • 設定

型 :
  float

#UTCを出力
print xshade.scene().distant_light.physical_sky().utc

turbidity

大気(濁り)。0.0~1.0の実数値を指定。

  • 取得
  • 設定

型 :
  float

#大気(濁り)の値を出力
print xshade.scene().distant_light.physical_sky().turbidity

update_light_color

光源色を自動更新するか。

  • 取得
  • 設定

型 :
  bool

#「光源の色」のOn/Offを出力
print xshade.scene().distant_light.physical_sky().update_light_color

use_background

背景での上半球基本色で、無限遠光源の向きにより空模様の描画を行うかどうか。

  • 取得
  • 設定

型 :
  bool

#「有効(背景に描画)」のOn/Offを出力
print xshade.scene().distant_light.physical_sky().use_background

use_sun

無限遠光源の1番目を太陽光計算にて使用。

  • 取得
  • 設定

型 :
  bool

#太陽設定の「有効」のOn/Offを出力
print xshade.scene().distant_light.physical_sky().use_sun