File:Streetscene cube.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++
Streetscene_cube.jpg(400 × 300 pixels, file size: 26 KB, MIME type: image/jpeg)

This image was generated with the following program:

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

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

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

tex = loader.loadCubeMap('streetscene_cube_#.png')

stage.setTexGen(TextureStage.getDefault(), TexGenAttrib.MWorldPosition)
stage.setTexture(tex, 1)

box = loader.loadModel('box.egg')
box.setScale(2)
box.setPos(-1, -1, -1)
box.reparentTo(stage)

base.disableMouse()
camera.setPos(3.6, -4.3, 2.6)
camera.setHpr(40, -26, 0)

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

box.hide()
smiley = loader.loadModel('smiley')
smiley.reparentTo(stage)

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

File history

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

Date/TimeThumbnailDimensionsUserComment
current21:53, 8 October 2005Thumbnail for version as of 21:53, 8 October 2005400 × 300 (26 KB)Drwr (Talk | contribs)

The following 2 pages link to this file:

Top