Rendering学習日記

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

Cgkitでレンダリング

メタセコイアのサンプルメカはUVマップされているので,
OBJで出力し,cgkitで記述してみる。
オブジェクトごとに指定してあげれば大丈夫。
------------------------------------------------
load("meka.obj")
meka01 = worldObject("body01")
floor = worldObject("obj1")

mat_meka01 = GLMaterial(
diffuse = (0.9,0.9,1),
texture = GLTexture("00tex_master.BMP",
mode = GL_DECAL,
transform = mat4().scaling(vec3(1,-1,1)))
)
meka01.setMaterial(mat_meka01)

mat_floor = GLMaterial(diffuse=(0.5,0.7,0.4))
floor.setMaterial(mat_floor)
----------------------------------------------
ライトも半影になるようにしてみる。
# ...and a spot light
lgt = GLTargetSpotLight(
pos = (-500,500,300),
target = (0,0,0),
cutoff=90.0,
exponent = 4,
intensity = 1.2
)
# The following line is used by the RenderMan exporter to create a shadow
# map. The value is a tuple (map resolution, width, blur, bias, samples)
lgt.shadowmap = (512, 1.0, 0.02, 0.02, 32)

# Create a distant light (that does not cast shadows)

GLTargetDistantLight(
pos = (-5,300,40),
target = (0,0,0),
intensity = 0.4
)
----------------------------------------------------------------
レンダリング結果
続きを読む>>
  • -
  • -

Pixie2.1.1

バージョンあっぷしてますね。
以前書いた,レンダリング時の白いゴミ
消えていますね。
確実にバージョンアップしている模様。
うれしいですね。
  • -
  • -

PyProtocols

Visual Studioをインストールしたりして,大騒ぎしたPyProtocolsだけど,
Pythonには,eggというのがあるのですね。
ネットから探してきてインストールしてくれる便利ツール
ez_setup.pyがあるではありませんか。

まず,Python2.4をインストール
いろいろなモジュールをインストールする。
PyProtocolはWindows用のインストーラがないので,前回大変だった。
今回は
C:\Python24>python ez_setup.py
とやると,easy_installをインストールしてくれる。

後は,PathやPythonPathを設定して,再起動。

あらかじめ準備しておいたPyProtocols-0.9.3-py2.4-win32.eggのeggをC:\Python24においておく。

続いて,
C:\Python24\Scripts>easy_install C:\Python24\PyProtocols-0.9.3-py2.4-win32.egg

あっけなくインストール完了。

これで,CGkitが使えます。
  • -
  • -
<< 177/184 >>