3DGS-Snapdragon is a 3D Gaussian Splatting renderer. It's a modification of 3DGS.cpp changed to run inside an Android app to be compatible with the Snapdragon 8 Gen 2 chip.
- Android Studio 4.2+ with NDK bundle.
- CMake
- A physical Android device (we have only tested this on the OnePlus12R mobile phone, which has a Snapdragon 8 Gen 2 SoC).
git clonethis project- Launch Android Studio.
- Open the cloned directory.
- Open File/Project Structure...
- Click File/Sync Project with Gradle Files.
- Then, add the .ply file you want to render in the
assets/directory (/app/src/main/assets/). You can have multiple scenes and can switch between them in app when running indebugmode. - Click Run/Run 'app'.
Android Studio allows you to select between the different build variants we've configured.
The debug mode will display realtime pipeline stage times and allow you to swap between multiple scenes in-app.
The profiling mode collects these pipeline stage time metrics and store it to a file. To retrieve this collected data on your local machine run:
adb shell cat /data/data/com.android.hellovk/files/data.txt > data.txt
If you are building the app on windows, you likely have to manually compile the C program that CMake uses to compile the shaders. To do this run:
cd app/src/main/cpp/cmake
bash compile_embedfile.sh
This should generate an executable named embedfile in this cmake directory for your CMake to use.
You may have to specify the location of your cmake download in local.properties.
Under cmake.dir specify the directory to your cmake download without the /bin/cmake part of the path.
So, if your cmake is installed at /opt/homebrew/bin/cmake, have cmake.dir as /opt/homebrew/
We use the Snapdragon Profiler to profile the app.
When using it, some profiling features (System Trace Analysis) will crash if the ValidationLayers are enabled.
Thus, make sure to set useValidationLayers to false in main().