Deterministic Narrow Phase
Posted: Tue Jun 21, 2016 3:18 am
Hey Norbo,
How do I make pair generation happen deterministically? I'm trying to make my simulation deterministic, but when I put a box shape with a NoSolver rule into the simulation, make a cylinder move through it, and log the pairs the narrow phase contains each frame, they end up being way off. Besides this scenario of using NoSolver entities as trigger areas, I've got the rest of my simulation running deterministically on the same machine, which mostly consists of cylinders and balls interacting with each other and static meshes. I have followed this problem back to the narrow phase pairs after seeing that contacts between the box and the cylinder were appearing at different frames (while looping through entity.CollisionInformation.Pairs to check if it should trigger).
I am running bepu with a single thread, my timestep is fixed, I'm setting the permutation index to the same number (1337) at the beginning of each simulation. I have made absolutely sure that physics objects are being added to the simulation at the same frame, and I'm not trying to rewind the simulation at all.
How do I make pair generation happen deterministically? I'm trying to make my simulation deterministic, but when I put a box shape with a NoSolver rule into the simulation, make a cylinder move through it, and log the pairs the narrow phase contains each frame, they end up being way off. Besides this scenario of using NoSolver entities as trigger areas, I've got the rest of my simulation running deterministically on the same machine, which mostly consists of cylinders and balls interacting with each other and static meshes. I have followed this problem back to the narrow phase pairs after seeing that contacts between the box and the cylinder were appearing at different frames (while looping through entity.CollisionInformation.Pairs to check if it should trigger).
I am running bepu with a single thread, my timestep is fixed, I'm setting the permutation index to the same number (1337) at the beginning of each simulation. I have made absolutely sure that physics objects are being added to the simulation at the same frame, and I'm not trying to rewind the simulation at all.