Home    Features    Download    Screenshots    Manual    Reference    Forums    License    Contact   
 
  Panda3D Manual: Tex gen teapot xy.png

Tex_gen_teapot_xy.png (68KB, MIME type: image/png)

Teapot with grid applied in XY axis

The following program was used to generate this image:

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

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

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

teapot = loader.loadModel('teapot.egg')
teapot.setColor(1, 1, 1, 1)
teapot.setScale(0.5)
teapot.flattenLight()

tex = loader.loadTexture('maps/color-grid.rgb')
tex.setMinfilter(Texture.FTLinearMipmapLinear)
teapot.setTexGen(TextureStage.getDefault(), TexGenAttrib.MWorldPosition)
teapot.setTexture(tex)

teapot.reparentTo(render)

base.disableMouse()
camera.setPos(1.6, -4, 2.9)
camera.setHpr(18, -28, 0)

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

teapot.setTexTransform(TextureStage.getDefault(), TransformState.makeHpr(VBase3(0, 90, 0)))
base.graphicsEngine.renderFrame()
base.screenshot('tex_gen_teapot_xz.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
Flight Simulator, created by Carnegie-Mellon students
screenshot
Student Recreation of "Colossus"
screenshot
Disney Pinball: real physics and cool settings