voxel object vs voxel object collision
Posted: Wed Mar 18, 2015 1:12 am
hi everybody (me newbe), I have tested three other physics enignes and I found bepu ist best for c# . (congratulations and big thx!!)
I want to create a game which contains multiple big voxel objects (like star made, blockade runner or space engineers),
which behave physically correct. A major challange i face is to provide a collision handling.
The "blockade runner"-guys use the jitter engine, but I dont see any support of that in any sense.This guy:
https://www.youtube.com/watch?v=7h_hObw ... be&t=2m26s
does have some objects separating and having collisions, but I think he is using the compound shapes.
I think just using compound shaps does not suite my purpose, since my objects should be very very big and "in-convex", like planets or terrains and
star ships or space stations.
I have looked at a lot of the bepu code the last days (and three other engines.. )
I have several ideas, but some may not be possible (or I do not know how to implement them into bepu, but again it has a very good architecture in my eyes)
#1 I do not know how it would perform using one of those mass-mesh-bodies (MobileMeshShape?), but I assume that at least for the terrain, its not possible or would you say, that it is sufficient for realizing my dreams?
#2 My fav Idea is to add a new type of Entity<...> or shape which queries recursively over my voxel object(s)(which is oct-tree based)
and returns contact points and merges them (as the engine is alredy capable of).
I assumed that the shape is in some way telling the narrow phase if it collides with another obect and I would distinguish only between other voxel object and everything else. Where for other voxel objects I would go down the hierachy simultaneously and for other objects I would use some ghost boxes to get the contact points return them and the parent node does the merging of the contact points.
This is my favorite idea, but I do not see how I can put this into the engine.
I do not know where to put algorithms and so on.
What I need: A way to define a new type of collision shape and how (or where) its collisions will be computed. Meaning what happens in the narrow phase.
I must get the two candidates and return the contact points.
I tried to inherit from the narrow phase and punch that in, but where the actual collision detection is happening ... I dont understand that
#3 Another idea is to use (inherit from) a compound shape and only fill it with the next 8 nodes in the oct tree, and replacing them ad-hoc - when they collide - by new this kind of (inherited) compound shapes which act similarly. And if the contact of the two objects dissappear they go back to the original 8 boxes. (or I somehow start with one).
This is an idea which might be easer to implement with compareble performance, but CompoundBodies can only consist of CompoundShapeEntry which can not be CompoundBodies on their own. So I think ... dunno
#4 Overriding the broad phase or just returning false/no collison/disposing the contact in some way if it does not really collide after the regular narrow phase of the bounding boxes would not suffice since I need new contact points if so. Or can I just change those somehow? I assume this would break a lot
I would be really grateful for some suggestions or links to anything which is related to this kind of problem.
Or some Ideas or way how I can do that in the bepu engine.
And I am sorry in case I did not make myself very clear, I think this idea is very strange
I want to create a game which contains multiple big voxel objects (like star made, blockade runner or space engineers),
which behave physically correct. A major challange i face is to provide a collision handling.
The "blockade runner"-guys use the jitter engine, but I dont see any support of that in any sense.This guy:
https://www.youtube.com/watch?v=7h_hObw ... be&t=2m26s
does have some objects separating and having collisions, but I think he is using the compound shapes.
I think just using compound shaps does not suite my purpose, since my objects should be very very big and "in-convex", like planets or terrains and
star ships or space stations.
I have looked at a lot of the bepu code the last days (and three other engines.. )
I have several ideas, but some may not be possible (or I do not know how to implement them into bepu, but again it has a very good architecture in my eyes)
#1 I do not know how it would perform using one of those mass-mesh-bodies (MobileMeshShape?), but I assume that at least for the terrain, its not possible or would you say, that it is sufficient for realizing my dreams?
#2 My fav Idea is to add a new type of Entity<...> or shape which queries recursively over my voxel object(s)(which is oct-tree based)
and returns contact points and merges them (as the engine is alredy capable of).
I assumed that the shape is in some way telling the narrow phase if it collides with another obect and I would distinguish only between other voxel object and everything else. Where for other voxel objects I would go down the hierachy simultaneously and for other objects I would use some ghost boxes to get the contact points return them and the parent node does the merging of the contact points.
This is my favorite idea, but I do not see how I can put this into the engine.
I do not know where to put algorithms and so on.
What I need: A way to define a new type of collision shape and how (or where) its collisions will be computed. Meaning what happens in the narrow phase.
I must get the two candidates and return the contact points.
I tried to inherit from the narrow phase and punch that in, but where the actual collision detection is happening ... I dont understand that
#3 Another idea is to use (inherit from) a compound shape and only fill it with the next 8 nodes in the oct tree, and replacing them ad-hoc - when they collide - by new this kind of (inherited) compound shapes which act similarly. And if the contact of the two objects dissappear they go back to the original 8 boxes. (or I somehow start with one).
This is an idea which might be easer to implement with compareble performance, but CompoundBodies can only consist of CompoundShapeEntry which can not be CompoundBodies on their own. So I think ... dunno
#4 Overriding the broad phase or just returning false/no collison/disposing the contact in some way if it does not really collide after the regular narrow phase of the bounding boxes would not suffice since I need new contact points if so. Or can I just change those somehow? I assume this would break a lot
I would be really grateful for some suggestions or links to anything which is related to this kind of problem.
Or some Ideas or way how I can do that in the bepu engine.
And I am sorry in case I did not make myself very clear, I think this idea is very strange