[QGIS-Developer] QGIS 3D and Graphics Card Requirements

Martin Dobias wonder.sk at gmail.com
Sun Oct 15 04:08:56 PDT 2023


Hi Hannes


the two ridiculously expensive and high-end graphics cards mentioned by
> Luke sound like complete overkill. Surely reading and preparing the geodata
> for 3D display (from data providers, via storage, on the CPU?) would be the
> bigger performance/usability issue of the 3D views, right? I am sure that
> for reasonable reasons QGIS would choke waaaay earlier than what those
> cards would be capable of. The potential benefit of those cards for QGIS 3D
> definitely is not worth paying *1200-2500€* extra.
>
I have not had a chance to try QGIS 3D with such high-end cards yet, but
you're right, users would be probably hitting performance issues elsewhere
when working with large amounts of data (but this also depends on data
types, formats, styling etc.)


> Martin/Jean, is there any change that you could provide a more detailed
> specification of the hardware and software requirements for QGIS 3D? It
> comes up again and again and I've just been searching again without
> success. I step up to add it to the QGIS documentation in early November.
>
Okay, great, let me try... there are very few firm requirements for QGIS
3D, so it's hard to answer some of the questions exactly.


> Esri provides for example infos on the required OpenGL version and
> extensions on
> https://pro.arcgis.com/en/pro-app/latest/get-started/arcgis-pro-system-requirements.htm
>
> E.g.: What is the minimum amount of GPU RAM necessary? How does it scale
> with more complex 3D scenes and what happens if there is not enough RAM?
>
There's no strict minimum really, but I would say 1 GB GPU memory should be
enough for many use cases. When dealing with large amounts of 3D data -
e.g. point clouds or tiled scenes (3D tiles), it won't hurt to have more
memory, although with default settings QGIS probably would not go over 2 GB
GPU memory usage. All layers use tiling, so with increased distance of 3D
data from camera, there's less detail displayed, which limits GPU memory
usage and GPU processing power needed.

Each map layer gets up 500 MB GPU memory, but only few that are memory
intense (like point clouds or tiled scene) would normally use all of it.
When a map layer gets to the limit, it will unload data (that are currently
not being displayed) from GPU memory to get under the 500 MB limit. In the
QGIS release 3.34 it will be possible to configure the per-layer limit (and
QGIS 3D views will show a warning if the limit has been reached and none of
the tiles can be unloaded).

Does it get slow (maybe with a message) or does it crash?
>
Any slowness should be caused by displaying too many triangles/points in
the 3D view (or possibly there could be something in QGIS code that runs on
CPU that is slow and affecting 3D performance for example when the 3D scene
is getting updated as the camera moves, scheduling loads of tiles).

To be honest I don't really know what happens if there's not enough GPU
memory - in theory there could be crashes, or the scene would be just
missing some data - or maybe something else, like freeze. It is worth
trying - it may depend on the operating system and the graphical drivers as
well.

Which renderer does it use on which platforms (I guess always OpenGL?).
> Which OpenGL version is needed?
>
Yes it is always using OpenGL. Our 3D window requests OpenGL 4.3 core
profile. Shaders of materials that we use only need OpenGL 3.2 or 3.3.

I am not 100% sure how things are on Windows and macOS. Apparently, Windows
by default only provides very old OpenGL 1.1, and users need to install
dedicated graphics drivers to get more recent OpenGL. But Qt also comes
with ANGLE library (that translates OpenGL calls to DirectX) which can be
used as a fallback option, and there's also software rasterizer as a last
resort. There's even QT_OPENGL env variable to pick an option explicitly
[1]. I think QGIS 3D will not work with ANGLE though, because it uses
desktop OpenGL, not OpenGL ES which ANGLE is meant to support.

All this is related to Qt5 which has been very OpenGL-centric. In Qt6
things will be different again, because Qt departed from being
OpenGL-centric and embraced Direct3D, Metal and Vulkan, and introduced
their own abstraction on top of those APIs called RHI. (They also stopped
using ANGLE.) So in Qt6, Qt3D has two options - either use the new RHI
renderer (default) or use the existing OpenGL renderer. We use the latter,
because we would need to migrate our materials/shaders to be RHI
compatible, and also stop using some features that RHI does not support,
like geometry shaders. Given that QGIS does not support Qt6 officially yet,
this is not something to worry about too much for now, only something to be
aware of for the future.

Which extensions are needed?
>
I am not aware of any OpenGL extensions that we would need in QGIS 3D (I
may be wrong though).

Could missing extensions get logged prominently to the user to avoid the
> "my 3D canvas is white/blank" issue (I guess that is the reason) that often
> comes up?
>
Blank canvas may have multiple sources of problems - it could be that
OpenGL failed to initialize for some reason, or that the graphics driver
did not like something in our shaders or rendering pipeline or geometries,
or it could be even as simple as us misplacing camera in the initial zoom
and all the actual content is actually behind the camera.

For any of the issues with white/blank canvas we would need to investigate
them thoroughly - what kind of data and 3d symbology was used, what is the
OS, graphics drivers etc - I am sure we can get to the bottom of that with
enough effort. I would like to go through the existing tickets about 3D
issues and try to address those that can be replicated.

Which features depend on which extensions and what happens if they are not
> available?
>
As I said, I am not aware of any extensions that we could be using, but I
could be wrong...

Hopefully this helps a bit...

Regards
Martin

[1] https://doc.qt.io/qt-5/windows-requirements.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20231015/4e5b4da7/attachment.htm>


More information about the QGIS-Developer mailing list