1/1

面法線と頂点法線 その5

出力したRIBの調整。
場合によっては、コンバータで出力した面が裏向きなっていて、いくらライトのintensityをあげても明るくならなかったり、plasticなどのシェーダを入れておかないといけませんが、記述していないと明るくなりません。裏向きの場合、Scale 1 1 -1とWorldBeginの前に記入してみて実験してみるとわかります。

以下は、メタセコイアから出力した面。plasticシェーダを割り当てているので、ライトが強いとハイライトができます。

##RenderMan RIB-Structure 1.0
version 3.03
Format 512 300 1
PixelSamples 3 3
ShadingRate 1
Display "test_men2.tif" "file" "rgb"
Projection "perspective" "fov" 5.963
ConcatTransform [
0.423401210556 -0.592993260602 -0.684901750458 0
0 0.756010361246 -0.654559648686 0
-0.905942280115 -0.277141347635 -0.320095702145 0
-4.13227435274e-005 5.57033550876e-005 1499.99997798 1
]

WorldBegin
LightSource "ambientlight" 0 "intensity" [ 0.8 ] "lightcolor" [ 1 1 1 ]
LightSource "distantlight" 1 "intensity" [ 3 ] "lightcolor" [ 1 1 1 ] "from" [ -1 1 -1 ] "to" [ 0 0 0 ]
LightSource "distantlight" 2 "intensity" [ 0.8 ] "lightcolor" [ 1 1 1 ] "from" [ 1 1 2.5 ] "to" [ 0 0 0 ]

AttributeBegin
Attribute "identifier" "name" ["obj1"]
Color [1 0 0]
Surface "plastic"
PointsPolygons [ 3 3 3 3 ] [ 0 1 2 0 2 3 4 5 0 4 0 3 ]
"P" [
50 20 0
50 0 -100
-50 0 -100
-50 20 -0
-50 0 100
50 0 100
]
"N" [ 0 1 0
0 0.980581 -0.196116
0 0.980581 -0.196116
0 1 0
0 0.980581 0.196116
0 0.980581 0.196116 ] "st" [ 1 0 1 1 0 1 1 0 0 1 0 0 ]

AttributeEnd

WorldEnd

test_men2.jpg
  • -
  • -

面法線と頂点法線 その6

metared(mqo2rib)で変換したものを調整した。頂点法線が多いので削除。
勉強します。
3Delightでレンダリングした。

モデルデータ

##Renderman RIB-Structure 1.0
## filename: men_mdl.rib
##------------ obj1 ------------##
AttributeBegin
Declare "st" "facevarying float[2]"
### MaterialName: Default
Color [1 0 0]
Surface "plastic"
PointsPolygons
[3 3 3 3]
[0 1 2 0 2 3 4 5 2 4 2 1]
"P" [50.000000 0.000000 100.000000
50.000000 20.000000 0.000000
-50.000000 20.000000 0.000000
-50.000000 0.000000 100.000000
50.000000 0.000000 -100.000000
-50.000000 0.000000 -100.000000]
"N" [0.000000 0.980581 0.196116
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.980581 0.196116
0.000000 0.980581 -0.196116
0.000000 0.980581 -0.196116]
"st" [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
AttributeEnd
##------------ obj1 ------------##


ライトをとても明るくした。

##Renderman RIB-Structure 1.0
Display "men.tif" "file" "rgba"
Display "+men.tif" "framebuffer" "rgba"

Format 640 480 1
PixelSamples 4 4
PixelFilter "catmull-rom" 3 3
ShadingRate 1

Imager "background" "background" [0.500 0.500 0.600]

Sides 1
Orientation "lh"
Projection "perspective" "fov" [9.52728338145235]
Rotate -40.8862682605356 1 0 0 # pich
Rotate 52.9183819582828 0 1 0 # head
Translate -90.469199 -98.183947 68.375702
Scale 0.1 0.1 0.1
WorldBegin
Attribute "visibility" "trace" [1]
Attribute "visibility" "transmission" ["Os"]
Attribute "visibility" "transmission" "opaque"
Attribute "light" "shadows" "on"
Attribute "trace" "displacements" [1]
LightSource "ambientlight" 0 "intensity" [ 0.1 ] "lightcolor" [ 1 1 1 ]
LightSource "distantlight" 1 "intensity" [ 100 ] "lightcolor" [ 1 1 1 ] "from" [ -1 1 -1 ] "to" [ 0 0 0 ]
LightSource "distantlight" 2 "intensity" [ 3 ] "lightcolor" [ 1 1 1 ] "from" [ 1 1 2.5 ] "to" [ 0 0 0 ]
ReadArchive "men_mdl.rib"
WorldEnd


men.jpg
  • -
  • -

1/1