Panda3D video cube example

Posted by Dennis on Jan 9, 2009 in 3D, Blender1 comment

One of the major drawbacks of the Blender game engine is that it doesn’t support video textures. There is something under development but it is still in its early stages.

[UPDATE 10-06-2009]: Blender 2.49 now supports video textures in the Game Engine!

Panda3D on the other hand has solid support for video textures. Getting it to work is really easy:

import direct.directbase.DirectStart

#load movie texture from disk
tex = loader.loadTexture("trailer.avi")
#load 3D cube model (.egg file) from disk
cube = loader.loadModel("videotexttest")
#put the cube in the scenegraph
cube.reparentTo(render)
#set the cube's position
cube.setPos(0,42,0)
#apply the texture
cube.setTexture(tex)
#rotate the cube
cube.setHpr(45,0,0)
#scale the cube
cube.setScale(2)

#run the program
run()

The cube was created with Blender and then exporter with Chicken, a blender to .egg exporter.



Tags: , ,


1 comment

» Comments RSS Feed
  1. “One of the major drawbacks of the Blender game engine is that it doesn’t support video textures.”

    In the new release (2.49) it does!

Leave a comment