porting a project from OpenSceneGraph to Panda3d

Hi all, my name is Francisco, I’m working on a project for my phd research and I’ve a small game developed in OSG which I’d like to port to Panda3d.

I worked with Panda 3 years ago, and I don’t remember too much today :frowning:

Of course I’m reading the docs, which are pretty good,
but I just wanted to make a couple of quick questions before diving into the engine.

You can have a look at the graphics here:

I’m pretty sure that this is basic stuff for the
Panda3d engine, and I just wanted to know if the
way of working in panda3d will be similar to OSG.

  • build the scenegraph, setup nodes, textures,
    sounds, etc.
  • extend some C++ classes for particular needs
    for callbacks.
  • register some callbacks for the tree update,
    camera update, collision detections,
    keyboard handling, etc.
  • enter into the main loop…

I have all my 3d models in osg or 3ds format, and a huge city model in “.ive” that I would like to load in panda3d.

Also, I need to work a lot with Level of Detail with
different 3d models (5k tris or less), because my work is about visual perception of LOD changes on interactive games in the periphery of the central view (inattentional blindness) so on this topic my question is how flexible panda3d is
about LOD implementations, because I will need to
use alternative criteria for LOD switching instead of
screen size or distance to the camera… In fact, in OSG I had to extend a more general NodeSwitch class to implement my own LOD criteria.

I will need to integrate the game with
an eye-tracker as well, it could be a commercial
one or a DIY (like www.eyewriter.org), so I will need to communicate through basic UDP,TCP or UNIX sockets in a multithreading environment.
To give an example, when I used the eye-link
eye-tracker from SRI systems, I had to deal with 250/500 samples per second of gaze positions and other information that was needed to make decisions in the game.

Last but no less, I would love to implement all my research findings with respect to LOD management
for alternative criteria in a game engine, so I’m
wondering how open are the panda3d maintainers about
feature additions and engine improvements coming from the community…

thank you very much
ps. please forgive my english…still learning


The Panda philosophy is usually less of an emphasis on setting callbacks and subclassing node types as it is on spawning tasks to handle your scene graph logic.

In the typical Panda model, rather than creating your own NodeSwitch class, you would implement your custom LOD switching via a Python task that simply makes the LOD determination each frame and explicitly hides and/or shows the appropriate model(s). (Or, rather than explicitly hiding/showing, you could use the SwitchNode class, and call setVisibleChild() to reveal a particular model).

Of course, you could also go the subclassing route if you prefer that model. That would be a bit more work, and you’d have to do it in C++, and you’d also have to get more familiar with the way the Panda node traversal works internally. But it’s totally an option to subclass LODNode and replace its simple logic with more sophisticate logic of your own devising.

Networking is certainly not a challenge. Depending on the rest of your game logic, you might need to spawn a thread to handle your 500 samples per second without interruption. This has a few implications when done in Python and with Panda; you might be best off designing the thread not to make any Panda calls at all, so it can safely run using “true” system threads.


Thanks for your quick reply David, I will take all your comments in consideration.