Generation time, Render only Off vs On


#1

Hi there,

I’m currently testing the Skatter demo and writing a tutorial for using Skatter with Maxwell MXS references. Currently, The Maxwell plugin doesn’t support the “Render only” feature, and I think I misunderstood at first how this feature works, meaning the benefit it adds. I thought at first there is a difference in generation time using Render only, vs not using it.

But I guess the generation time itself is the same in both cases right? For example, turning on the Render only feature, scattering around 460 000 objects on a sandbox host, took around 15 minutes. This would take about the same time with “Render only” off, but of course it would take a few more seconds for the viewport to update, and you would have to put the skatter group in its own layer and hide it when working on other parts of the scene (with so many instances).

So I just want to make sure I’ve understood the generation time thing. “Render only” off or on, it’s the same?

If that’s so then that’s great :slight_smile: at least when using Maxwell and scattering referenced MXS files. Even with about half a million refs scattered, the export time is still fast. I also assign the skatter group to a layer and hide it, and set in the plugins render options to render also hidden layers. I only need to do this though if I have a lot of instances.


#2

15 minutes sounds like a lot!

Please try this :

  • Open the Ruby Console from the Window menu
  • Open Skatter then click Generate
  • Some text should appear in the Ruby Console, with timing of each step

Paste the text here so I can understand why it’s taking so long.


#3

Hi Thomas,

So I ran a few more tests, I wanted to compare Render only On vs Off using the Skatter library trees, and also Render only Off using MXS References. There is something strange going on with the time listed for view redraw and scatter objects when scattering MXS References, but only sometimes. Between these tests I always changed slightly the Spacing X,Y from 0.5 to 0.501 so that Skatter recalculates every time. So here are the Ruby console outputs (using Uniform distribution for all):

Render only ON, using Skatter library trees

---- Skatter 1.4.1 ----
Processing surface 3FHSgvjeL8Jgu80$1vSzQf
Sent surface to C++ : 0.284761 s
Generate points : 1.233459 s
Number of generated points : 4000079
Project points : 175.266652 s
Number of projected points : 3993105
Seed and def points : 5.548789 s
Scale points : 21.964394 s
Area points : 0.0 s
Number of areaed points : 3993105
Altitude points : 6.727894 s
Number of altituded points : 824286

Generate bounding boxes & transformations : 1.990293 s
Scatter objects : 7.98461 s
Total number of points : 824286
View redraw : 8.613987 s
Total : 223.802055 s
------ End ------

Pretty normal I guess, now with Render only OFF, same trees

---- Skatter 1.4.1 ----
Processing surface 3FHSgvjeL8Jgu80$1vSzQf
Sent surface to C++ : 0.77208 s
Generate points : 2.998946 s
Number of generated points : 3984151
Project points : 171.177285 s
Number of projected points : 3977187
Seed and def points : 7.329497 s
Scale points : 12.506259 s
Area points : 0.0 s
Number of areaed points : 3977187
Altitude points : 10.369555 s
Number of altituded points : 820965

Generate bounding boxes & transformations : 0.450197 s
Scatter objects : 6.072149 s
Total number of points : 820965
View redraw : 59.441201 s
Total : 267.197682 s
------ End ------

View redraw increased a bit but still ok, now with the MXS Refs scattered (Render only OFF)

---- Skatter 1.4.1 ----
Processing surface 3FHSgvjeL8Jgu80$1vSzQf
Sent surface to C++ : 0.518353 s
Generate points : 0.611657 s
Number of generated points : 4000079
Project points : 170.30792 s
Number of projected points : 3993105
Seed and def points : 2.92531 s
Scale points : 15.436476 s
Area points : 0.0 s
Number of areaed points : 3993105
Altitude points : 6.51405 s
Number of altituded points : 824286

Generate bounding boxes & transformations : 0.468746 s
Scatter objects : 7.155706 s
Total number of points : 824286
View redraw : 44.55144 s
Total : 243.539357 s
------ End ------

Again, about the same time. But now I decide to regenerate again just to double check (with the MXS Refs again).

---- Skatter 1.4.1 ----
Processing surface 3FHSgvjeL8Jgu80$1vSzQf
Sent surface to C++ : 0.283757 s
Generate points : 0.650287 s
Number of generated points : 3984151
Project points : 170.358151 s
Number of projected points : 3977187
Seed and def points : 5.914906 s
Scale points : 15.188384 s
Area points : 0.0 s
Number of areaed points : 3977187
Altitude points : 10.745605 s
Number of altituded points : 820965

Generate bounding boxes & transformations : 0.539434 s
Scatter objects : 701.708997 s
Total number of points : 820965
View redraw : 707.34287 s
Total : 913.77603 s
------ End ------

And for this second time, even though the nr of instances is almost identical, you can see how much the time increased, but what is strange is that it says both “Scatter objects” is now 701sec, AND view redraw is an additional 707sec, but then it lists the total time at 913sec…strange.

If I now check Render only again> regenerate> it’s fast again>I uncheck Render only> it’s fast again also. And now regenerate a second time also with render only off>it’s slow again.


#4

This is very strange. As it happens only when Render Only is Off, it sounds like an issue in SketchUp when Skatter tries to create Component Instances. Maybe SketchUp slows down when fed with too many instances at a time?
I’ve tried to reproduce the issue based on your testimony, but I can’t.
Did you experience this with other files? If not, would it be possible to send me this file?

Looking at my code again, this is because the “Scatter objects” timing is embedded in the “View redraw” timing. I’ll change that, but you don’t need to worry about it.


#5

Hi Thomas,

Sorry for the late reply, I tried to look at this again but my Skatter trial expired. I’m not really a Sketchup user, I was writing a blog post about using Skatter together with the Maxwell plugin. Would it be possible to send me another demo license of 1 week to finish the blog post? I can then also send you the scene I was using. You can send it to the email [email protected]


#6

I sent you an email.