1/3 >>

cgkit

Python¤Ç³Ø¤ÖRenderMan Interface

ÍÑ°Õ¤¹¤ë¤â¤Î¡£
¢£Python-2.3.5.exe
¢£PIL-1.1.5.win32-py2.3.exe
¢£PyProtocols-0.9.3.win32-py2.3.exe
¢£cgkit-2.0.0alpha5.win32-py2.3.exe
¢£pygame-1.6.2.win32-py2.3.exe
¢£Aqsis
¢£3delight-4.5.0-setup.exe

¥¤¥ó¥¹¥È¡¼¥ë¤ÏÂбþ¤¹¤ëPython2.3.5±Ñ¸ìÈǤò»È¤¦¡£

¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤«¤é
>viewer.py helloworld.py

OpenGL¤Çµ¯Æ°¡£Maya¤ÈƱ¤¸¤è¤¦¤ËAlt¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¡¤¥«¥á¥é²óž¤¬¤Ç¤­¤ë¡£

>>> from cgkit import *
¤Ç¤Ï¤Ê¤¯¤Æ¡¤
>>> from cgkit.all import *
¤ò»È¤Ã¤Æ¤¤¤ë¡£

http://cgkit.sourceforge.net/
  • -
  • -

cgkit2¤Î¥¤¥ó¥¹¥È¡¼¥ë¡£python24¤ò»È¤Ã¤¿¡£

-------------------------------------------------------------
http://peak.telecommunity.com/PyProtocols.html¤«¤é PyProtocols-0.9.3.zip¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Æ¤­¤Þ¤¹¡£(Python2.4ÍѤΥХ¤¥Ê¥ê¤Ï̵¤¤)

¤½¤ì¤òŸ³«¤·¤Æ¡¢

python setup.py install

python setup.py test

ÌäÂê¤Ê¤¤¤è¤¦¤Ê¤éOK¡£
------------------------------------------------------------

¿·¤¿¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤·¤¿¡£
Visual Studio 2003(version7.1)¤¬Æþ¤Ã¤Æ¤¤¤Ê¤¤¤ÈPyProtocol¤Ï¥³¥ó¥Ñ¥¤¥ë¤¬¤Ç¤­¤Ê¤¤¤è¤¦¤Ç¤¹¤Í¡£
¥Þ¥·¥ó¤ËPython22jp¤äPython23¤¬Æþ¤Ã¤Æ¤¤¤¿¤Î¤Ç,ºÇ½é¥Ñ¥¹¤¬¤¦¤Þ¤¯¤È¤ª¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£
>c:\python24\python setup.py install
¤Ç¤¦¤Þ¤¯¤¤¤­¤Þ¤·¤¿¡£

¤¢¤È¡¤pygame-1.7.1release.win32-py2.4.exe
PIL-1.1.5.win32-py2.4.exe
¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤é¡¤OpenGLɽ¼¨¤È¸ß´¹¥ì¥ó¥À¥é¡¼¤Ç¥ì¥ó¥À¥ê¥ó¥°¤Ç¤­¤Þ¤·¤¿¡£
Ambient Occlusion¤Èbake¤¬µ¤¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¤³¤ì¤«¤éÊÙ¶¯¤·¤è¤¦¤È»×¤¤¤Þ¤¹¡£
¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
  • -
  • -

cgkit2¤Î¥¤¥ó¥¹¥È¡¼¥ë(¤½¤Î2)

»Å»ö¾ì¤ÇCgkit2¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤è¤¦¤È¤·¤¿¡£
·ë¶É¤Ç¤­¤º¡£
¼«Âð¤ÏVisual C++ .Net Standard 2003¤ÈMSDN Library for Visual Studio .Net 2003¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤«¤é,¤¦¤Þ¤¯¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤¿ÌÏÍÍ¡£

¤¦¡¼¤ó¡¤±Ñ¸ìÈǤÈÆüËܸìÈǤǤϤÁ¤¬¤¦¤Î¤«¡£

Windows¤ÇFree¤ÊC¥â¥¸¥å¡¼¥ë¥Ó¥ë¥É´Ä¶­
http://www.freia.jp/taka/memo/freevcbuild

Python 2.4 Extensions w/ the MS Toolkit Compiler
http://www.vrplumber.com/programming/mstoolkit/

̵ÎÁ¤Ç¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ó¤È¤«¤·¤¿¤¤¤â¤Î¤Ç¤¹¤è¡£
  • -
  • -

Cgkit2.0alpha7¥¤¥ó¥¹¥È¡¼¥ë

Visual Studio .NET2003¤ÈMSDN Library(ºÇ¾®)¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¡¤
Python2.4¤Ï¥¤¥ó¥¹¥È¡¼¥ë¸å
¥·¥¹¥Æ¥à´Ä¶­ÊÑ¿ô¤ÎPath¤ò¤­¤Á¤ó¤È»ØÄꤷ¤¿¡£
C:\Python24;C:\Python24\Scripts;
ºÆµ¯Æ°¤·¤¿¤é¡¤

>viewer.py demo1.py

OpenGLɽ¼¨¤·¤¿¡£
  • -
  • -

Cgkit2.0alpha5¥¤¥ó¥¹¥È¡¼¥ë

´û¤Ëalpha5¤Ï¼ê¤ËÆþ¤é¤Ê¤¤¤¬,¤Þ¤È¤á¤Æ¤ß¤¿¡£

¢£¢£Cgkit¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ë¤Ä¤¤¤Æ¢£¢£

­¡Python-2.3.5.exe¤ò¥¤¥ó¥¹¥È¡¼¥ë
­¢PyProtocols-0.9.3.win32-py2.3.exe
­£PIL-1.1.5.win32-py2.3.exe
­¤pygame-1.6.win32-py2.3.exe
­¥cgkit-2.0.0alpha5.win32-py2.3.exe
­¦Pixie-1.7.6-Setup.exe

­§Sample¤òC:\Python23¤Ë¥³¥Ô¡¼¤¹¤ë¡£

­¨¥Þ¥¤¥³¥ó¥Ô¥å¡¼¥¿¤ò±¦¥¯¥ê¥Ã¥¯¤·¡¢
¡Ö¥×¥í¥Ñ¥Æ¥£¡×¢ª¡Ö¾ÜºÙÀßÄê¡×
¢ª¡Ö´Ä¶­ÊÑ¿ô¡×¢ª¡Ö¥·¥¹¥Æ¥à´Ä¶­ÊÑ¿ô¡×¤ÎPath¤ò¥¯¥ê¥Ã¥¯
¡ÖÊÔ½¸¡×¤ò²¡¤·¤Æ¡ÖÊÑ¿ôÃ͡פ˼¡¤Îʸ¤òÄɲ乤롣

;C:\Python23;C:\Python23\Scripts


¢£¢£
­©¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤Ç
Open GLɽ¼¨¤µ¤ì¤¿¤éÀ®¸ù!!

>Viewer.py helloworld.py


­ªRenderingɽ¼¨
RenderMan Renderer "Pixie"¤ò»È¤Ã¤Æ¤¤¤ë¡£

>Render.py -r pixie helloworld.py

--------------------------------------
cgkit-2.0.0alpha6.win32-py2.3.exe¤¬¥À¥¦¥ó¥í¡¼¥É¤Ç¤­¤ë¤±¤É¡¤Render.py¤Ç¥¨¥é¡¼¤¬½Ð¤Æ¤·¤Þ¤¦¡£¤¦¤Þ¤¯¥ì¥ó¥À¥ê¥ó¥°¤Ç¤­¤Ê¤¤¡£
¤è¤Ã¤Æ¥Ð¡¼¥¸¥ç¥ó¥À¥¦¥ó¤·¤¿¡£

Python2.4¤Ç¤ÎCgkit2.0alpha7¤ÏÌÌÇò¤¤¡£
grow.py¤Ç¤ÎÎý½¬¡£RiCurves()¤Î½ñ¤­Êý¤òÊÙ¶¯¤·¤Ê¤¤¤È¡£
Àè¶î¼Ô¤ÎÏÀʸ¤¬Æɤá¤ë¤è¤¦¤Ë´·¤ì¤Ê¤¤¤È¡¦¡¦¡¦²ÝÂê¤Ï¤¿¤¯¤µ¤ó¡£
  • -
  • -

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¤¬»È¤¨¤Þ¤¹¡£
  • -
  • -

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
  • -
  • -

cgkit-2.0.0alpha9.win32-py2.5.exe

cgkit¤¬¥¢¥Ã¥×¥Ç¡¼¥È¤·¤¿¡£
¤Þ¤¹¤Þ¤¹RenderMan¸ß´¹¥ì¥ó¥À¥é¡¼¤ÇÊØÍø¤Ë»È¤¨¤ë¡£

Python2.5¤Ç¤Îcgkit¤Î¥¤¥ó¥¹¥È¡¼¥ëÃí°ÕÅÀ¤ò¤Þ¤È¤á¤Æ¤ª¤¯¡£

¢£É¬Íפʥե¡¥¤¥ë¡¡
python-2.5.4.msi
PyOpenGL-3.0.1a2.win32.exe
PyODE-1.2.0.win32-py2.5.exe
pygame-1.8.1release.win32-py2.5.msi
PIL-1.1.6.win32-py2.5.exe
cgkit-2.0.0alpha9.win32-py2.5.exe
PyProtocols-0.9.3.zip
(msvcp71.dll)

¢£¥Þ¥¤ ¥³¥ó¥Ô¥å¡¼¥¿¤ò±¦¥¯¥ê¥Ã¥¯
¾ÜºÙÀßÄꢪ´Ä¶­ÊÑ¿ô¢ª¥·¥¹¥Æ¥à´Ä¶­ÊÑ¿ô¤ÎPATH¤òõ¤·¤Æ¡¢¡ÖÊÔ½¸¡×¤ò¥¯¥ê¥Ã¥¯¡£¤³¤³¤ÇÊÑ¿ôÃͤ¬ÁªÂò¾õÂ֤ˤʤäƤ¤¤ë¤¬¡¢¥Þ¥¦¥¹¤Ç¥¯¥ê¥Ã¥¯¤·¤ÆÁªÂò²ò½ü¡¢Â¾¤ÎÀßÄê¤ò¾Ã¤µ¤Ê¤¤¤è¤¦¤Ë¡¢ÊÑ¿ôÃͤκǸå¤ÎÉôʬ¤Ë¼¡¤Î¥Ñ¥¹¤òÄɲ乤롣

;C:\Python25;C:\Python25\Scripts

¢£¥Þ¥·¥ó¤òºÆµ¯Æ°¡£

°Ê¾å¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤é¡¢
PyProtocols-0.9.3.zip¤òC:\Python25¤Ë²òÅह¤ë¡£

¢£¥³¥Þ¥ó¥É¥×¥í¥ó¥×¥È¤«¤é
C:\Python25\PyProtocols-0.9.3>python setup.py --without-speedups install

³¤¤¤Æ¡¢¥µ¥ó¥×¥ë¤òÆ°¤«¤·¤Æ¤ß¤ë¡£
C:\Python25>viewer.py demo1.py
Traceback (most recent call last):
File "C:\Python25\Scripts\viewer.py", line 63, in
from cgkit.all import *
File "C:\Python25\Lib\site-packages\cgkit\all\__init__.py", line 46, in
from cgkit import _core
ImportError: DLL load failed: »ØÄꤵ¤ì¤¿¥â¥¸¥å¡¼¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£

¾åµ­¤Î¥¨¥é¡¼¤¬½Ð¤ë¾ì¹ç¤ÏMicrosoft C++ Runtime Library¤¬¤Ê¤¤¡£

msvcp71.dll¤òõ¤·¤Æ¤­¤Æ¡¢Python25¥Õ¥©¥ë¥À¤ËÆþ¤ì¤Æ¤ª¤¯¤Ècgkit¤ÏÆ°¤­¤Þ¤¹¡£
  • -
  • -

No module named pygame

XP¥Þ¥·¥ó¤Çµ×¡¹¡¢python cgkit¤ò»È¤ª¤¦¤È¤·¤¿¤é¡¢
²¼µ­¤Î¥¨¥é¡¼
Traceback (most recent call last):
File "C:\Python25\Scripts\viewer.py", line 56, in ?
import pygame
ImportError: No module named pygame

pygame¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤·¡¢¤ª¤«¤·¤¤¡£
ºÇ¿·ÈǤòÆþ¤ì¤Ê¤ª¤·¤Æ¤â¡¢Æ±¤¸¡£
ºÇ¶á¤Ï¡¢¥á¥¿¥»¥³¥¤¥¢python¤òÍøÍѤ·¤Æ¤¤¤ë¡£¿·¤¿¤Ë
python223jp-20030608.exe¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤¿¡£cgkit¤¬Æ°¤¤¤Æ¤¤¤ëÊ̤Υޥ·¥ó¤Ë¡¢¤³¤ÎPython2.2.3ÆüËܸì´Ä¶­¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤é¡¢¾åµ­¤Î¥¨¥é¡¼¤¬½Ð¤¿¡£ÆÃÊ̤ʥ⥸¥å¡¼¥ë¤òÍøÍѤ·¤Ê¤¤¤Ê¤é¤Ð¡¢2.2.3¤Ï¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤âÎɤ¤¤«¡£
¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¤È¤³¤í¡¢º£Å٤ϡ¢viewer.py¤¬python2.5.4¤Çǧ¼±¤»¤º¡¢python2.5.4¤Ècgkit¤ò¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤·¤ÆºÆ¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿¡£
¤Á¤ç¤Ã¤È¡¢ÌÌÅݤʤ³¤È¤Ë¤Ê¤ê¤Þ¤·¤¿¤¬¡¢cgkitÆ°¤¤¤Æ¤¤¤Þ¤¹¡£

Windows Vista¤Ç¤Ï¤É¤¦¤À¤Ã¤¿¤«¡¢³Îǧ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
Vista 64bit¤Ç¤Ï¡¢Î¾Êý¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤âÆ°¤­¤Þ¤·¤¿¡£
¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£

¤¦¡¼¤ó¡¢¡¦¡¦¡¦Windows7 64bit¤Ç¤Ï¡¢Ê»ÍѤǤ­¤Ê¤¤¤è¤¦¤Ç¤¹¡£¡¦¡¦¡¦?
  • -
  • -

Mac OS X 10.6.6(Snow Leopard)¤Ëcgkit¥¤¥ó¥¹¥È¡¼¥ë

Mac OS X¤ËÆþ¤Ã¤Æ¤¤¤ëPython¤Ï¡¢
Leopard ¢ª 2.5.1¡¢
Snow Leopard ¢ª 2.5.5¡¢2.6.1¡¢
Lion ¢ª 2.5.5¡¢2.6.6¡¢2.7.1 ¤¬ºÇ½é¤«¤é¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

cgkit¤ò¥À¥¦¥ó¥í¡¼¥É¤·¥¤¥ó¥¹¥È¡¼¥ëÀßÄꤷ¤Æ¤ß¤Þ¤·¤¿¡£»²¹Í¤Ë¤·¤¿¤Î¤Ï²¼µ­¤Î¥µ¥¤¥È¤Ç¤¹¡£
¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
Python cgkit 2.o on (Snow) Leopard
http://sites.google.com/site/lefranckcom/home/pythoncgkit2oonsnowleopard

¢£http://www.macports.org/install.php¤«¤éMacPorts-2.0.3.pkg¤ò¥À¥¦¥ó¥í¡¼¥É
¤·¡¢¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£

¢£¥¿¡¼¥ß¥Ê¥ë¤ò³«¤­¡¢
$ sudo port install python26 scons boost +python26

¤ÈÆþÎϤ·¤Þ¤¹¡£´ÉÍý¼Ô¥Ñ¥¹¥ï¡¼¥É¤òÆþ¤ì¤ë¤È¥À¥¦¥ó¥í¡¼¥É¤¬¤Ï¤¸¤Þ¤ê¤Þ¤¹¡£
boost_python library¤Ê¤É¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¥¤¥ó¥¹¥È¡¼¥ë¤¬¤Ï¤¸¤Þ¤ê¤Þ¤¹¡£¤È¤Æ¤âŤ¯¡¢¤·¤Ð¤é¤¯»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£python27¤â¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤·¤¿¡£

cgkit¤ò»È¤¦¤¿¤á¤Ë¤Ï¡¢¿·¤¿¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿python2.6¤ò»È¤Ã¤Æ¤¤¤­¤Þ¤¹¡£¥µ¥Ý¡¼¥È¥é¥¤¥Ö¥é¥ê¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤¿¤á¤Ç¤¹¡£°Ê²¼PATH¤ÎÀßÄê¤ò½ñ¤­´¹¤¨¤Þ¤¹¡£

$ cd ~
¤Ç¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ë¹Ô¤­¡¢ls -a¤Ç.bash_profile¤¬¤¢¤ë¤«³Îǧ¤·¤Þ¤¹¡£

$ nano .bash_profile
¤Çnano¥¨¥Ç¥£¥¿¤ò³«¤­
#PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"

PATH=/opt/local/bin/python2.6:$PATH
export PATH

¤³¤ì¤ò¤Ê¤ë¤Ù¤¯¾å¤Î¹Ô¤Ë½ñ¤­²Ã¤¨¤Þ¤¹¡£Êݸ¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£
PATH¤òÈ¿±Ç¤µ¤»¤ë¤¿¤á¤Ë
$ source .bash_profile

$ echo $PATH
¤Ç½ñ¤­²Ã¤¨¤¿PATH¤¬Æþ¤Ã¤Æ¤¤¤ë¤«³Îǧ¤·¤Þ¤¹¡£

$ python2.6
¤ÈÂǤĤȥӥë¥É¤·¤¿ÆüÉÕ¤¬½Ð¤Þ¤¹¡£
$ which python2.6
/opt/local/bin/python2.6

¢£Compiling the support library
cgkit¤òÆþ¼ê¤·¤Þ¤¹¡£
http://sourceforge.net/projects/cgkit/files/cgkit/
cgkit-2.0.0alpha9.tar.gz¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Þ¤¹¡£
cgkit-2.0.0alpha9-py2.5-macosx10.4.dmg¤Ï»È¤¨¤Þ¤»¤ó¡£

cgkit-2.0.0alpha9.tar.gz¤ò²òÅष¤Þ¤¹¡£

$ cd cgkit-2.0.0alpha9/
$ cd supportlib/
$ cd src/
$ nano polyhedrongeom.cpp

line 401¹ÔÌÜ,
typedef GLvoid (CALLBACK *TessCallback)(...);

°Ê²¼¤Î¤è¤¦¤Ë½ñ¤­´¹¤¨¤ÆÊݸ¤·¤Þ¤¹¡£
typedef GLvoid (CALLBACK *TessCallback)();

$ cd ..
°ì¤Ä¾å¤Ë¾å¤¬¤ê¡¢
$ nano SConstruct

SConstruct ¤ò³«¤­line 38¹ÔÌÜ:
env.Append(CCFLAGS = ["-arch", "i386", "-arch", "ppc"])
¤ò
env.Append(CCFLAGS = ["-arch", "x86_64"])
¤Ë½ñ¤­´¹¤¨¤Þ¤¹¡£64¥Ó¥Ã¥È¤Ç¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£

$ scons
¤ÈÆþÎϤ¹¤ë¤È¥µ¥Ý¡¼¥È¥é¥¤¥Ö¥é¥ê¤Î¥³¥ó¥Ñ¥¤¥ë¤¬¤Ï¤¸¤Þ¤ê¤Þ¤¹¡£

$ cd ..
°ì¤Ä¾å¤Ë¾å¤¬¤ê¡¢
$ cp config_template.cfg config.cfg
¥³¥Ô¡¼¤ò¤Ä¤¯¤ê¤Þ¤¹¡£
config.cfg¤ò³«¤­

46¹ÔÌÜ:
BOOST_LIB = "boost_python"
¤Î¥³¥á¥ó¥È#¤ò¾Ã¤·¤Þ¤¹¡£

118, 119¹ÔÌܤò¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£
INC_DIRS += ["/opt/local/include"]
LIB_DIRS += ["/opt/local/lib"]

°Ê¾å¤òÊѹ¹Êݸ¤·¤Þ¤¹¡£¼¡¤Ë¥Ó¥ë¥É¤·¤Þ¤¹¡£

$ python2.6 setup.py build

³¤¤¤Æ
$ sudo python2.6 setup.py install

°Ê¾å¤Çcgkit¤Ç¤­¤¢¤¬¤ê¤Ç¤¹¡£
¥Á¥§¥Ã¥¯¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
$ cd utilities/
$ python2.6 checkenv.py
-------------------------------------------------------------------
Python 2.6.7 (r267:88850, Jan 13 2012, 17:06:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Platform: darwin
-------------------------------------------------------------------
Python version: 2.6........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0alpha9 (Jan 24 2012, 00:13)
cgkit (C++ lib)............... OK
cgkit (all)................... OK

cgkit¤ÇOK¤¬½Ð¤Æ¤¤¤ì¤ÐÀ®¸ù¤Ç¤¹¡£
¤È¤³¤í¤Ç¡¢¾åµ­¤ÎPyProtocols...PyOpenGL...PIL..pygame...PyODE..PySerial..¤Ïmissing¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤¹¡£¤Þ¤À´°Á´¤Ëcgkit¤ÏÆ°¤¤¤Æ¤¯¤ì¤Þ¤»¤ó¡£¸å¤Û¤ÉMacPorts¤ò»È¤Ã¤ÆPyProtocols°Ê³°¤Ï¡¢¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

³¤¤¤ÆÊ£¿ô¤Îpython¤¬Æþ¤Ã¤Æ¤¤¤ë¤è¤¦¤ËÀßÄê¤òÊѤ¨¤Þ¤¹¡£
¸½ºßÀÚ¤êÂؤ¨¤é¤ì¤ëpython¤ò³Îǧ¤¹¤ë¤¿¤á¤Ë
$ port select --list python

¤È¤¹¤ë¤È¡¢
Available versions for python:
none
python25-apple
python26
python26-apple
python27

Ê£¿ô¤Îpython¤¬¤Ç¤Æ¤­¤Þ¤¹¡£¸½ºßactive¤Ê¤Î¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥Ð¡¼¥¸¥ç¥ó¤òÀÚ¤êÂؤ¨¤ë¤Ë¤Ï¡¢
$ sudo port select --set python python26

¤ÇÀÚ¤êÂؤï¤ê¤Þ¤¹¡£
Available versions for python:
none
python25-apple
python26 (active)
python26-apple
python27


PIL¤Ï¤¤¤¯¤Ä¤«¤Î¥é¥¤¥Ö¥é¥ê¤Ë°Í¸¤·¤Æ¤¤¤Þ¤¹¡£Python Imaging Library¥¤¥ó¥¹¥È¡¼¥ë
$ port search py26-pil
$ port deps py26-pil
$ sudo port install py26-pil

PyOpenGL¥¤¥ó¥¹¥È¡¼¥ë
$ port deps py26-opengl
$ sudo port install py26-opengl

PyODE¥¤¥ó¥¹¥È¡¼¥ë
$ port search py26-ode
$ port deps py26-ode
$ sudo port install py26-ode

pygame¥¤¥ó¥¹¥È¡¼¥ë
$ port search py26-game
$ port deps py26-game
$ sudo port install py26-game

PySerial¥¤¥ó¥¹¥È¡¼¥ë
$ port search py26-serial
$ port deps py26-serial
$ sudo port install py26-serial

PyProtocols¥¤¥ó¥¹¥È¡¼¥ë
PyProtocols-0.9.3¤ò¥À¥¦¥ó¥í¡¼¥É
http://peak.telecommunity.com/
PyProtocols-0.9.3¥Õ¥©¥ë¥À¤Ë°ÜÆ°¤·¡¢
$ python2.6 setup.py --without-speedups install

RenderMan¥ì¥ó¥À¥é
3delight-10.0.4-Darwin-Universal.pkg¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¡¢
cgkit¥µ¥¤¥È¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤«¤é
demo1.py
demo2.py
demo3.py
¤òÊݸ¤·¤Þ¤¹¡£

¥µ¥ó¥×¥ë¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¾ì½ê¤Ç
$ viewer.py demo1.py
¤ÇÆ°ºî¤¹¤ë¤«³Î¤«¤á¤Þ¤¹¡£
¤µ¤é¤Ë
$ render.py -r3delight demo1.py
Exporting main.rib...
1 passes...
Compiling shaders...
Preprocessing time: 0s
Rendering "out.tif" (frame 0)...
3DL ERROR: Two different displays can't write to the same file (will keep 'file' and ignore 'framebuffer')
Rendering time: 0s

$ $ i-display out.tif
out.jpg
  • -
  • -

1/3 >>