Closed skoz90 closed 1 year ago
Short solution: In your case it looks like the wheels are rotational symmetric, so no re-voxelization is needed after initialization. Then you can simply move the wheel voxelization calls before the loop where you set the ground plane. So first voxelize wheels, then set ground plane, then start the simulation.
For cases where the wheels are not rotational symmetric and need to be periodically revoxelized: The new revoxelization modifies all flags in the bounding box of the mesh. If the wheel bounding box overlaps with the ground boundary plane, the boundary flags in this location are also overwritten/cleared. Only the flag type handed over to the voxelization call is affected, all other flag bits remain unchanged.
In your case, you revoxelize the TYPE_S
flag for the wheel, and the ground also is TYPE_S
. I've built-in a failsafe that, when there is a translational/rotational velocity present for revoxelized cells, other cells in the bounding box with the same flag but 0 velocity are ignored. If the ground velocity was set to 0, the problem would not arise. But since you have a moving ground plane too, there is no way for the algorithm to differentiate between clearing wheel and ground voxels in the bounding box.
There is 2 possible solutions:
I am modelling a Car with rotating Tires. The ground z = 0 has the Flags = TYPE_S with set velocity of u. The Carbody and the Tires are setup with the the Flag (TYPE_S|TYPE_X) I need the TYPE_X Flag for the Force readout.
For the Rotations of the Tires I use a similiar procedure as the Demo of the Rotating Fan.
I noticed that if the Tire touches the Ground all Voxels inside the Projection surface of the tire on the Ground are reset with the Flags of the Tire.
This is a picture before the simulation was started. You can see that one of Tires touches the Ground.
After the Rotations of the Tires all the Ground Areas below the Tires have a Purple Rim. Indicating that something off.
i think thats happening because of the new revoxlizing algorithmen.