File:Wooden teapot.jpg

Don't mind the mess!

We're currently in the process of migrating the Panda3D Manual to a new service. This is a temporary layout in the meantime.

Top
Python C++
Wooden_teapot.jpg(400 × 300 pixels, file size: 22 KB, 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

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:39, 8 October 2005Thumbnail for version as of 11:39, 8 October 2005400 × 300 (22 KB)Drwr (Talk | contribs)

The following page links to this file:

Top