Home    Features    Download    Screenshots    Manual    Reference    Forums    License    Contact   
 
  Panda3D Manual: Wooden teapot.jpg

Wooden_teapot.jpg (22KB, MIME type: image/jpeg)

This image was generated by the following program:

from direct.directbase.DirectStart import *
from pandac.PandaModules import *

base.setBackgroundColor(1, 1, 1, 1)

dl = DirectionalLight('dl')
dlnp = base.camera.attachNewNode(dl)
render.setLight(dlnp)

teapot = loader.loadModel('teapot.egg')
teapot.setTexGen(TextureStage.getDefault(), TexGenAttrib.MWorldPosition)
teapot.setTexPos(TextureStage.getDefault(), 0.44, 0.5, 0.2)
teapot.setTexScale(TextureStage.getDefault(), 0.2)
teapot.reparentTo(render)

tex = loader.load3DTexture('woodgrain_#.png')
teapot.setTexture(tex)

base.disableMouse()
camera.setPos(4.5, -6.7, 7.3)
camera.setHpr(31, -36, 0)

base.graphicsEngine.renderFrame()
base.screenshot('wooden_teapot.png', defaultFilename = 0)

File history

Legend: (cur) = this is the current file, (del) = delete this old version, (rev) = revert to this old version.
Click on date to see the file uploaded on that date.


The following pages link to this file:

Back to the Manual   
.
screenshot
Angels Fall First: the Second Antarean War
screenshot
Angels Fall First: the Second Antarean War
screenshot
Student Recreation of "Colossus"