1/1

obj読み込み

本来ならば、コンバータをつくればよいのだろうが、
ここはcgkitを使ってobjをribに変換した。
cgkitでは、
>render.py -rレンダラ hogehoge.obj
とやると、指定のレンダラでレンダリング、geomフォルダができて
その中に、ribが生成される。これをgelatoに読み込んでみた。

このobjでは法線ベクトルがないので、カクカクしている。
chawan.jpg

#cha0.pyg
Output ("cha01.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", (640, 480))
#placecam 10 5 -10 0 0 0
Rotate (-19.47, 1.00, 0.00, 0.00)
Rotate (45.00, 0.00, 1.00, 0.00)
Translate (-10.00, -5.00, 10.00)

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

World ()
Light ("light1", "pointlight", "float intensity", 350, "point from", (-10, 10, -10),"string shadowname", "shadows")
Light ("light2", "pointlight", "float intensity", 350, "point from", (10, 10, -10),"string shadowname", "shadows")

PushTransform ()
Attribute ("color C", (1, 1, 0.9))
Shader ("surface", "veinedmarble")
Scale (20,20,20)
Translate ( 0, 0, 0)
Input ("chawan.rib")
PopTransform ()

Attribute ("color C", (1, 1, 1))
Shader ("surface", "plastic")
Rotate (90.00, 1.00, 0.00, 0.00)
Input("PlaneGeom.rib")
Render()
  • -
  • -

1/1