maya7 파일을 panda3d 용 egg 파일로 변환 하였다.
import direct.directbase.DirectStart
from pandac.PandaModules import *
egg = loader.loadModel("jj")
egg.reparentTo(render)
egg.setScale(3.0,3.0,3.0)
egg.setPos(0,10,-7)
base.trackball.node().setPos(0, 100, 10)
#light setting
ambientLight = AmbientLight( 'ambientLight' )
ambientLight.setColor( Vec4( 0.5, 0.7, 0.1, 1 ) )
ambientLightNP = render.attachNewNode( ambientLight.upcastToPandaNode() )
render.setLight(ambientLightNP)
directionalLight = DirectionalLight( "directionalLight" )
directionalLight.setColor( Vec4( 1.0, 1.0, .5, 1 ) )
directionalLightNP = render.attachNewNode( directionalLight.upcastToPandaNode() )
# This light is facing backwards, towards the camera.
directionalLightNP.setHpr(-90, -50,50)
render.setLight(directionalLightNP)
directionalLight = DirectionalLight( "directionalLight" )
directionalLight.setColor( Vec4( 0.0, 1.0, 0.0, 1 ) )
directionalLightNP = render.attachNewNode( directionalLight.upcastToPandaNode() )
# This light is facing forwards, away from the camera.
directionalLightNP.setHpr(0, -20, 0)
render.setLight(directionalLightNP)
run()
'GamePrograming' 카테고리의 다른 글
Panda 3d 에서 한글 출력 (0) | 2007.05.03 |
---|---|
마야에서 맥스로 (1) | 2007.04.30 |
skinning이 적용된 마야 캐릭터 애니메이션을 .x파일로 Export하기 (0) | 2007.04.29 |