Group Abstract Group Abstract

Message Boards Message Boards

Tips for preventing memory issues with Graphics3D

POSTED BY: Martijn Froeling
9 Replies
Posted 3 years ago

In case of you have not try this yet, you can customize "TubePoints", CapForm and JoinForm to reduce the FrontEnd memory usage. By default value of "TubePoints" method option is {40, 2}, and the default "Round" CapForm and JoinForm involves more sampling. Since you have a lot of small tubes and reducing sampling won't affect too much your visual results, you definitely should give it a try.

Graphics3D[{Tube[RandomReal[.1, {50, 50, 3}], 
   VertexColors -> RandomReal[1, {50, 50, 3}]]}]

Graphics3D[{JoinForm["Miter"], CapForm["Butt"], 
  Tube[RandomReal[.1, {50, 50, 3}], 
   VertexColors -> RandomReal[1, {50, 50, 3}]]}, 
 Method -> {"TubePoints" -> {5, 2}}]
POSTED BY: Yuzhu Lu
POSTED BY: Martijn Froeling
Posted 3 years ago

A new method will be added to use less memory but slower tube rendering for the next release. Please contact us for details.

POSTED BY: Yuzhu Lu

Hi,

That would be awesome. I will patiently await the update. For now, I know that what I'm doing is indeed the optimal way and know where the limitations lie. Compared to a few years ago the visualizations have already come a long way for me. Thanks for the effort!

POSTED BY: Martijn Froeling
POSTED BY: Martijn Froeling
Posted 2 years ago
POSTED BY: Yuzhu Lu

If there is no way to reclaim memory in your main session, have you considered using the parallel computation framework to do these computations in a separate kernel/frontend?

For example, configure one parallel kernel and then do:

LaunchKernels[] (* to launch a single kernel *)
ParallelEvaluate[ (* run the code to do one rasterization/export *) ]
CloseKernels[] (* to free up the memory *)

Not perfect, but maybe allows better control over the memory issues you are running into?

POSTED BY: Arnoud Buzing

I was giving this some extra thought. But in this case it wont work since its the frontend that does the conversion of GraphicsPrimatives to actual 3D objects. During the entire process the kernel memory does not change and the kernels hardly do any work. The frontend is doing the heavy lifting (therefore it becomes unresponsive with a nice blue waiting circle during most of the processing time)

POSTED BY: Martijn Froeling
POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard