Hi all, i like to know if in the 1.8.0 or next version of Panda someone have implemented this feature yet.
Otherwise i will try to implement it as a simple planetary physic engine as a primary function.
This can be useful to others besides me?
There is no reason why you can’t use OpenCL alongside Panda3D. Is there a particular feature that Panda3D should offer to better integrate with OpenCL?
Physics engine, particularly because i like to implement a planetary physics, an since i’m at it, i do the thing better with gpu computational integration.
Isn’t good?
So I would assume that Panda’s PhysX module can use hardware acceleration out of the box, and if you want to use Bullet with OpenCL support, then you’ll have to compile it from source (which probably isn’t very hard).
But bullet use only planar physics (correct me if i’m wrong), so i need to implement planetary (or spherical) physics in bullet and i find it quite hard because i prefer phyton language than c++ (and there is pyOpenCl module for this).
I want to know if someone has already implemented this module in a later version to 1.8 (to do not the same job twice).
Sorry Rdb, but could you link me the part of documentation in Bullet where talks about spherical physic?
I search for it for very long time but i am not able to find anything about this subject.
I suppose I don’t have a clear understanding of what you mean by planar vs. spherical physics. I thought that by “planar” you meant operating in a single plane, which is not necessarily the case with Bullet.
I think what Adanf mean with “planar physics” and “spherical physics” is the gravity vector. The words he has choosen are a bit, well, unusual. But to answer the questions:
1.) Both Bullet and PhysX support by default only a uniform gravity vector, i. e. gravity has the same direction and magnitude everywhere in the world.
2.) PhysX (2.x) offers so-called force fields, so PhysX is perfectly capable to simulate gravitation of a solar system. Remark: In PhysX 3.x (not yet available in Panda3D!) the force field untility classes have been removed, because they are so easy to write yourself.
3.) Bullet does not have such an utility class. But it’s quite easy to write yourself. Performance is usually not a problem, if we are talking about a dozen bodies only. If we are talking about hundreds of bodies then the Panda3D Bullet module is not the right choice anyway.
3.) If you want to have true n-body physics then you have to write the code yourself (e. g. http.developer.nvidia.com/GPUGem … _ch31.html). But when using PyOpenCL or PyCUDA you probably will run into another performance bottle neck: the transfer of results from PyCUDA/PyOpenCL to Python and then on to Panda3D. I guess you won’t be able to update more than a few dozen objects with acceptable performance.
I am not sure if this is what you are looking for but I have a small library that does realistic orbits on rails. If you are doing physics for space ships then it is better to use patch conics than n body
Certainly. A spaceship won’t create any noticable gravitational effect on a star or planet, because of the huge mass ratio. Also in gaming spaceship usually move much faster than planets, and thus plantes can be considered static.