Ver. 5 3D very slow

No way OpenGL rendering can take so long, not even without hardware acceleration. There’s something wrong.

Intel HD graphics often cause problems, and seem to struggle with OpenGL. I think they are what are called “entry level”, ie cheap/low performance. But this sounds like there is a driver bug, which may be related to Win 10 updates. https://github.com/vispy/vispy/issues/1318

I don’t know if you have the option to upgrade video drivers on Win10, but I would look into that.

in almost three year since 3d viewer has come out, this is the first real user case issue I’ve seen reported to the forum…
would you mind to post your OS, kicad full version details and Graphic card model and drivers…

Eventually this may have to be reported to kicad bug list.

I have a Win10 Intel I5 laptop and 3D rendering in OpenGL mode is very fast. This one sounds like a bug or maybe wrong/missing driver

Yes, probably a bug, but I5 is probably a lot faster than 2GHz Celeron! I’ve used some low end kit, and it is ok for general office/browsing, but struggles with anything else. I admit this is a problem I prefer to throw money at, I have a water cooled graphics card… Not everyone needs that, but even a cheap graphics card can perform way better than a builtin graphics. It doesn’t help that the builtin graphics often have buggy or poorly supported drivers.

Yes, I think there is something to with an interaction with my system. I just did a clean installation of the Mar. 23 nightly on another machine, an Intel i7, 2.8GHz laptop. I moved the same project there and it renders the 3D view in some 10 seconds or so. Unfortunately the monitor is not as nice! But maybe do my 2D layout on the system with the nice monitor and move the project to the other machine for 3D viewing.
It is interesting- the slow machine is a Celeron, 2GHz with 8GB RAM. The fast one is an i7, 2.8GHz with 16GB RAM. The fast one renders in 10 seconds, the slow one around 3 hours.
I wonder if it could be disk access speed?

Incidentally, the 3D view on the fast machine is magnificent!!! I have never used a 3D viewer with PCB layout, and this project is fairly complex with mixed SMT and THT, with large transformers, heat sinks etc. Being able to see clearances, and think about getting a scope probe in is truly fantastic.

Hi Gordon,
something is not ok or need some clarification with your situation.

  • When you mean “render” do you mean “loading 3D viewer first time to see the board” or do you mean “refresh rate for update a new view by mouse movement”?

  • How long does it take to open an empty board on 3D viewer?

  • If it takes 90s to preview a footprint then something is wrong.
    It may be some bug on Windows/drivers as it was described latter or
    from your description it sounds that you are using extreme complex (I mean over complex for the proposes).

First I suggest to make sure it works with no problem with an empty or with no 3D shape board. You should be able to open on any system with or without GPU drivers very fast ~1s

Then if it is OK let have look on your models. Are you able to share with us?

Are you using STEP files directly? It may be that the models are too complex and are creating huge representations.
I suggest if it is the case that you using StepUp (by @maui) using FreeCAD and explore the export options to WRML and see if you can simplify the model (making the result file smaller)
EDIT: you should do it for the most complex models. You can evaluate the size of the WRML. A WRML file with more than 1MB starts to be complex (special if you use a lot of components).

The hardware specification should not be a problem (but OS and Drivers may be)
I developed 3D Viewer without GPU drivers and it is using OpenGL specification that is compatible with graphic boards older than 10 years.

Do not give up on 3D Viewer as it should be very useful for MCAD visualization!

1 Like

Not possible I think, that’s a ~x3000 difference. Also, it would affect all other applications. However, if RAM is full then that can lead to a lot of disk swapping which kills performance. You can monitor CPU, RAM and disk in the Performance Monitor, that might give a clue where time is going.

Quick googling suggests a driver bug where a particular OpenGl timeouts after 5 seconds instead of returning in a few ms, that would be a problem…

Okay, thanks for all the suggestions! Here are some observations.

All my models are wrml, I use the export feature from FreeCad, it seems to work very nicely, even the colors are correct.

What I mean by render is the first time I click on 3D View, or if I click on any of the tabs in 3D View (Setup, Preferences etc.). Once the board is visible, I can rotate it, zoom in or out just fine. If anything has to be regenerated I get the spinning wit wheel…

Blank board- it is very fast, less than a second to see in 3D. To do this I created a “Test project” and went immediately to PcbNew (did not click on EESCHEMA).

I added one component, a Keystone test point. The wrl file is 358kB. It then takes 9 seconds to see 3D view. I added a second test point, it now takes 18 seconds. With a third one, it is around 27 seconds. Times were by looking at the clock on another PC, so not highly accurate.

Most of my wrl files are less than 1MB. I have one, for a RM12 pot core, that is 5.5MB. I use this component twice in my project.

So it is pretty clear that the issue is just the cumulative time to load all the parts. My project is large- more than 100 resistors, more than 60 capacitors, 20 SMT ICs etc. So even if each of these takes only 10-20 seconds to be added to the 3D view, I can see that the time will add up!

The processor is a Celeron CPU, J1900 @ 1.99GHz. 8GB of RAM installed. Windows 10 Pro, 64 bit. Updates are current. Computer is an Acer.

All of this was with the nightly build from March 24, 2018.

For the same test point, it takes also around 9-10 seconds to show the 3D view from the Footprint Editor.

I monitored the CPU usage and RAM in the performance monitor. CPU is around 7-18%, Memory around 3.9GB, so about 50%. This while the 3D view is being generated. Actually the amounts stay pretty much the same no matter what is going on.

Yes, I agree, the 3D view is an important tool, now that I have a taste of it on my faster machine, I really am addicted!

Hi Gordon,
Thanks for your issue details!

So this sounds to be a 3D model load issue, still, there is something very stranger.
Could you share that WRML file of the test point with us and perhaps a test project ?
I will test on similar setups.

So nothing wrong with the render but something with loading the 3D models; Render is the process of translate data into visuals to the screen (or image file) and you can do it at interactive rates.

1 Like

Surely it doesn’t reload/parse the file for every instance?

It shouldn’t reload/parse the original file for every instance.
Actually, after the first time it parses the original file, it should create a cached file (so it will load faster next time).
All other instances are not duplicated (reloaded) so there shouldn’t be nothing to load at all again.

Unless… they (KiCad developers) broke something recently or there is any other bug somewhere else.

Still, 9 seconds is a lot, even for the first time it reads a small file, that why I would like to test it myself.

KS5007_white.wrl (357.1 KB)
KS5007_white.kicad_mod (1.2 KB)
I think I have uploaded the files for the test point. I have never uploaded to this forum before, so I hope it works. The test project was trivial- I just opened a blank board and placed the part.
I will be interested to hear how it goes!

1 Like

It is besides the point of this but 357kB is a bit much for such a simple model.
If your files are designed using freecad (you mention it up in the first post so it might be the case) you can use the kicad stepup workbench designed by @maui to export the wrl files. (This creates better files then the standard wrl export supplied with freecad)

Just as an example this is a much more complex part from the official lib:
Molex_PicoBlade_53398-1071_1x10_P1.25mm_Vertical.wrl (92.2 KB)

It might also be that the model has some problems. It looks a bit odd to me. This is how it looks in freewrl viewer. (Is it intended that there is nothing inside the cutout of the large cylinder?)

2 Likes

Thanks Gordon.
I just installed latest nightly build and tested on a Windows 10 Pro 64 bit build 1709 on a i5 4278U and I cannot experience the issue
There is a small hit delay the first time it loads the model ( <1s ) then after that it reloads without any noticeable delay. ie: 3D Viewer reports 0.013s for load a board with 3 footprints with the model.

Did you use the 64bit Kicad version?

Version: (5.0.0-rc2-dev-301-g33f795be4), release build
Libraries:
wxWidgets 3.0.3
libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.60.0
Curl: 7.54.1
Compiler: GCC 7.1.0 with C++ ABI 1011

2 Likes

I made something similar in FC and exported to wrl using StepUp…
dimension is 32K compared to 358K
would you mind to test the rendering with this model?
test_point.wrl (31.2 KB)
and the FC model
test-point.FCStd (59.1 KB)

I remember that kicad doesn’t like much a wrl exported from Fc if the view is not ‘Shaded’

2 Likes

Maui- thanks. I downloaded it and made a footprint for test. BUT, I also downloaded the latest nightly build (Mar-27-2018). (I don’t want to give results based on older builds). Now everything loads very fast. Even my large project which took >3 hours to render in 3D view now shows up in a couple of seconds! I rebooted my PC etc. just to make sure all Windows updates were current (none were applied as far as I could see). So my assumption is that something dramatic was done in the latest nightly?
I have to get on with my project, so I might go back later when I have to the older version for comparison, but right now I am excited that I can make progress!
Many thanks to all the posters and to the developers. I suppose the difference in performance might still be due to some interaction with my system, but the difference observed with the latest nightly is simply amazing. I will watch and see how it goes.
By the way, yes, I left out some parts of my test point because they were unimportant for board layout, and also because I am still a novice with Freecad, and find complex parts challenging.
I have not used Stepup, I guess I will have to look into it if it produces smaller wrl files. I was just happy that the export feature in FC gave such great results in Kicad.

Nice, it works as it should!

I gave a quick look on the latest commits on the source code and I couldn’t find anything that may be related.
It may also be related with the KiCad installation package (eg: embedded 3rd part libraries, different versions?)
Or something with the OS or drivers…
If you have a chance, you can test an older version of KiCad and see if KiCad was the cause or OS/drivers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.