Ayam1.13の簡単なテキストがあった。
Go to the preferences (section "RIB-Export") and set "ShadowMaps" to "Automatic".
Create two boxes.
Open the "Transformations" property of the second box.
Translate it by X: 0.0, Y: -1.0, Z: 0.0.
Scale it by X: 4.0, Y:1.0, Z:4.0.
Create a light source.
Open the "LightAttr" property.
Change the type to "Spot". Press "Apply".
Now change the parameters of the spot light to "IsOn": Yes, "Intensity": 18.0, "UseSM": Yes, "ConeAngle": 45.0, "BeamDistrib": 3.0, "From": -2, 2, 2, "To": 1, 0, -1; leave all other parameters at their default values.
Create a new view and make it perspective (Menu: "Type/Perspective").
Export a RIB from that perspective view (Menu: "View/Export RIB").
Render the RIB with a RenderMan compliant renderer, that uses shadow maps, e.g. Photorealistic RenderMan (prman) or Aqsis.
ライトを作成してShaderでも割り当てて,二重にやってたので,うまく生成されていなかった。
Shaderは割り当てないで,そのままLightAttrでCustomからPointを選択。
パースペクティブ画面のメニューから,ShadowMapを生成すれば6つのファイルを出力してくれた。
後は,レンダリングすると,以下のようになる。
CSGのブーリアンは,Levelの中にブツをいれ,LevelAttrのTypeで選択(和差積)すればよい。
Ayamのレンダラーを3Delightに設定して,サンプルのArealight.ayを試してみたが,うまくいかない。
出力されたRIBをいじってみる。
まず,レイトレーシングを行うので,WorldBeginの前に追加。
Attribute "visibility" "transmission" [ "opaque" ]
AreaLightSourceの次の行の,
Interior "arealight" "intensity" [ 150.000000 ] "lightcolor" [ 1.000000 1.000000 1.000000 ] を行削除。
Attribute "light" "nsamples" [ 16 ]を追加しておく。
すると,こんな感じになる。
Attribute "visibility" "transmission" [ "opaque" ]
WorldBegin
#Lights!
TransformBegin
ConcatTransform [ 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 ]
AttributeBegin
Attribute "light"
Declare "intensity" "float"
Declare "lightcolor" "color"
Attribute "light" "nsamples" [ 16 ]
AreaLightSource "arealight" 0 "intensity" [ 150.000000 ] "lightcolor" [ 1.000000 1.000000 1.000000 ]
AttributeBegin
TransformBegin
Translate 0.000000 12.634600 0.249141
Scale 10.000000 1.000000 10.000000
Patch "bilinear" "P" [ -0.500000 -0.000000 -0.500000 0.500000 -0.000000 -0.500000 -0.500000 0.000000 0.500000 0.500000 0.000000 0.500000 ]
TransformEnd
AttributeEnd
AttributeEnd
Illuminate 0 1
TransformEnd
これらの設定をAyamのTag部分に記述したりと設定ができると有り難いが
うまくいかない。
またBMRTに対応している以下の行は全て削除した。
Exposure 1.000000 1.000000
Quantize "rgba" 255 0 255 0.500000
Declare "minsamples" "integer"
Option "render" "minsamples" [ 4 ]
Declare "maxsamples" "integer"
Option "render" "maxsamples" [ 64 ]
Declare "max_raylevel" "integer"
Option "render" "max_raylevel" [ 8 ]
Declare "minshadowbias" "float"
Option "render" "minshadowbias" [ 0.010000 ]
Declare "prmanspecular" "integer"
Option "render" "prmanspecular" [ 1 ]
Declare "steps" "integer"
Option "radiosity" "steps" [ 64 ]
Declare "minpatchsamples" "integer"
Option "radiosity" "minpatchsamples" [ 4 ]
Declare "texturememory" "integer"
Option "limits" "texturememory" [ 10000 ]
Declare "geommemory" "integer"
Option "limits" "geommemory" [ 40000 ]
いろいろと試行錯誤ですね。