optimized surface painting