Rendering学習日記

日々、3DCGの世界は進歩しています。勉強して理解したことをまとめていきます。RenderMan互換レンダラーやグローバル・イルミネーション。いろんなことに好奇心を持って、面白くなる。目指せShader書き!!
ありがとうございます。

メタセコイアからRIB出力 ライト設定

メタセコイアからRenderManのRIB形式へ、metasequoia pythonを使って出力検証。
今回は、直線を引っ張り、distantlightライトの位置として出力するようにpythonスクリプトを書き換えた。ライト位置、RIBではZ位置に-1をかけて出力している。
後、オブジェクト名に"no_"がついたら頂点法線は計算しないようにしてみた。実験君です。
今後は、オブジェクト名にspotlightと入れたら、スポットライトを出すように追加できるように工夫していきたいところです。
ありがとうございます。
out_scene2.jpg
##Renderman RIB-Structure 1.0

MakeTexture "00tex_master.tif" "00tex_master.tdl" "periodic" "periodic" "gaussian" 1 1


Display "out_scene2.tif" "file" "rgba"
Format 640 480 1
PixelSamples 4 4
PixelFilter "catmull-rom" 3 3
ShadingRate 1

Imager "background" "background" [0.2 0.4 0.6]

Sides 1
Orientation "rh"
Projection "perspective" "fov" [15.7411862756]
ConcatTransform [
0.989678789967 -0.0703824392657 -0.124828702357 0
0 0.87107923842 -0.49114250518 0
-0.143303498523 -0.486073320228 -0.862088646645 0
120.757968634 -292.714072303 3702.46738861 1
]
Scale 1 1 -1
WorldBegin
Attribute "visibility" "trace" [1]
Attribute "visibility" "transmission" ["Os"]
Attribute "visibility" "transmission" "opaque"
Attribute "light" "shadows" "on"
LightSource "distantlight" 1
"from" [714.900024414 688.590026855 -50.0]
"to" [0.0 286.878967285 -0.0]
"lightcolor" [0.800 0.800 0.800]
LightSource "ambientlight" 2
"lightcolor" [0.300 0.300 0.300]
Color 1.0 1.0 1.0
Surface "supertexmap" "string Csmapname" "00tex_master.tdl"
AttributeBegin
Scale 1 1 -1
Declare "st" "facevarying float[2]"
Attribute "identifier" "name" ["no_obj1"]
PointsPolygons
[ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 以下省略・・・・
  • -
  • -

金属質感

shinyシェーダ設定
3Delightでレンダリング。
モデルは、メタセコイアからmetasequoia pythonスクリプトを実行
RIB出力したものを調整。
BMRTのfakeskyシェーダも利用。周囲は大きな球体にfakeskyを割り当てる。
計算処理速度をあげる工夫を実験ですね。
ありがとうございます。
scene_fakesky.jpg
  • -
  • -

Indirectlight

3Delightのindirectlightを追加できるようにした。
メタセコイアのオブジェクトパネルにidirectlightとぶつを追加して、
metasequoia python スクリプトでRIB出力
以下はライト部分RIB抜粋、結構レンダリング時間かかります。
Attribute "visibility" "trace" [1]
Attribute "visibility" "transmission" ["Os"]
Attribute "visibility" "transmission" "opaque"
Attribute "light" "shadows" "on"
TransformBegin
Translate 3.0 300.0 -3.0
LightSource "maya_pointlight" 1
"lightcolor" [0.800 0.800 0.800]
"string shadowmapname" "raytrace"
"float intensity" 50000

TransformEnd
LightSource "spotlight" 2
"from" [-64.2728729248 115.28918457 96.3978881836]
"to" [-0.649001300335 10.0252351761 -12.1598510742]
"lightcolor" [0.800 0.100 0.100]
"string shadowmap" "raytrace"
"float intensity" 80000
"float coneangle" 0.52
"float conedeltaangle" 0.52

LightSource "maya_spotlight" 3
"from" [127.575531006 153.345001221 -69.9409103394]
"to" [42.3550758362 20.9788990021 -12.4399051666]
"lightcolor" [0.100 0.100 0.800]
"string shadowmapname" "raytrace"
"float intensity" 1.0
"float coneangle" 0.8
"float penumbraangle" 0.15

TransformBegin
Translate 0 10 0
LightSource "indirectlight" "ambientLightShape1"
"uniform float intensity" [ 1 ]
"uniform float finalgather" [ 1 ]
"uniform float samples" [ 256 ]
"uniform float maxdist" [ 0.99999997e36 ]
"uniform float __nonspecular" [ 1 ]
TransformEnd


楽しいですね。
scene06.jpg
  • -
  • -
<< 37/40 >>