V6 Goal: Display Performance

This might be the correct place to ask [though not necessarily the right time :wink:].

The top-of-the-notch (at least 6 years ago) GPU on my home PC fried and I have been holding off replacing it pending development of RH6.

First off, I basically don’t know what I’m talking about - bottom line is only a RH6-safe GPU recommendation :smiley:

I see that there is more to display than just the GPU… But as drivers appear to be an issue, will the display engine continue to run on OpenGL 2(?) calls only? I guess Neon runs on something else and Cycles apparently does CUDA and OpenCL…

I don’t believe so. The transparency bug should be unrelated to the rewrite of text dot display.

I don’t really think this is the correct place to discuss this topic. Jeff is working on using features available in OpenGL 4, but that still doesn’t give me any good way to give advice on a card to purchase.

1 Like

That’s fine. Thanks for the feedback! There’s no rush on my part.

The next build (due out today or tomorrow) will no longer have the TestNewDotDisplay command. I tore out all of the old dot drawing routines and now have everything piped through this new function. There may be some bugs, but I’m pretty confident this is going to be a better way to draw text dots in V6 so there is no reason to keep the old code cluttering up the place.

1 Like

@Goswin and @charlie_portell I would be interested to know if your models with large numbers of text dots perform better in the V6 WIP.

Hi Steve, I made a simple test to compare this and on my laptop V6 is 15X faster than V5!

V5: 23.95 seconds
V6 1.56 seconds

So keep on hacking!
PS, if they are selected in V6 it is a bit slower, 1.92 seconds.
Oh and PPS! V6 died when I tried to run 100x100 items.

Here is the test:

import rhinoscriptsyntax as rs
import time
n=30

rs.CurrentView("Perspective")
strView=rs.CurrentView()


rs.EnableRedraw(False)
for i in range(n):
    for ii in range(n):
        rs.AddTextDot(str(i)+","+str(ii), (i,ii,0))
rs.EnableRedraw(True)
rs.CurrentView(strView)
rs.ZoomExtents(strView)
rs.Sleep(1)

rs.Command("_TestMaxSpeed")

By ‘died’, does that mean V6 crashed? My current caching scheme is not smart enough to place any sort of sane caps on what to store, so if Rhino is crashing it is probably because I’m just dumping too many tiny textures on the card.

Your test is the worst case scenario in that none of the dots share the same text. Does Rhino die if you run 100x100, but all with the same text?

rs.AddTextDot("hello", (i,ii,0))

Yes, “died” means crash, badly. Screen flickering and Rhino not disapperaing. Crash report pops up.

If I use “hello” then it still crashes, so I’ll check how many items the machine handles, the ram use is fine. The card is a GeForce 330M with 512MB Vram.

Hm, it crashes after a few runs no matter if I use “hello” or custom text. I can run ut at 60x60 items, but only two times as it crashes on the third. So can the “undo stack” keep stuff in the Vram that uses it up?
I wonder because the test runs fast the first time, then the next run is slow to generate, it spins fast, but takes time to precalculate. And the third run is even slower and crashes.

1 Like

Probably a dumb bug in my code; I’ll try to reproduce this on my computer

Edit: yep, this was just a dumb bug. It will be fixed in next week’s build.
Thanks for setting up this test case.

1 Like

Hi Steve, I ll be happy to test it. But it will only be in a week since I am on holidays without PC now. Where can I get Rh6 ?

stevebaer

August 13
@Goswin and @charlie_portell I would be interested to know if your models with large numbers of text dots perform better in the V6 WIP.

To respond, reply to this email or visit V6 Goal: Display Performance in your browser.

http://www.rhino3d.com/download/rhino/wip

You may want to wait until the next build is released since there is a bug in the current build that @Holo found related to large numbers of dots on the screen. The next build will probably be available on Aug. 20

Hi @stevebaer I just tried the script on my i7 Quadro 4000 workstation and got these results:
V5: 15.79 sec
V6: 1.40 sec

I look forward to test the “bug free” version next week, as I crashed the WIP on this system too.

Steve, i can’t see a link to Rh6 WIP on that website. Am I blind? ( I opened it only on my iphone)

stevebaer

August 13
Goswin said:
Where can I get Rh6 ?

http://www.rhino3d.com/download/rhino/wip

You may want to wait until the next build is released since there is a bug in the current build that @Holo found related to large numbers of dots on the screen. The next build will probably be available on Aug. 20

To respond, reply to this email or visit V6 Goal: Display Performance in your browser.

It’s there, try on your PC.
It probably uses Flash or some other thing Apple finds offensive :wink:

The next build will draw at the same speed for dots, it just hopefully won’t crash :smile: I wasn’t properly disposing of Window’s resources when generating the text for the dots.

I think that is about all I’m going to put into Text Dots for now. I’m going to try and get some point cloud improvements in for next week’s build and will write some notes up about that soon.

1 Like

Progress Report (Aug 15, 2014)

This week I spent my time cleaning up the new caching code that I’ve been working on and making it generic enough to handle different object types. One of the goals for my new caching system is to make this work for objects that are also NOT part of the Rhino document. In other words, display conduits can use these caches to draw. I think I can get to work automatically in RhinoCommon which will mean that the preview in Grasshopper will get a speed bonus without @DavidRutten having to change a single line of code. This hasn’t been implemented yet for RhinoCommon, but I plan on testing this when I start working on caches for geometry that Grasshopper draws (curves, breps, meshes…) C++ developers will have to adjust their code only slightly in that they will need to pass cache classes to their “draw” functions. I’m just jotting down thought on where I want to progress with the caching system, so no promises yet :smiling_imp:

After text dots, I focused on point clouds this week. Point clouds are dramatically different from text dots which let me make sure my caching architecture can handle all sorts of geometry.

In the next build (probably Aug 19, 2014), point cloud display performance has been improved in two ways:

  • Point cloud vertices, colors, and normals are loaded on to the graphics card memory as vertex buffer objects (VBOs). These VBOs are drawn instead of streaming this information to the card each frame. I’m guessing that the better GPU you have, the better performance you are going to get out of point cloud display.
  • For large point clouds (currently >400,000 vertices), we draw only %25 of the vertices during dynamic panning and rotating. All points are drawn when the display is still. We can get fancier at degrading if we need to in the future, but this is a simple enough start to see if it will work for users.

You can test the difference between V5/Serengeti drawing techniques with the “TestNewPointCloudDisplay” in the next build. I have the new Serengeti style drawing on by default. I’ll most likely rip this command out of Rhino after a week (and all of the legacy code that this command runs.) It is just there for now in case I broke something bad.

2 Likes

This sounds great Steve!

And I hope the ultimate goal is to speed up files like this nested block file from this post: Graphics performance with very large 3dm files

Hi Steve,

some problems with the new annotation dot display encountered:

  1. AA is disabled
  2. Draw some Annotation dots (they display fine)
  3. Enable AA, display is not correct:

happens with a AMD Radeon HD7970, most recent driver.

Btw. Is it possible to make the depth and order testing to act permanently, i mean that it happens before mouseup ?

c.