You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Physics Engine will no longer work with the updates to the Voxel Engine. A new design must be implemented requiring almost an entire re-write of the Physics Engine. This new design will include the following features:
Dynamically create/destroy blocks in the "physics world" (each block in the world will be represented in the Physics Engine as an object with mass, velocity, acceleration, and position).
Keep track of all the blocks in the world that are currently in motion and allow physics to be run ONLY on the moving objects.
Basic collision detection and resolution.
Exposed method to apply forces to specific blocks and set them in motion.
Analysis:
The creation and destruction of blocks can be done very much in parallel. A simple map for both of these functions is all that's required. Once all the blocks are created we'll mark the ones that are moving and add them to the active object list. The time it takes to create or destroy a new object can be considered constant.
work: 1(n)
span: 1
This is very scale-able.
Collision detection will have to use a stencil to observe the blocks surrounding it to determine if it has made any contact. This stencil will look at the blocks directly around the block in question to determine collisions and if any of those blocks are moving we'll have to run the physics on those block very carefully to make sure collisions are handled appropriately. These collisions can be run in parallel, so collision detection will be a map of stencils.
work: c(n) -> c is the number of collisions for the block in question, n is the number of moving objects
span: max(c) -> largest number of collisions would i guess in the worst case would be n-1 (it's colliding with every other block in the world)
Again this is very scale-able.
The text was updated successfully, but these errors were encountered:
I'm not sure if it'd be best to have a mass on every block. You could probably get away with all blocks having the same mass. Let's Make A Voxel Engine somewhat covers this, if only abstractly.
Also, I realize I said a lot before regarding "chunks being only for the graphics", but the ChunkManager also carries functionality of "only update this section of the world when its changed". Since physics works on the entire world all the time, you might find that level of detail useful. For example, when someone changes a voxel in the world, you could notify the physics engine to check that section of the world.
You bring up a good point about mass. I was going to make mass variable just in case anyone had plans to elaborate on our textures. But if that's not the case we can use a constant mass.
When I talked with other members of our team we decided to pass blocks to the Physics Engine by using the Rectangular Prism object already in the repository rather than use the Chunks. However, I'd be more than willing to code it either way if it makes the Voxel Engine's job a little easier.
Trevor Gotberg:
The current Physics Engine will no longer work with the updates to the Voxel Engine. A new design must be implemented requiring almost an entire re-write of the Physics Engine. This new design will include the following features:
Analysis:
The creation and destruction of blocks can be done very much in parallel. A simple map for both of these functions is all that's required. Once all the blocks are created we'll mark the ones that are moving and add them to the active object list. The time it takes to create or destroy a new object can be considered constant.
work: 1(n)
span: 1
This is very scale-able.
Collision detection will have to use a stencil to observe the blocks surrounding it to determine if it has made any contact. This stencil will look at the blocks directly around the block in question to determine collisions and if any of those blocks are moving we'll have to run the physics on those block very carefully to make sure collisions are handled appropriately. These collisions can be run in parallel, so collision detection will be a map of stencils.
work: c(n) -> c is the number of collisions for the block in question, n is the number of moving objects
span: max(c) -> largest number of collisions would i guess in the worst case would be n-1 (it's colliding with every other block in the world)
Again this is very scale-able.
The text was updated successfully, but these errors were encountered: