Integrating C++ based middleware with Panda3D

Hi,
I am teaching myself the many facets of real-time applications and I had a question regarding implementing middleware into Panda (I suppose similar to the Physx )…specifically http://lightsprint.com/

My questions are:
1. To integrate 3rd party libraries (ODE, PhysX, LightSprint, etc.)
do you have to compile Panda 3D from source with them included

2. To use C++ based middleware, does Panda need some type of Python wrappers to “talk” to them or is Panda able to call commands from C++ libraries by some manner

3. If a wrapper was written for this purpose would it have to be compiled with the Panda source to be useable (ie like ArtToolKit?)

Thanks I apologize if I am using incorrect terminology or if the questions are unclear. Thanks for any help!

  1. No your app could use the panda3d and middleware lib as 2 separate things. Most likely your middle application will require c++ wrapper to use with together with panda then you would need panda3d source for the headers in order to get the wrapper to compile. You can use all of the power of panda without having to stick your middleware lib in the source tree directly.

  2. Yes you would have to write a c++ wrapper from which interrogate will generate the python wrapper. The lib will most likey require a c++ wrapper any ways if just to rename the functions into panda style. But transforming mesh, sound or image data form panda to lib and back will require more advanced wrappers.

  3. No you could distribute it separately … see pro-rsofts pgmm. Same principle i think.

Integrating some thing like lightsprint will be a monumental task. Because you would need to interface mesh,lighting and shader data and who knows what else. You would need to know lightsprint and panda3d inside out and write lots of glue code probably changing panda and light spring to make writing this glue simpler.

A better way maybe to re implement lightspring’s algorithms using panda functions.

edit =====

Looking at lightspring more of an engine not just a lighting library. This will be equivalent of implementing ogre in panda3d … best to just copy the algorithms but it looks closed source. You could also try to use lightspring’s rendering pipeline in panda … but you will be working with the most complex part :slight_smile:

Thank you! Just the type of answers I was looking for to point me in the correct direction.

reviewing what you said, I think implementing algorithms of a similar fashion would be better and less intermediary work.

***** So what you are saying is that ODE a middleware library is used through PyODE to talk to Panda3D…so using ODE it goes through:
ODE—>PyODE—>Panda3D
as seperate things …if I were to write a wrapper like PyODE I would need the panda source to get Panda’s headers to work. if this is correct I believe I understand!

there is 2 ways to use ode with panda3d

if you code in c++ the ODE is part of the source so its part of panda.

if you code in python the pyODE is not part of the panda at all.

Unfortunately there is no way to use the included ode form python yet i think some one is working on it. I wonder way i think it would be easy to just figure out why interrogate does not generate it … some one explain please?

So the internal ODE will require the headers from source while pyODE will not.

Back the lighting library, it looks like its closed source which makes doing any thing with it pretty hard. There is tons of papers on how to simulate fantastic lighting on modern cards i would suggest start at the “bleeding edge.” If they had enough time to write a library for it and try to sell it means their tech is obsolete now. I would suggest try to get the geometry shaders working in panda and read up what are the new hot lighting techniques - they almost change every month. Start small build big.