Optimize grid, add grid visibility density.