Panda3D Manual: Automatic Texture AnimationIt's possible to generate a model that automatically rotates through a sequence of textures when it is in the scene graph, without having to run a special task to handle this. To do this, use the egg-texture-cards -o flip.egg -fps 30 explosion*.jpg This actually creates a model with a different polygon for each frame of the texture animation. Each polygon is put in a separate node, and all the nodes are made a child of a special node called a The SequenceNode is a special node that only draws one of its children at a time, and it rotates through the list of children at a particular frame rate. You can parent the model under render and it will automatically start animating through its textures. If you need it to start at a particular frame, use something like this: flip = loader.loadModel('flip.egg') flip.find('**/+SequenceNode').node().pose(startFrame) flip.reparentTo(render) By default, all of the polygons created by egg-texture-cards -o flip.egg -fps 30 -p 240,240 explosion*.jpg There are several other parameters as well; © Carnegie Mellon University 2010 |