Rendering学習日記

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

Cgkit Python2.5 インストール

Python Cgkitを今まで、Python2.4で使っていたが、Python2.5にupdateした。

以下、インストール手順:
python-2.5.2.msi
cgkit-2.0.0alpha8.win32-py2.5.exe
PIL-1.1.6.win32-py2.5.exe
pygame-1.8.0.win32-py2.5.msi

ez_setup.pyをダウンロードしてきて
python ez_setup.pyでeasy_installをインストール

easy_install PyOpenGL
で、pyopengl-3.0.0b3-py2.5.eggがインストールされる。

やっかいなのが、Pyprotocols
PyProtocols-0.9.3.zipをダウンロード

C:\Python25\PyProtocols>Python setup.py --without-speedups install

これでインストールしないと、render.pyが動かないことがわかった。
-----------------------------
explgt = protocols.adapt(obj, ILightSource)
File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx", line 199, in _speedups.adapt
File "C:\cygwin\home\pje\PyProtocols\src/protocols/_speedups.pyx", line 188, in _speedups._adapt
TypeError: exceptions must be strings, classes, or instances, not
AdaptationFailure
---------------------
マシューさん、ありがとうございます。

>render.py -r 3delight simplescene.py
で、レンダリングしたサンプル。

out.jpg
  • -
  • -

Sitex Air購入

Core2 Quadにする。

Sitex AIRをリニューアルした。さすがに速い。
RenderMan互換レンダラーです。
http://www.sitexgraphics.com/

最近cgkitを検索するとトップに出てこない。
リンクを貼っておくことにした。

Python Computer Graphics Kit
  • -
  • -

Python Cgkitの練習

軸を設定して配置してみる。右手系です。
なかなか面白いです。
# -*- coding: utf-8 -*-
# 日本語のコメント挿入
import jiku_init

Globals( rib='Imager "background" "color background" [0.4 0.4 0.4]'
)

TargetCamera(
pos = (3,-4,3),
target = (0,0,0)
)


GLPointLight(
pos = (2.5, -1, 2),
diffuse = (1, 0.7, 0.2)
)

# ライト位置にBox
Box(
lx = 0.1,
ly = 0.1,
lz = 0.1,
pos = (2.5, -1, 2),
material = GLMaterial(diffuse=(1, 0.7, 0.2))
)

GLPointLight(
pos = (-5, 3, 0),
diffuse = (0.2, 1.0, 0.5),
intensity = 3.0
)
# ライト位置にBox
Box(
lx = 0.2,
ly = 0.2,
lz = 0.2,
pos = (-5, 3, 0),
material = GLMaterial(diffuse=(0.2, 1.0, 0.5))
)

Sphere(
name = "My Sphere",
radius = 0.2,
pos = (1.5,0,0),
material = GLMaterial(
diffuse = (1, 1, 1)
)
)


axis
  • -
  • -
<< 4/22 >>