opensim-gui icon indicating copy to clipboard operation
opensim-gui copied to clipboard

Conspicuous rendering artifacts appear in snapshots due to Z-fighting

Open tkuchida opened this issue 6 years ago • 1 comments

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

tkuchida avatar Jun 02 '18 07:06 tkuchida

I think I also see Z-fighting in the Rajagopal 2015 model between muscle path cylinders and path points.

Rajagopal2015.osim.txt

screen shot 2018-07-26 at 1 51 11 pm

chrisdembia avatar Jul 26 '18 20:07 chrisdembia