BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
22.78k stars 3.39k forks source link

Improve GaussianSplatting for VR #15109

Closed CedricGuillemet closed 3 weeks ago

CedricGuillemet commented 1 month ago

Potential improvement for rendering quality and Gaussian Splatting. See https://forum.babylonjs.com/t/gaussian-splats-rotate-incorrectly-in-vr/50256/41

Current quality:

image

potential improvement:

image

I believe it's a small fix related to viewport and focal computation. I could find a fix that worked with a VR rig locally but it doesn't work on real device (no idea why).

Check this as a starting point:

https://github.com/BabylonJS/Babylon.js/blob/bf55ce26227a4fb5285e817daeb8848095d996b5/packages/dev/core/src/Materials/GaussianSplatting/gaussianSplattingMaterial.ts#L219

CedricGuillemet commented 1 month ago

with https://playground.babylonjs.com/#45KYTJ#44 changing the fov from 1.6 to 2.2 helps having better rendering. a high value results in smaller splats up to a single point.

RaananW commented 1 month ago

This should also be checked in VR headsets, as the quality there is better than the first image. I will be happy to help with that