4
$\begingroup$

The output of Graphics3D looks blunt (polygon borders, arrow) when a polygon primitive is present in the scene with texture that has opacity channel. Also it seems that different kind of texture filtering is applied. I'm on Win10 and tested the code on 2 different PCs with GPUs from different vendors. I'm also interested in boosting the overall image quality like aliasing and texture filtering. Thank you!

SeedRandom[0]
imgData = RandomReal[1, {4, 5, 3}];
Image[imgData]
Graphics3D[{{Texture[Image[imgData]], 
   Polygon[{{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}}, 
    VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 
       1}}]}, {GraphicsComplex[{{1, 0, 2}, {0, 1, 2}, {-1, 0, 
      2}, {0, -1, 2}}, 
    Polygon[{{1, 2, 3}, {3, 4, 1}}]]}, {Arrow[{{0, 0, 0}, {1, 1, 
      1}}]}}, Boxed -> False, Lighting -> "Neutral", 
 ViewPoint -> {1/2, -2, 1}]
Graphics3D[{{Texture[Image[Map[Append[#, 0.5] &, imgData, {2}]]], 
   Polygon[{{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}}, 
    VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 
       1}}]}, {GraphicsComplex[{{1, 0, 2}, {0, 1, 2}, {-1, 0, 
      2}, {0, -1, 2}}, 
    Polygon[{{1, 2, 3}, {3, 4, 1}}]]}, {Arrow[{{0, 0, 0}, {1, 1, 
      1}}]}}, Boxed -> False, Lighting -> "Neutral", 
 ViewPoint -> {1/2, -2, 1}]

image quality and differences - transparency vs no alpha

$\endgroup$

1 Answer 1

5
$\begingroup$

Consider upgrading to version 12.1 which uses Direct3D 11 for 3D graphics rendering on Windows (version 12.0 used Direct3D 9):

Windows 3D graphics rendering updated from Direct3D 9 to Direct3D 11

Here your scene is rendered in both versions on the same machine with Windows 10 (clickable!):

screenshot

As one can see, there is significant difference for the scene with opacity.

For further improving try changing RenderingOptions. For example (output is rendered by version 12.1):

g = Graphics3D[{{Texture[Image[Map[Append[#, 0.09] &, imgData, {2}]]],
      Polygon[{{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}}, 
      VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 
         1}}]}, {GraphicsComplex[{{1, 0, 2}, {0, 1, 2}, {-1, 0, 
        2}, {0, -1, 2}}, 
      Polygon[{{1, 2, 3}, {3, 4, 1}}]]}, {Arrow[{{0, 0, 0}, {1, 1, 
        1}}]}}, Boxed -> False, Lighting -> "Neutral", 
   ViewPoint -> {1/2, -2, 1}, ImageSize -> Medium];
{g, Style[#, RenderingOptions -> {"3DRenderingMethod" -> "BSPTree"}] &@g}

screenshot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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