Using Rhino Materials for Custom Preview is very slow

Hi everyone,

I’m assigning a Rhino material in GH using the Custom Preview component. The material in question is using a simple 512 px texture, so really nothing special. When modelling in Rhino with this I can use rendered view on my (modern) laptop with hundreds of instances assigned and it runs well.

However, once the material is assigned in GH, Rhino (in rendered view) starts to get stuck for several seconds EVERY time the GH definition is updated in any way. That means, when I add a component on the canvas, when I connect a component, it doesn’t really matter. Every time something happens in GH, Rhino gets stuck for about 10 seconds. After that hickup, I can easily navigate in rendered view again, and everything is fluent. However, working in GH becomes impossible. It doesn’t matter if I use VRay or Rhino renderer.

Any idea what could cause this delay?

/edit: more interesting observations:

  • Switching between VRay and Rhino renderer causes no delays
  • When changing a texture in Rhino, GH doesn’t update that and I have to reload or update the definition
  • Switching between view modes also causes no delay

It’s probably a delay in the part of the code where Grasshopper hands over the meshes+materials to the Rhino display. Somewhere in there a lot of copying is going on or maybe caches are getting rebuild unnecessarily.

Can you upload GH and 3DM files that replicate this problem? We’ll have to profile it to see if we can find the bottleneck.

I won’t be at my desk a lot for the next week, so I logged this under RH-47096 lest it gets lost.

Hi David,

Thanks for your answer. I have replicated the problem in a simpler definition, and uploaded the files with textures here:

Even with local files it takes about 10 seconds the first time I switch to rendered view.

Thanks, I’ve added them to the YT report. We’ve moving into new offices next week so I won’t be able to dig very deep until we’re settled.

Hi David,

Have you had any luck with this.
When assigning material about 300 points I get a delay time of about 40seconds.

Best regards