16
$\begingroup$

Bug introduced in V10.4 and fixed in 10.4.1


Suppose we have the following array from which we intend to create an ArrayMesh:

arr = {{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}}, {{1, 1, 1}, {0, 1, 1}, {1, 1, 
   0}}, {{0, 1, 0}, {0, 1, 1}, {0, 0, 1}}};

If we create the ArrayMesh and use one of the styling Options in this case MeshCellStyle, the color is not evenly applied:

ArrayMesh[arr, MeshCellStyle -> {{2, All} -> Yellow}]

Mathematica graphics

And as you manipulate this mesh object it flickers like crazy:

enter image description here

This does not happen if you use HighlightMesh to style it:

HighlightMesh[ArrayMesh[arr], {Style[2, Yellow]}]

Mathematica graphics.

Can anyone reproduce this behavior. Note that ArrayMesh is new in 10.4. I'm using Windows 10 64bit

$\endgroup$
  • 4
    $\begingroup$ Can reproduce this new kind of craziness in 10.4 on Win 10-64bit-NVIDIA gpu.... $\endgroup$ – PlatoManiac Apr 5 '16 at 21:41
  • $\begingroup$ @PlatoManiac. I see what you did there :). $\endgroup$ – RunnyKine Apr 5 '16 at 21:43
  • $\begingroup$ Same result on Windows 7 32bit using V10.4. $\endgroup$ – xyz Apr 6 '16 at 3:51
  • 2
    $\begingroup$ @BrettChampion, Is there a reason for removing the bug tag? $\endgroup$ – RunnyKine Apr 6 '16 at 17:07
  • $\begingroup$ Just to let you know, I removed the version tag in accordance with the current bugs policy here. $\endgroup$ – Michael E2 Apr 20 '16 at 11:18
12
$\begingroup$

This is an artifact in Graphics3D rendering (Z-fighting) which is generally difficult to avoid when using a depth buffer.

While ArrayMesh is new in 10.4, you would see similar behavior if you did copy and paste the result into an older version.

As a possible workaround, try

SetOptions[$FrontEnd, 
   RenderingOptions -> {"Graphics3DRenderingEngine" -> "BSPTree"}]
$\endgroup$
  • $\begingroup$ @RunnyKine Good point, I've removed that suggestion, since it is not general enough. $\endgroup$ – ilian Apr 7 '16 at 3:04
  • $\begingroup$ Thanks. Have you seen this ? $\endgroup$ – RunnyKine Apr 7 '16 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.