0
\$\begingroup\$

In most physics-based voxel games (like Teardown), there is usually an object-space voxel grid for each object, but no corresponding world-space grid. This means that a voxelized object can be translated and rotated freely without any global constraints of having to stick to a world-space voxel grid. This is understandable, since the physics engines work on continuous space-time.

However, is there any approach in which the laws of classical mechanics can be translated to work in a grid-like discrete environment? Essentially, this would mean that an object-space voxel can only occupy one of the world-space voxels, and all transforms would have to stick to the global voxel grid.

\$\endgroup\$
4
  • \$\begingroup\$ How "pure" does the solution need to be? If only the information visible in the world grid is allowed to be used in the simulation, the quantization gets pretty extreme: only velocities that are a whole number multiple of voxels per tick are feasible, making it hard to accelerate or deflect a heavy object, and leading to quantum weirdness like superfluids. But if you're OK keeping some "hidden variables" then we have a better shot at making something that looks sensible. e.g. if each block is displayed exactly in one world grid cell, but holds a "sub-cell position" allowing fractional speeds. \$\endgroup\$ Commented Apr 29, 2024 at 15:16
  • \$\begingroup\$ @DMGregory Rounding down the position to integer value would be the means of last resort. I was hoping that perhaps someone has created the discretized versions of Newton's three laws and such. \$\endgroup\$ Commented Apr 29, 2024 at 16:52
  • \$\begingroup\$ The trouble is that at that level of discretization, physics wouldn't work in familiar ways, but something more analogous to what happens at quantum scales, where the allowable energies / interactions are strictly quantized, and things get weird. This might be an interesting game mechanic, but it wouldn't look intuitive as "Newtonian physics" as we know it. It would behave more like a cellular automaton, and movement parallel to grid axes would be strongly favoured over diagonals, making it strongly anisotropic. \$\endgroup\$ Commented Apr 29, 2024 at 20:30
  • \$\begingroup\$ One problem is conservation of volume. You need to re-orient the object, so say you generate meshes as an intermediate representation. If you rotate a mesh and re-render it as voxels, due to rounding errors, it will not necessarily have the same volume it had previously, i.e. fewer voxels. What becomes of those "indeterminate" voxels e.g. if parts of the boulder are destroyed, which of those momentarily-non-present voxels were also destroyed? If a boulder is rotating while flying through the air, and it has fewer voxels at different orientations, does its mass change at those orientations? \$\endgroup\$ Commented Apr 30, 2024 at 11:04

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.