Im trying to render two objects together, one with MaterialShading and one with Opacity. However, when combining these objects my computer becomes very slow and for large objects the frontend even crashes.
I managed to get a toy example running that shows the issue. By combining these two objects the graphics rendering time goes from a fraction of a second to over 4s. does anyone know what is going on here or has any solutions?
dat = Table[
x^2 + y^2 - z^2 + RandomReal[0.1], {x, -2, 2, 0.2}, {y, -2, 2,
0.2}, {z, -2, 2, 0.2}];
g1 = First@
ListContourPlot3D[dat, Contours -> {0}, Mesh -> None,
ContourStyle -> Directive[{Blue, Opacity[0.5]}]];
g2 = {MaterialShading["Gold"], Tube[RandomReal[20, {10, 10, 3}]]};
gr1 = Graphics3D[{g1}];
gr2 = Graphics3D[{g2}];
gr3 = Graphics3D[{g1, g2}];
gr4 = Show[gr1, gr2];
{gr1, gr2, gr3, gr4}
Graphics`RenderTiming /@ {gr1, gr2, gr3, gr4}
I'm on Mathematica 14.1 with Windows 10.
As a indication what needs to be rendered see below, the left does not has surface volumes rendered, the right does. The render times are already quite large so the times 100 as in the example wont work.