Unfortunately I haven't seen this question earlier so my two cent to this problem may be a bit late. Please take my words with the appropriate suspicion because I have no knowledge of the internal implementation. My explanations are purely based on observation and what I think happens here.
Let's first make clear that we all agree on what we are seeing. The little crosses are the back edges of the cubes which shouldn't be invisible because they are covered by the faces in the front. Although your example looks really awesome in its simplicity, let us create a better one: A square and triangle polygon folded together:
Now we could rotate the graphics so that we don't see the triangle part any more and fold it closer and closer together
Manipulate[
Graphics3D[
Polygon[{
{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}},
{{0, 0, 0}, {1, 1/2, d}, {0, 1, 0}}
}], Boxed -> False, PlotRange -> {{0, 1}, {0, 1}, {0, 1}}],
{d, 0, .5}]
As you see, the edges which shouldn't be visible at all appear through the squared polygon. This should give us the important clue what happens here.
You might already know, that the image of the 3D scene you observe is a projection from the 3D scene onto your 2D screen plane. So all polygons (and other primitives) are transformed so that the pixels on your screen give you the impression you are looking at a 3D thing. One important step in this process is to decide whether or not a pixel is covered by another one, which is closer to the camera. This step is called hidden surface determination and is crucial to give a realistic graphic.
The problem with this is, that this algorithm should work very fast because otherwise all the nifty rotations/translations of 3D graphics wouldn't work. Therefore, this stuff should be done by your graphics card which works with finite precision.
This is the reason why we see the lines, because the determination of which object covers the other was not exact enough. Fortunately, Mathematica comes with several hidden surface determination algorithms and binary space partitioning is far more exact than the algorithms in your graphics card.
So if you go to Edit->Preferences and then select the Advanced to open the Option Inspector, you will find the appropriate entry under the Graphics Options
Select BSPTree and rotate your graphics to update it and you'll see that the additional lines disappear even if you go really close
Before you open the champagne, be aware that this slows down the rendering dramatically. Just make some more cubes (for instance 100 in each direction) and try to rotate the graphics and then switch the method back to Automatic
and you'll see the vast difference.
{Opacity[0.99], Table[{Cuboid[{i, j - i + 1, j + 1}]}, {i, 1, 4, 1}, {j, 1, 4, 1}]}
is a workaround. $\endgroup$Opacity[0.99]
I still see the problem 8.0.4 on Win7x64. $\endgroup$Opacity[1]
I see the problem on OS X, butOpacity[0.99]
fixes it. $\endgroup$Opacity[0.99]
. $\endgroup$