レンダリングの取得、設定、開始、終了に使用する。
xshade |
↑ |
scene |
↑ |
rendering |
add_style | レンダリングスタイルを追加する |
append_animation | レンダリングイメージをアニメーションに追加する |
custom_image_layer | カスタムレイヤーオブジェクトを返す |
delete_custom_image_layer | カスタムレイヤーを削除する |
delete_image_layer | 指定したIDのイメージレイヤを削除する |
finish_animation | アニメーションの作成を終了する |
get_custom_image_layer_enable | カスタムレイヤーのオン/オフを返す |
get_effector_uuid | 指定したインデックスのエフェクタのuuidを返す |
get_image_layer_enable | レイヤーのオン/オフを返す |
image_layer | 指定したIDのイメージレイヤー |
image_layer_by_index | インデックスで指定したレイヤーオブジェクトを返す |
load | レンダリング設定ファイルを読み込む |
magnify_image | イメージウインドウの表示スケールを拡大する |
number_of_image_layers | レイヤーの数を返す |
render | レンダリングを最初から行う |
resume | レンダリングを再開する |
save | レンダリング設定ファイルを保存する |
set_current_camera | 指定したカメラオブジェクトをカレントカメラに設定する |
set_custom_image_layer_enable | カスタムレイヤーのオン/オフ |
set_effector_uuid | 指定したインデックスにuuidでエフェクタを設定する |
set_image_layer_enable | レイヤーのオン/オフ |
shrink_image | イメージウインドウの表示スケールを縮小する |
start | レンダリングを開始する |
start_animation | アニメーションの作成を開始する |
start_area | 矩形領域をレンダリングする |
stop | レンダリングを中止する |
unscale_image | レンダリングイメージのスケールをリセットする |
update_image | イメージ表示を更新する |
add_style
レンダリングスタイルを追加する。
引数 :
string
xshade.scene().rendering.add_style('sample')
append_animation
レンダリングイメージをアニメーションに追加する。
参照 :
start_animation
finish_animation
#形状が移動する10フレームのアニメーションを作成する
xshade.scene().rendering.start_animation(None)
for i in range(10):
xshade.scene().rendering.render()
xshade.scene().rendering.append_animation()
xshade.scene().move_object(None, None, None, [100.0, 0.0, 0.0])
xshade.scene().rendering.finish_animation()
custom_image_layer
カスタムレイヤーオブジェクト。
引数 :
uuid : 128ビットの数値
引数 :
string : レイヤーのID
戻り値 :
image_layer
参照 :
image_layer
uuid
rendering.image_layerは Shade 3D 標準のイメージレイヤーを返す。
rendering.custom_image_layerはトゥーンレンダラなどのカスタムイメージレイヤーを返す。
#レンダリングイメージからトゥーンレンダラのカスタムレイヤー、「ToonEdge」を得る
xshade.scene().rendering.custom_image_layer("514FE711-7919-4d66-B9CA-048DC2AF5E2F", "ToonEdge")
delete_custom_image_layer
カスタムレイヤーを削除する。
引数 :
uuid : 128ビットの数値
引数 :
string : レイヤーのID
戻り値 :
bool
参照 :
uuid
delete_image_layer
delete_image_layerは Shade 3D 標準のレイヤーの削除を行う。
delete_custom_image_layerはトゥーンレンダラなどのカスタムレイヤーの削除を行う。
#レンダリングイメージからトゥーンレンダラのカスタムレイヤー、「ToonEdge」を削除
xshade.scene().rendering.delete_custom_image_layer("514FE711-7919-4d66-B9CA-048DC2AF5E2F", "ToonEdge")
delete_image_layer
指定したIDのイメージレイヤーを削除する。
引数 :
string : レイヤーのID
戻り値 :
bool
参照 :
delete_custom_image_layer
delete_image_layerは Shade 3D 標準のレイヤーの削除を行う。
delete_custom_image_layerはトゥーンレンダラなどのカスタムレイヤーの削除を行う。
#「発光(Glow)」のレイヤーを削除する
xshade.scene().rendering.delete_image_layer('Glow')
finish_animation
アニメーションの作成を終了する。
参照 :
start_animation
append_animation
#形状が移動する10フレームのアニメーションを作成する
xshade.scene().rendering.start_animation(None)
for i in range(10):
xshade.scene().rendering.render()
xshade.scene().rendering.append_animation()
xshade.scene().move_object(None, None, None, [100.0, 0.0, 0.0])
xshade.scene().rendering.finish_animation()
get_custom_image_layer_enable
カスタムレイヤーのオン/オフを返す。
引数 :
uuid : 128ビットの数値
引数 :
string : レイヤーのID
戻り値 :
bool
参照 :
uuid
set_custom_image_layer_enable
#マルチパスタブのトゥーンレンダラの「ToonEdge」のオン/オフを返す
print xshade.scene(). rendering.get_custom_image_layer_enable("514FE711-7919-4d66-B9CA-048DC2AF5E2F", "ToonEdge")
get_effector_uuid
指定したインデックスのエフェクタのuuidを返す
引数 :
int : エフェクタのインデックス
戻り値 :
uuid : 128ビットの数値
参照 :
set_effector_uuid
has_effectors エフェクタが設定されているか
number_of_effectors 設定されているエフェクタの数
uuid
指定したインデックス(非負整数)が存在しない場合は「00000000-0000-0000-0000-000000000000」を返す。
#エフェクタが設定されている場合、1番目のエフェクタのuuidを出力
if xshade.scene().rendering.has_effectors:
print xshade.scene().rendering.get_effector_uuid(0)
get_image_layer_enable
レイヤーのオン/オフを返す
引数 :
string : レイヤーのID
戻り値 :
bool
参照 :
set_image_layer_enable
#「フォグ」のオン/オフを出力する
print xshade.scene().rendering.get_image_layer_enable('fog')
image_layer
指定したIDのイメージレイヤー。
引数 :
string : レイヤーのID
戻り値 :
image_layer
参照 :
image_layer
custom_image_layer
rendering.image_layerは Shade 3D 標準のイメージレイヤーを返す。
rendering.custom_image_layerはトゥーンレンダラなどのカスタムイメージレイヤーを返す。
#「拡散反射(Diffuse)」レイヤーのイメージをウインドウに表示する
diffuse_layer = xshade.scene().rendering.image_layer('Diffuse')
diffuse_layer.image.create_window('layer')
image_layer_by_index
インデックスで指定したレイヤーオブジェクトを返す。
引数 :
int : カテゴリの中でのインデックス
引数 :
int : カテゴリの番号。省略時-1
-1 | 全てのレイヤー |
0 | 統合レイヤー |
1 | カラー要素 |
2 | データ要素 |
3 | 形状マスク |
4 | 表面材質マスク |
5 | プラグインで生成したレイヤー |
6 | 未使用 |
戻り値 :
image_layer
#全てのレイヤーの2番目のインデックスの名称を出力する print xshade.scene().rendering.image_layer_by_index(1).id_name #データ要素(カテゴリ2)の最初のインデックスの最大値を出力する print xshade.scene().rendering.image_layer_by_index(0, 2).maximum_value
load
レンダリング設定ファイルを読み込む。
引数 :
file_path
#レンダリング設定ファイルを読み込む
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(True, '*.shdrst|shdrst')
xshade.scene().rendering.load(file_path)
magnify_image
イメージウインドウの表示スケールを拡大する。
引数 :
int
参照 :
shrink_image
#表示スケールを200%にする
xshade.scene().rendering.magnify_image(2)
number_of_image_layers
レイヤーの数を返す。
引数 :
int : カテゴリの番号。省略時-1
-1 | 全てのレイヤー |
0 | 統合レイヤー |
1 | カラー要素 |
2 | データ要素 |
3 | 形状マスク |
4 | 表面材質マスク |
5 | プラグインで生成したレイヤー |
6 | 未使用 |
戻り値 :
int
#全てのレイヤーの数を出力する
print xshade.scene().rendering.number_of_image_layers()
render
レンダリングを最初から行う。
戻り値 :
数値
renderはレンダリング終了まで次の処理に移らない。
startはレンダリング開始後次の処理に移る。
xshade.scene().rendering.render()
resume
レンダリングを再開する。
中止されていれば途中からレンダリングを再開する。
中止していなければ最初からレンダリングを行う。
レンダリング開始後次の処理に移る。
xshade.scene().rendering.resume()
save
レンダリング設定を保存する。
引数 :
file_path
#レンダリング設定を保存する
dialog = xshade.create_dialog_with_uuid()
file_path = dialog.ask_path(False, '*.shdrst|shdrst')
xshade.scene().rendering.save(file_path)
set_current_camera
指定したカメラオブジェクトをカレントカメラに設定する
引数 :
cameraオブジェクト
#選択しているカメラ形状をカレントカメラに設定する
camera = xshade.scene().active_shape()
xshade.scene().rendering.set_current_camera(camera)
set_custom_image_layer_enable
カスタムレイヤーのオン/オフ。
引数 :
uuid : 128ビットの数値 : 514FE711-7919-4d66-B9CA-048DC2AF5E2F(ToonRendering)
引数 :
string : レイヤーのID
引数 :
bool
参照 :
uuid
get_custom_image_layer_enable
#カスタムレイヤーのToonEdgeをオンにする
xshade.scene().rendering.set_custom_image_layer_enable("514FE711-7919-4d66-B9CA-048DC2AF5E2F", "ToonEdge", 1)
set_effector_uuid
指定したインデックスにuuidで指定されるエフェクタを設定する
引数 :
int : エフェクタのインデックス
引数 :
uuid : 128ビットの数値 : エフェクタのuuid
ノイズを加える | 39b02e6f-d94c-4385-9116-f0121f1071d0 |
アルファチャンネル抽出 | 674c006d-46b0-4033-8eaa-7284d6f008de |
Z値抽出 | 93156148-62bd-483d-bec7-7f1dc3c09b0d |
諧調の反転 | 51055c47-7a0a-4ebd-a885-29e8cbabb4ba |
BlurEffector | f00f8f8b-bc6b-47f1-930f-5082dad30920 |
タイムコード焼き込み | 30210010-53b8-11d9-bcff-000a95baceb2 |
DepthPlus | 34200100-53b8-11d9-bcff-000a95baceb2 |
FogPlus | 44200202-53b8-11d9-bcff-000a95baceb2 |
グローエフェクタ | 306f0000-53b8-11d9-bcff-000a95baceb2 |
パーティクルフィジックス | 573b1570-f05f-40d1-9930-a6c7ce628c84 |
パーティクルエフェクタ | 30100011-53b8-11d9-bcff-000a95baceb2 |
スター | 1ff00018-53b8-11d9-bcff-000a95baceb2 |
参照 :
get_effector_uuid
uuid
#1番目に諧調の反転を設定する
xshade.scene().rendering.set_effector_uuid(0, '51055c47-7a0a-4ebd-a885-29e8cbabb4ba')
set_image_layer_enable
レイヤーのオン/オフ。
引数 :
string : レイヤーのID
引数 :
bool
参照 :
get_image_layer_enable
#Reflect(反射)レイヤーをオフにする
xshade.scene().rendering.set_image_layer_enable('Reflect',False)
shrink_image
イメージウインドウの表示スケールを縮小する。
引数 :
int
参照 :
magnify_image
#表示スケールを50%にする
xshade.scene().rendering.shrink_image(2)
start
レンダリングを開始する。
renderはレンダリング終了まで次の処理に移らない。
startはレンダリング開始後次の処理に移る。
xshade.scene().rendering.start()
start_animation
アニメーションの作成を開始する。
引数 :
file_path : 保存するファイルのパス : Noneでファイル保存ダイアログボックスを開く。
動画、画像形式は拡張子で指定する。
file_pathに保存するファイルのパスを設定した場合は、圧縮の設定ダイアログボックスを表示しない。
ファイルへの書き込みに失敗した場合は例外を投げる。
参照 :
append_animation
finish_animation
#形状が移動する10フレームのアニメーションを作成する
xshade.scene().rendering.start_animation(None)
for i in range(10):
xshade.scene().rendering.render()
xshade.scene().rendering.append_animation()
xshade.scene().move_object(None, None, None, [100.0, 0.0, 0.0])
xshade.scene().rendering.finish_animation()
start_area
矩形領域をレンダリングする。
引数 :
rectangle
レンダリング開始後次の処理に移る。
#[0,0,100,100]の矩形領域をレンダリングする
xshade.scene().rendering.start_area([0,0,100,100])
stop
レンダリングを中止する。
xshade.scene().rendering.stop()
unscale_image
レンダリングイメージのスケールをリセットする。
イメージウインドウを更新しないと反映されない。
#スケールをリセットしてイメージウインドウを更新する xshade.scene().rendering.unscale_image xshade.image_view().update() #xshade.scene().rendering.update_image()でも可
update_image
イメージ表示を更新する。
xshade.scene().rendering.update_image()
always_solve_radiosity
「ラジオシティ」レンダリング前に計算するのオン/オフ。
型 :
bool
print xshade.scene().rendering.always_solve_radiosity
antialiasing
アンチエリアシングのオン/オフ。
型 :
bool
print xshade.scene().rendering.antialiasing
antialiasing_mode
アンチエイリアシングの種類。
型 :
int :
0 | ドラフト |
1 | オーバーサンプリング |
2 | アダプティブサンプリング |
print xshade.scene().rendering.antialiasing_mode
auto_maximum_distance
Z値の最大距離の自動のオン/オフ。
型 :
bool
print xshade.scene().rendering.auto_maximum_distance
can_resume
レンダリングを再開できるかどうか。
型 :
bool
print xshade.scene().rendering.can_resume
can_use_rendering_server
ShadeGridが使用できるかどうか 。
型 :
bool
print xshade.scene().rendering.can_use_rendering_server
current_index
print xshade.scene().rendering.current_index
fisheye_distortion
魚眼レンズの歪曲率。
型 :
float
print xshade.scene().rendering.fisheye_distortion
global_illumination
大域照明のタイプ。
型 :
int
0 | 無し |
1 | パストレーシング |
2 | フォトンマップ |
5 | パストレーシング + フォトンマップ |
3 | ラジオシティ |
print xshade.scene().rendering.global_illumination
has_effectors
エフェクタが設定されているかどうか。
型 :
bool
print xshade.scene().rendering.has_effectors
has_renderer
現在選択されているレンダリング手法を持っているかどうか
print xshade.scene().rendering.has_renderer
image
#レンダリングイメージオブジェクトのサイズを出力する
print xshade.scene().rendering.image.size
image_dpi
解像度。
型 :
float
print xshade.scene().rendering.image_dpi
image_size
レンダリングイメージのサイズ。
型 :
size
print xshade.scene().rendering.image_size
indirectenergy_factor
間接光の明るさ
型 :
float
print xshade.scene().rendering.indirectenergy_factor
irradiance_cache_tolerance
キャッシュトレランス
型 :
float
print xshade.scene().rendering.irradiance_cache_tolerance
irradiance_caching
イラディアンスキャッシュのオン/オフ
型 :
bool
print xshade.scene().rendering.irradiance_caching
irradiance_gradient
イラディエンスグラディエント。
型 :
float
print xshade.scene().rendering.irradiance_gradient
is_still_rendering
レンダリング中かどうか。
型 :
bool
print xshade.scene().rendering.is_still_rendering
keep_z_deprecated
Z値を保持するのオン/オフ。
型 :
bool
print xshade.scene().rendering.keep_z_deprecated
maximum_distance
Z値の最大距離。
型 :
float
print xshade.scene().rendering.maximum_distance
method
レンダリング手法。
型 :
int :
0 | レイトレーシング |
1 | パストレーシング |
2 | レイトレーシング(ドラフト) |
407321464 | トゥーンレンダリング |
825229312 | ワイヤーフレーム |
トゥーンレンダラの値のみ設定するとレイトレーシングとなる。
method_uuid の使用を推奨。
print xshade.scene().rendering.method
method_name
選択されているレンダリング手法の名前。
型 :
string
print xshade.scene().rendering.method_name
method_uuid
レンダリング手法のuuid
型 :
uuid : 128ビットの数値
レイトレーシング(ドラフト) | 10.0.3 | 2 0 0 0 |
10.5 | 00000002-0000-0000-0000-000000000000 | |
レイトレーシング | 10.0.3 | 0 0 0 0 |
10.5 | 00000000-0000-0000-0000-000000000000 | |
パストレーシング | 10.0.3 | 1 0 0 0 |
10.5 | 00000001-0000-0000-0000-000000000000 | |
トゥーンレンダラ | 10.0.3 | 18473b78 6e0b4beb b5143cc9 bc31d80f |
10.5 | 18473b78-6e0b-4beb-b514-3cc9bc31d80f | |
ワイヤフレーム | 10.0.3 | 31300000 53b811d9 bcff000a 95baceb2 |
10.5 | 31300000-53b8-11d9-bcff-000a95baceb2 |
print xshade.scene().rendering.method_uuid
minimum_samples
アンチエイリアシングのアダプティブサンプリングの最小サンプル数。
型 :
int :
0 | 無し |
1 | 4 |
2 | 7 |
3 | 10 |
4 | 15 |
5 | 25 |
6 | 36 |
7 | 49 |
8 | 64 |
print xshade.scene().rendering.minimum_samples
multipass_rendering
マルチパスを保持するのオン/オフ。
型 :
bool
print xshade.scene().rendering.multipass_rendering
no_antialiasing_data_paths
データパスでアンチエリアシングを適用しないのオン/オフ。
型 :
bool
print xshade.scene().rendering.no_antialiasing_data_paths
number_of_effectors
設定しているエフェクタの数。
型 :
int
print xshade.scene().rendering.number_of_effectors
number_of_sets
レンダリングセットの数。
型 :
int
print xshade.scene().rendering.number_of_sets
number_of_threads
スレッド数。
型 :
int : 0 : 自動(Auto)
print xshade.scene().rendering.number_of_threads
oversampling
アンチエリアシングのオーバサンプリング。
型 :
int :
2 | 2x2 |
3 | 3x3 |
4 | 4x4 |
5 | 5x5 |
6 | 6x6 |
7 | 7x7 |
8 | 8x8 |
print xshade.scene().rendering.oversampling
panorama_projection
パノラマの手法。
型 :
int :
0 | 無し |
1 | 円柱投影 |
2 | 球投影 |
3 | ライトプローブ |
4 | キューブマップ |
5 | バーティカルクロス |
print xshade.scene().rendering.panorama_projection
photons_caustics_gathering_scale
コースティクス収集スケール
型 :
float
print xshade.scene().rendering.photons_caustics_gathering_scale
photons_gathering_adaptive_scale
収集スケール(適応値)
型 :
float
print xshade.scene().rendering.photons_gathering_adaptive_scale
photons_gathering_scale_type
収集スケールタイプ
型 :
int :
0 | 適応値 |
1 | 相対値 |
2 | 絶対値 |
print xshade.scene().rendering.photons_gathering_scale_type
photons_gathering_shape_comparison_scale
収集スケール。
型 :
float
print xshade.scene().rendering.photons_gathering_shape_comparison_scale
pixel_depth
ピクセル深度
型 :
float
print xshade.scene().rendering.pixel_depth
pixel_ratio
ピクセル縦横比。
型 :
float
print xshade.scene().rendering.pixel_ratio
premultiplied_pixel
アルファ値乗算済みのオン/オフ。
型 :
bool
print xshade.scene().rendering.premultiplied_pixel
ray_cast_level
視線追跡レベル。
型 :
int : (0..100)
print xshade.scene().rendering.ray_cast_level
ray_offset
レイオフセット。
型 :
float
print xshade.scene().rendering.ray_offset
ray_offset_type
レイオフセットの種類。
型 :
int : 0 : 相対値、1 : 絶対値
print xshade.scene().rendering.ray_offset_type
ray_tracing_delta
レイトレーシングデルタ。
型 :
float
print xshade.scene().rendering.ray_tracing_delta
ray_tracing_quality
レイトレーシングの画質。
型 :
int : (0..100)
print xshade.scene().rendering.ray_tracing_quality
raytracing_adaptive_threshold
レイトレーシングの空間分割におけるしきい値。
型 :
float
print xshade.scene().rendering.raytracing_adaptive_threshold
raytracing_grid_threshold
レイトレーシングにおいて、非効率な空間分割をキャンセルするためのしきい値。
型 :
float
print xshade.scene().rendering.raytracing_grid_threshold
refinement_threshold
アンチエイリアシングのリファインメント閾値。
型 :
bool
print xshade.scene().rendering.refinement_threshold
reflect_background
背景を反映のオン/オフ。
型 :
bool
print xshade.scene().rendering.reflect_background
reflection_factor
反射係数。
型 :
float
print xshade.scene().rendering.reflection_factor
render_transparency_deprecated
透明度を描画のオン/オフ。
型 :
bool
print xshade.scene().rendering.render_transparency_deprecated
renderer_index
レンダリング手法のインデックス。
型 :
int :
0 | レイトレーシング |
1 | パストレーシング |
2 | レイトレーシング(ドラフト) |
3 | トゥーンレンダリング |
4 | ワイヤーフレーム |
print xshade.scene().rendering.renderer_index
sampling_filter
サンプリングフィルタの種類。
型 :
int :
0 | シリンダー |
1 | ボックス |
2 | トライアングル |
3 | ガウス |
4 | ブラックマン-ハリス |
5 | ミッチェル-ネトラヴァリ |
6 | カトマル-ロム |
print xshade.scene().rendering.sampling_filter
sampling_quality
アンチエイリアシングのアダプティブサンプリングのサンプリング品質。
型 :
float
print xshade.scene().rendering.sampling_quality
sampling_spread
サンプリングフィルタの範囲。
型 :
float
print xshade.scene().rendering.sampling_spread
scaled_image
レンダリングイメージにイメージウインドウの表示倍率を適用したイメージ。
型 :
imageオブジェクト
#レンダリングイメージを表示倍率を適用してウインドウで開く
xshade.scene().rendering.scaled_image.create_window()
script
レンダリング実行時に実行するスクリプト。
型 :
string : script
レンダリングを開始すると設定したスクリプトを実行する。
#レンダリング開始時にメッセージを出力するスクリプトを設定する
xshade.scene().rendering.script = "print 'start rendering'"
shadow_map_bias
シャドウマップバイアス。
型 :
float
print xshade.scene().rendering.shadow_map_bias
shadow_map_blur
シャドウマップブラー。
型 :
float
print xshade.scene().rendering.shadow_map_blur
shadow_map_sampling
シャドウマップサンプリング。
型 :
int :
0 | 4x4ジタリング |
1 | 8x8ジタリング |
2 | 16x16ジタリング無し |
print xshade.scene().rendering.shadow_map_sampling
shadow_map_size
シャドウマップサイズ。
型 :
int
print xshade.scene().rendering.shadow_map_size
shadow_type
影の種類。
型 :
int : 1 : レイトレーシング、2 : シャドウマップ
print xshade.scene().rendering.shadow_type
show_background
背景を描画のオン/オフ。
型 :
bool
print xshade.scene().rendering.show_background
show_shadow
影を描画のオン/オフ。
型 :
bool
print xshade.scene().rendering.show_shadow
style
print xshade.scene().rendering.style
style_name
レンダリングの対象となるレンダリングスタイルの名前。
型 :
string
print xshade.scene().rendering.style_name
surface_division_level
曲面の分割。
型 :
int :
0 | 分割しない |
1 | 荒い |
2 | 普通 |
3 | 細かい |
4 | 最も細かい |
print xshade.scene().rendering.surface_division_level
target_number_of_photons
フォトン数。
型 :
int
print xshade.scene().rendering.target_number_of_photons
total_energy
エネルギー。
型 :
bool : False : 間接光、True : 直接光+間接光
print xshade.scene().rendering.total_energy
transparency_affects_alpha
透明度がアルファに影響するのオン/オフ。
型 :
bool
print xshade.scene().rendering.transparency_affects_alpha
uses_radiosity
ラジオシティを使用するかどうか。
型 :
bool
大域証明でラジオシティを選択する。
print xshade.scene().rendering.uses_radiosity
uses_refinement_threshold
アンチエイリアシングのリファインメント閾値のオン/オフ。
型 :
bool
大域証明でラジオシティを選択する。
print xshade.scene().rendering.uses_refinement_threshold
uses_rendering_servers
ShadeGridServerを使用するのオン/オフ。
型 :
bool
print xshade.scene().rendering.uses_rendering_servers
uses_rendering_servers_only
サーバーのみでレンダリングするのオン/オフ。
型 :
bool
print xshade.scene().rendering.uses_rendering_servers_only