scanberg / viamd

Visual Interactive Analysis of Molecular Dynamics
MIT License
275 stars 28 forks source link

Potential rendering glitch in i3 #40

Open svandenhaute opened 11 months ago

svandenhaute commented 11 months ago

I don't think this is an actual issue, and is probably more related to my own setup, but the performance of the 3D visualization (~speed with which the image follows my mouse movement when I rotate, for example) is heavily dependent on the size of the window. Is this entirely expected because he needs to render more pixels?

Also, I got some weird behavior when resizing the window: image

This could be super system-dependent, so if this is not worth looking into I'd totally understand.

inxi -Gxx:

Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell
    driver: i915 v: kernel ports: active: DP-4 off: eDP-1
    empty: DP-1, DP-2, DP-3, DP-5, HDMI-A-1, HDMI-A-2, HDMI-A-3
    bus-ID: 0000:00:02.0 chip-ID: 8086:9a49
  Device-2: NVIDIA GA102 [GeForce RTX 3080 Ti] vendor: ASUSTeK
    driver: nvidia v: 545.29.02 ports: active: none
    empty: DP-6, DP-7, DP-8, HDMI-A-4, HDMI-A-5 bus-ID: 0000:09:00.0
    chip-ID: 10de:2208
  Device-3: Sunplus Innovation Integrated_Webcam_FHD type: USB
    driver: uvcvideo bus-ID: 3-6:3 chip-ID: 1bcf:2ba0
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting
    unloaded: fbdev,nouveau,vesa failed: nvidia gpu: i915 display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96
  Monitor-1: DP-1-2 res: 3840x2160 dpi: 138 diag: 813mm (32")
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2)
    v: 4.6 Mesa 23.1.3-1pop0~1689084530~22.04~0618746 direct render: Yes

inxi -Sxx:

System:
  Host: pop-os Kernel: 6.5.6-76060506-generic x86_64 bits: 64 compiler: N/A
    Desktop: GNOME 42.5 tk: GTK 3.24.33 wm: i3 dm: GDM3
    Distro: Pop!_OS 22.04 LTS base: Ubuntu 22.04 LTS Jammy
scanberg commented 11 months ago

Hi @svandenhaute! Thanks for reaching out, It looks like this is a rendering artifact related to the temporal effects (motionblur + temporal aa) you could try to dissble those just to verify. As for the speed: we have not really tested this on any intel gpus, and there are some non-optimized screen space postprocessing effects which can be heavy. Very much so in the case of integrated GPUs. However, I saw that you also had an nvidia card available, I would recommend using that.

Best regards, Robin

svandenhaute commented 11 months ago

Good to know! I typically just use the Nvidia GPU for compute only, not for screen rendering. I suppose I cannot just tell viamd to use the nvidia one — it’s an OS-related setting?

scanberg commented 11 months ago

I'm not aware of any way to pick the device in OpenGL, (vulkan has explicit control over that I think).

This page mentions a solution where the user can prompt the application to use an nvidia device when starting the application:

https://support.system76.com/articles/graphics-switch-pop/

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <application>

Cheers!