Methods to stop crashing at bake?

I have a script using Image Sampler that has created thousands of circles, possibly hundreds of thousands of circles.
When I try and bake them, Rhino crashes.
Are there any techniques to stop this from happening?

It should not crash in the first place.
How many circles are we talking about?
Can you attach your code with internalized data? (and the picture sampled, maybe)

I shared it with you via DM.
Thanks for your help!

I can bake millions of curves / points… Naturally all GPUs have limits…

You could use human, to bake them to hidden/ named layers, or just bake to hidden layer. Close grasshopper / script, save file and reopen - grasshopper / script may be using up resources.

Also, turn off the display preview in gh, so that the pc is not trying to display both.

But this all really depends on your GPU and what it is able to draw on screen.

It didn’t crash for me.
It’s 393k circles. It takes a bit of time to bake (30 seconds / 1min … haven’t measured) , and I saw Rhino RAM usage jumping up and down to 13GB.
What Rhino version are you on?
What are your system specs, Andrew?

I have a 12th Gen i7-12800H 2.5Ghz
32GB Ram
NVidia RTX-A3000 12GB Laptop GPU

Running the latest v7 Rhino (it’s baking currently so I can’t tell you!)

I’ll be patient this time and see if it bakes…

I got this error. Maybe I need to close all my other apps?

Can you check your global memory usage while that happens? (in the task manager)
I’m not having precise ideas for this problem.
Hardware problem? Are your RAMs overclocked?
Or maybe your system is using pagefile.sys and the problem is in your SSD/HDD? … i’m just guessing…

I did a restart and my memory usage sits at 30% at idle which doesn’t seem great…
When I tried to bake memory usage ramps up to 99% and fails after a few minutes.

I’m trying it in v8WIP to see if I have better luck.

In the meantime are you able to DM me your resulting curves?

Andrew,

This appears to be something in your hardware configuration. The sample you provide bakes in less than a minute here on a lesser machine than yours.

Here I used Anemome and Elefront to bake each column individually (629 columns)

Loop_image_sampler-3.gh (452.0 KB)

loop2

Hi Japhy,
I installed the plugins as per your instructions.
I have your script loaded and have tried to run Bake and Preview on the Loop-Start node, but it’s not doing anything…

aha, I tried Enabled, and now I’m getting movement at the station!

1 Like