Loading model problem

Hello everyone.

My assignment is 3D Fighting game.
So my characters must have a lot of animations in each other.

If I loads animations with Actor class and follows “Roaming Ralph” 's sample, then it taking so long when loading.
(I thinks it might load a new model in every animation I have played.)
for example>>

  • self.ralph.loop(‘run’)
  • self.ralph.loop(‘stand’)
  • self.ralph.loop(‘turn’)
    It loads a model for three times.

Load 10 animations will load models 10 times…

I thinks I will export all animations to one “.egg” file.
Is it possible to contacts a frame of an animation.
for example>>

  • ‘run’ >> loop frame 0 - 50
  • ‘stand’ >> loop frame 60- 100
    This idea will loads only one model per many animations.

Is it has a code to contact any frame of an actor’s animation?
please show me some code, please.
thank you. :frowning:

Each animation usually has a different .egg file, which needs to be loaded of course.
To prevent long loading times, try using the egg2bam tool to convert your .egg files to .bam files, and load the .bam files in your code instead. They load MUCH faster (talking about seconds instead of minutes here!)

Thank you Pro-rsoft!
they load very faster! :astonished:

And one more question,please.

Is it possible to ignore lighting for some models.
for example>>
I creates a point-light that affect to all models in the scence except box.egg.

Thank you. :wink:

Yes, use the method setLightOff on the model.
Like this:


The lighting will now not affect the box.

Thank you very much!

I get it. :astonished:

When I have loaded an animation to the scence, the frame-rate is down…

For example>>
boy >> fps = 59.9
boy + girl >> fps = 50.5
boy + girl + dog >> fps = 47.5

How can I fix it?
any i dea?

And can I set the frame-rate of an application?
Thank you :open_mouth:

Read this option :

Perhaps you can set the frame rate, but I’m afraid not on earth :frowning:.

Thank you Ynjh_jo

One more question ,please.

When I add more collision node , a frame-rate is getting down.
such as>>

        self.ralphBodyHandler = CollisionHandlerPusher() 
        self.cTrav.addCollider(scn1, self.ralphBodyHandler) 
        self.ralphBodyHandler.addCollider(scn1, self.ralphDummy)

Is there another way to increase performance for this issue. :confused:

The collision traversal process is still foggy for me. I haven’t really read it’s source code. If adding some collision nodes really degrades performance, it could be your “into” nodes are not optimized well. So the traversal inefficiency is more noticeable as the number of collision solids increase.
To make the traversal efficient, you should :

  1. build your world’s collision mesh using CollisionPolygons, not the visible mesh. The ultimate way to do this is by editing the .egg, just like Ralph’s world, so you would get CollisionPolygons when the .egg get loaded. I believe Josh Yelon had fixed some part of the code. Before v1.4.2, RoamingRalph only hit 35-40 fps top, but in v1.4.2, it’s now 120+ fps.
  2. add some collision solids which moves together under a CollisionNode, not 1 solid per node.

How can I creates an execute file from panda3D.

I tried to find out.

But I can’t found it.

Thank you… :cry:

What are you crying about ? I don’t quite follow …
If you’re looking a way to generate .exe, search for py2exe.

Right in the manual.
www.panda3d.org/manual/index.php/Build … _packpanda