hyperlogic / splatapult

A 3d gaussian splatting renderer in C++ and OpenGL
MIT License
89 stars 12 forks source link

Question about render result on different PC #6

Open oUp2Uo opened 6 months ago

oUp2Uo commented 6 months ago

Hi, I tried to run the same program with the same ply on 2 different PC (one using NV graphic card, another using AMD) And I found the display result is quite different. (running in window and than maximum the window, than take the screenshot)

NV (GTX 1050): cap_nv AMD (Z1E): cap_amd

The NV PC has even high desktop resolution than AMD PC.

It seems that NV render result is quite better than AMD. Do you have any idea about this?

Thank you.

hyperlogic commented 6 months ago

Interesting, not sure what could be happening here. Can you run splatapult with the -d flag and paste the result here? It looks like the sort isn't working properly, which could mean something was wrong with the compute shader... Or it could be due to a low resolution z-buffer. Anyway, paste log into this issue and I'll take a look. (btw, cool scan)

hyperlogic commented 6 months ago

I'm able to reproduce this on Intel integrated graphics. Looking into it.

hyperlogic commented 6 months ago

I think I've fixed this with commits 1274e51 and 93085f3, can you re-download the zip file and try it again on AMD?

oUp2Uo commented 6 months ago

Still not correct on AMD now, getting the same result. -d log is:

[DEBUG] Could not find cameras.json
[DEBUG] Could not find
[DEBUG] Could not find input.ply
[INFO] Found joystick "Xbox 360 Controller"
oUp2Uo commented 6 months ago

And here is bullet time video of the model, hope you like it :) Althogh the render result is not very good... https://www.youtube.com/watch?v=1tVV-ZOnxxY

hyperlogic commented 6 months ago

Leaving this open, until I can get access to an AMD gpu.

oUp2Uo commented 6 months ago

I have tried to add GL_DEBUG_OUTPUT like this link: https://www.khronos.org/opengl/wiki/Debug_Output And I got some log.

On NV GPU (the similar message goes on all the time):

GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 28 (bound to GL_ATOMIC_COUNTER_BUFFER, and GL_ATOMIC_COUNTER_BUFFER (4), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 28 (bound to GL_ATOMIC_COUNTER_BUFFER, and GL_ATOMIC_COUNTER_BUFFER (4), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 23 (bound to GL_SHADER_STORAGE_BUFFER (0), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 23 (bound to GL_SHADER_STORAGE_BUFFER (0), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 21 (bound to GL_SHADER_STORAGE_BUFFER (1), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 21 (bound to GL_SHADER_STORAGE_BUFFER (1), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.
GL CALLBACK:  type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 22 (bound to GL_SHADER_STORAGE_BUFFER, and GL_SHADER_STORAGE_BUFFER (2), usage hint is GL_DYNAMIC_DRAW) will use VIDEO memory as the source for buffer object operations.

On AMD GPU, no error printing.

oUp2Uo commented 6 months ago

Today I have a VR test on PICO 4 with 3070, it also comes the render problem, just like on AMD GPU.

I guess is there any bug in sorting? When using VR, the fps is low, and the problem seems to be obvious. When fps is high, we could hardly see the twinkling.

hyperlogic commented 6 months ago

w.r.t. twinkling, It's hard to say if this is a bug or just inherent in the splat rendering algorithm. In desktop if you're not using the movement keys the camera is stationary. However, in VR your head is never truly stationary. Even small angle changes in your head will cause drastic changes in splat rendering order, especially when looking perpendicular to a flat surface like a wall. As you say, the "twinkling" is more noticeable when the frame rate is low.

If it's not too much trouble, can you make an video capture? This would help me identify the issue. Also, there was recently a fix for VR rendering format. Could you re-download the zip again. Thanks.

oUp2Uo commented 6 months ago

I have rebuild with the latest code yesterday, so I think the fix should be contained. Actually I do not have a VR device, and I just wanted to see the VR feeling so I went to a friend's home yesterday for this. I will try to record a video when the next time I go to his home.

Btw, I could record the "twinkling" on AMD GPU the day after tomorrow.

oUp2Uo commented 6 months ago

Here is the video running on AMD.

https://github.com/hyperlogic/splatapult/assets/29222415/e997b1ac-ff4a-4015-8486-b84cf3d9daa1

hyperlogic commented 5 months ago

Hi, I think I have a fix for this problem. Could you try the latest zip file to see if it fixes the issue. Also, It might render a bit faster, I've integrated a new sort algorithm.

oUp2Uo commented 5 months ago

Hi, I have tried the latest version, and now having these error.

[ERROR] shader compilation error for "shader/multi_radixsort.glsl"!
[ERROR] ERROR: 0:24: 'descriptor set' : only allowed when using GLSL for Vulkan
ERROR: 0:24: '' : compilation terminated
ERROR: 2 compilation errors.  No code generated.

[ERROR] Failed to compile compute shader "shader/multi_radixsort.glsl"
[ERROR] Error loading sort compute shader!
[ERROR] Error initializing splat renderer!
[ERROR] App::Init failed

On NV platform run well, and faster than the last version.

hyperlogic commented 5 months ago

Re-opening, It looks like the new compute shader for sort is failing on AMD. I'll try getting my hands on a AMD video card and fix this issue. Thanks for testing this!

hyperlogic commented 5 months ago

I was able to get a hold of an AMD Radeon RX 6600, and verified it runs now. Can you try downloading the zip file and test it again.

Much appreciated

oUp2Uo commented 5 months ago

Printing result changes a bit, but still could not work. Here is the log.

[ERROR] shader compilation error for "shader/multi_radixsort.glsl"!
[ERROR] ERROR: 0:82: 'id' : argument must be compile-time constant
ERROR: 0:82: '' : compilation terminated
ERROR: 2 compilation errors.  No code generated.

[ERROR] Failed to compile compute shader "shader/multi_radixsort.glsl"
[ERROR] Error loading sort compute shader!
[ERROR] Error initializing splat renderer!
[ERROR] App::Init failed
hyperlogic commented 5 months ago

Hmm, I don't get that issue on my AMD Radeon RX 6600, which AMD card do you have? Can you try updating the driver?

oUp2Uo commented 5 months ago

I am testing on ROG Ally, which CPU+GPU is AMD Ryzen™ Z1 Extreme. https://rog.asus.com/gaming-handhelds/rog-ally/rog-ally-2023/spec/ And all the drivers are latest.

jiangw425 commented 4 months ago

Hello! I'm testing the latest version and get the same err log as oUp2Uo, I'm working on win11 and my CPU is AMD 7735H, GPU is 680M(integrated graphic)