gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
303 stars 99 forks source link

Z-fighting problems reappear between species #2222

Closed AlexisDrogoul closed 7 years ago

AlexisDrogoul commented 7 years ago

(related to #2209)

Steps to reproduce

  1. Open the model Ant Foraging (Complex).gaml

2.Create a new display in one of the experiments, equivalent to the 2D display minus the overlay, i.e.

        display Ants3D type: opengl {
            image '../images/soil.jpg' position: { 0.05, 0.05 } size: { 0.9, 0.9 };
            agents "agents" transparency: 0.7 position: { 0.05, 0.05 } size: { 0.9, 0.9 } value: (ant_grid as list) where ((each.food > 0) or (each.road > 0) or (each.is_nest)) ;
            species ant position: { 0.05, 0.05 } size: { 0.9, 0.9 } aspect: icon;                   
        }
  1. Launch the experiment containing this display.

Expected behavior

When displayed, the ants should be on top of the grid cells.

Actual behavior

The cells and the ants are mixed without too much logic. See snapshot. Some ants are below some cells, while others are above.

simulation ants_model complete - features overlay overlay gaml - gama runtime 2017-07-26 11-54-31

Workaround

A (not so satisfying) workaround is to provide some bit of elevation to the ant layer, e.g. species ant position: { 0.05, 0.05, 0.01 }.

System and version

GAMA 1.7 Git, Mac OSX 10.12.5

agrignard commented 7 years ago

Not a good news. What has been changed in opengl? Did we update any new library that might have introduces this regression?

AlexisDrogoul commented 7 years ago

Should be fixed by https://github.com/gama-platform/gama/commit/9dc3ecdac294595cb7c475e745672a12ac0b0768