opensim-gui
opensim-gui copied to clipboard
Conspicuous rendering artifacts appear in snapshots due to Z-fighting
Steps to reproduce
- open a model
- click the "Snapshot" button
Expected result
The generated image is crisp.
Actual result
Geometry appears to intersect in impossible ways due to Z-fighting. Might be difficult to address in real time in the Visualizer (e.g., as the model is being animated or as the user moves the scene light around), but we should be able to avoid Z-fighting when generating a snapshot. The floor and each model can be rendered in separate scenes; the near and far clipping planes necessary to capture a model with its shadow on the floor (but not the entire floor) can be computed by casting rays from the scene light through the vertices of the model's bounding box and noting where they intersect the floor. Avoiding these artifacts is essential for generating publication-quality images.
Environment and GUI version
AppVeyor artifact OpenSim-cedd8d22-2018-05-31-win64.exe
I think I also see Z-fighting in the Rajagopal 2015 model between muscle path cylinders and path points.
