1/1

これだけで大丈夫?「情報」におけるグラフィック1

以下、POV-Rayチュートリアルを参考にNVIDIA Gelatoでつくりました。
ありがとうございます。
これだけで大丈夫 「情報」におけるグラフィック
http://izumi-math.jp/sanae/cg/pov/pov.htm

【第1回】最初のシーンファイル
例題1 基本の3要素
立方体を作成せよ。
box_kore1.jpg

#box_kore1.pyg
Output ("box_kore01.tif", "tiff", "rgb", "camera", "float gain", 1, "float gamma",
1, "string filter", "gaussian", "float[2] filterwidth", (2, 2))
Attribute ("string projection", "perspective")
Attribute ("float fov", 10)
Attribute ("int[2] resolution", (320, 240))
#placecam 0 0 -10 0 0 0
#Rotate (-19.47, 1.00, 0.00, 0.00)
#Rotate (45.00, 0.00, 1.00, 0.00)
Translate (0.00, 0.00, 10.00)
World ()
Light ("light1", "pointlight", "float intensity", 1000, "point from", (-10, 3, -20))

PushTransform ()
Attribute ("color C", (1, 0, 0))
Shader ("surface", "plastic")
Input ("BoxGeom.rib")
PopTransform ()

Render()
  • -
  • -

これだけで大丈夫?「情報」におけるグラフィック2

例題2 図形の変換(1) 回転
例題1の立方体を回転させよ。
box_kore2.jpg
回転した表示が微妙に違います。
rotate <-30,20,0>
X軸、Y軸の順番だと思いましたが、
クォータニオン、オイラー角など
少し厳密にやらないといけないかな。
ありがとうございます。
#box_kore2.pyg
Output ("box_kore02.tif", "tiff", "rgb", "camera", "float gain", 1, "float gamma",
1, "string filter", "gaussian", "float[2] filterwidth", (2, 2))
Attribute ("string projection", "perspective")
Attribute ("float fov", 10)
Attribute ("int[2] resolution", (320, 240))
#placecam 0 0 -10 0 0 0
#Rotate (-19.47, 1.00, 0.00, 0.00)
#Rotate (45.00, 0.00, 1.00, 0.00)
Translate (0.00, 0.00, 10.00)
World ()
Light ("light1", "pointlight", "float intensity", 800, "point from", (-10, 3, -20))
Light ("light2", "pointlight", "float intensity", 350, "point from", (10, 10, -10))

PushTransform ()
Attribute ("color C", (1, 0, 0))
Shader ("surface", "plastic")
Rotate (20,0,1,0)
Rotate (-30,1,0,0)
Input ("BoxGeom.rib")
PopTransform ()

Render()
  • -
  • -

これだけで大丈夫?「情報」におけるグラフィック3

「これだけで大丈夫 「情報」におけるグラフィック」を参考にNVIDIA Gelatoでつくりました。
ありがとうございます。
http://izumi-math.jp/sanae/cg/pov/pov_2.htm

【第2回】よりリアルなシーンファイル
例題3 背景と地面
 例題2のシーンに背景と地面を入れよ。
box_kore3.jpg

#box_kore3.pyg
Output ("box_kore03.tif", "tiff", "rgb", "camera", "float gain", 1, "float gamma",
1, "string filter", "gaussian", "float[2] filterwidth", (2, 2))
Attribute ("string projection", "perspective")
Attribute ("float fov", 20)
Attribute ("int[2] resolution", (320, 240))
#placecam 0 0 -10 0 0 0

Translate (0.00, 0.00, 10.00)

Attribute ("string geometryset", "+shadows")

World ()
Light ("light1", "pointlight", "float intensity", 800, "point from", (-10, 3, -20),"string shadowname", "shadows")
Light ("light2", "pointlight", "float intensity", 300, "point from", (10, 10, -10))

PushTransform ()
Attribute ("color C", (0.2, 0.4, 0.75))
Sphere (100, -100, 100, 360)
PopTransform ()

PushTransform ()
Attribute ("color C", (1, 0, 0))
Shader ("surface", "plastic")
Rotate (20,0,1,0)
Rotate (-30,1,0,0)
Input ("BoxGeom.rib")
PopTransform ()

PushTransform ()
Translate (0.00, -1.0, 0.00)
Rotate (90.00, 1.00, 0.00, 0.00)
ShaderGroupBegin ()
Attribute ("color C", (1, 1, 1))
Shader ("surface", "checker", "checklayer","float stilesize",0.05,"float ttilesize",0.05,"color color2", ( 0.0, 1, 0.0 ))
Shader ("surface", "plastic", "plasticlayer")
ConnectShaders ("checklayer", "Cout", "plasticlayer", "C")
ConnectShaders ("checklayer", "fout", "plasticlayer", "Ks")
ShaderGroupEnd ()
Input("PlaneGeom.rib")
PopTransform ()

Render()
  • -
  • -

1/1