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}]

And as you manipulate this mesh object it flickers like crazy:
This does not happen if you use HighlightMesh to style it:
HighlightMesh[ArrayMesh[arr], {Style[2, Yellow]}]
.
Can anyone reproduce this behavior. Note that ArrayMesh is new in 10.4. I'm using Windows 10 64bit
Answer
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"}]

Comments
Post a Comment