Is it possible to reduce the number of polygons a 3D plot is composed of in Mathematica?

I created this animated inverted gyroid but if I want to make something more complicated it is too large (or it takes too much time) in .wrl .obj. or .stl format (like 200MB or more) to export the 3D plots as frames to Blender, C4D or any other ray tracing software.


  • 1
    $\begingroup$ Hard to say without a concrete example. Try to play with the PlotPoints and MaxRecursion options. Probably, you want to set MaxRecursion -> 0 to get maximal control over the meshing. Moreover, applying DiscretizeGraphics may help. In particular, it should convert the plot to a triangle mesh and strips aways the vertex normals and face-wise style information. $\endgroup$ – Henrik Schumacher Aug 26 '18 at 9:24
  • $\begingroup$ If the surface has the same list of face indices in all frames, it should also possible to export the vertex coordinates (and possibly also the vertex normals) frame-wise and the faces indices (and possibly texture coordinates) only once. But I don't know a data format for that. $\endgroup$ – Henrik Schumacher Aug 26 '18 at 9:30
  • $\begingroup$ If the vertex coordinates follow a smooth movement, one may think also about spline interpolation in time. This would reduce the number of key frames to be stored at the cost of some additional but negligible computation for the raytracer when interpolating the key frames. I can image how this could be done with POVray, but is would need some additional programming work. $\endgroup$ – Henrik Schumacher Aug 26 '18 at 9:33
  • 1
    $\begingroup$ All in all, the OBJ-export filter in Mathematica is pretty inefficient. =/ $\endgroup$ – Henrik Schumacher Aug 26 '18 at 9:35
  • $\begingroup$ May be this answer will help? mathematica.stackexchange.com/a/172603/1089 $\endgroup$ – chris Aug 26 '18 at 10:42

Browse other questions tagged or ask your own question.