0
$\begingroup$

Ok, I need to preface this with the fact that what I'm intending to do may not be possible in blender. I was needing to know if it is possible to create multiple rigid body systems within the blender game engine. I'm currently attempting to partition large portions of space in order to circumvent floating point limitations for a space flight simulator I am working on. Can anyone see any possible work around using Python? The only solution I can come up with is to partion space into octrees and have rigid body simulations in each with active objects to handle encounters/ collisions.

$\endgroup$
5
  • $\begingroup$ Are you actually seeing issues due to floating point limitations, and if so, are you sure those are the cause? I would imagine that bullet physics would already have a system to handle this. Also, I'm not sure what you intend to do with these octrees? Adding your own collision detection? If your doing that, why not just write your own physics engine? Or maybe modify the source of bullet, and compile a new copy of blender? $\endgroup$ Commented Jun 22, 2017 at 0:59
  • $\begingroup$ The octree is simply being used as a means of partitioning the universe, as opposed to a 3d cell array. Each sim would be situated in active leaf nodes, however, I'm toying with making them more like bubbles of high precision space moving through low precision space, with original situated in the geometric center of the objects being handled. Would hate to mess with the source code since I'm not familiar with it. No intention of writing my own physics engine since that'd be reinventing the wheel at this point. $\endgroup$
    – Omni
    Commented Jun 22, 2017 at 1:22
  • $\begingroup$ I see. Well, I'm still skeptical, but best of luck making it work. $\endgroup$ Commented Jun 22, 2017 at 1:43
  • $\begingroup$ Can you just use collision layers? $\endgroup$
    – ruckus
    Commented Jun 24, 2017 at 20:23
  • $\begingroup$ That sounds entirely reasonable. I'm actually using multiple scenes to handle different layers of physics and scale. $\endgroup$
    – Omni
    Commented Jun 25, 2017 at 12:52

1 Answer 1

0
$\begingroup$

If the areas do not interact at all, can you even see them at the same time? Could you completely forget about the "other" ones while you're over in one small part of the universe?

If not, and you always need to be able to see them, you could try doing things with multiple scenes. Each simulation takes place near the origin, and the camera shifts to provide the correct view of it.

I will echo GiantCowFilms: I doubt floating point is the issue here. If I remember correctly, a 32 bit float has enough precision to work at ±1cm at the radius of earth (6000km)

$\endgroup$
3
  • $\begingroup$ I know this may be ambitious, but I was hoping to have a total universe size of 13 billion light years, but I understand now that it may be better to simplify collision calculations​ for regions outside the immediate area of the player. Still working out a scaled space solution for the immediate area. $\endgroup$
    – Omni
    Commented Jun 22, 2017 at 13:17
  • $\begingroup$ Mostly needed it for persistence reasons. Thank you both for the feedback. $\endgroup$
    – Omni
    Commented Jun 22, 2017 at 13:24
  • $\begingroup$ Yup, you do not need to calculate the physics for a leaf falling on a planet more than one light year away..... Many of the large-scale physics (ie planetary) will need to be handled specially anyway, so I think it makes sense to use BGE's physics for the "here and now" and either don't have, or write your own system for handling the physics of very far away. $\endgroup$
    – sdfgeoff
    Commented Jun 22, 2017 at 13:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .