- Generate path envs for LuisaCompute
- create
.envfile by copy.env.templatefile, and modify theLC_DIRandLC_XREPO_DIRto the LuisaCompute path on your machine xmake l setup.luato generatelc_options.generated.lua
- create
- Build
xmakelcgs-appwill be generated inbuild/<platform>/<mode>/lcgs-app.exeif successful, you may run it withxmake run lcgs-app --help
- Configure the project (CMake will download LuisaCompute for you so you don't need to set up the environment)
cmake -G Ninja -S . -B <build-dir> -D CMAKE_BUILD_TYPE=Release
- Build
cmake --build <build-dir>luisa-gaussian-splattingwill be generated in<build-dir>/bin/if successful
- Get the ply file from Release
- Run
- If you build the project with XMake:
xmake run lcgs-app --ply=<path_to_your_ply> --backend={dx|cuda|metal} --out=<dir_to_your_out_img>- e.g.
xmake run lcgs-app --ply="E:\ws\data\pretrained\gaussian\nerf_blender_chair_30000.ply" --out=E:/ws/data/mid/lcgs/ --backend=dx --world=blender - e.g.
xmake run lcgs-app --ply="E:\ws\data\pretrained\gaussian\mip360_bicycle_30000.ply" --out=E:/ws/data/mid/lcgs/ --backend=dx
- If you build the project with CMake:
<build-dir>/bin/luisa-gaussian-splatting --ply=<path_to_your_ply> --backend={dx|cuda|metal} --out=<dir_to_your_out_img>
- you can run with
--helpto get the help info - an extra optional arg is
--world, you can choose blender or colmap, the colmap scene has its default up vector (0, -1, 0) and the blender scenes assuming up vector (0, 0, 1). we assume colmap by default. - then you can check
<dir_to_your_out_img>with<ply_name>_<dx/cuda...>.pngfor the result, e.g.mip360_bicycle_30000_dx.png
- If you build the project with XMake:
You can run the app with --display=true to enable interactive display. You can use the following controls:
W/S/A/Dto move the camera forward/backward/left/rightEscto exit the app- Drag the mouse with the left button to orient the camera
- Drag the mouse with the right button to rotate the camera around the center
- Mouse wheel to zoom in/out (change the field of view)
- Tweak the sliders on the GUI panel to adjust the camera move speed, rotation speed, and field of view.
不同后端实现效果对比
- 当前的camera的初始位置是写死在代码里的,你可以在
app/main.cpp中找到pos和target设置你想要的相机位姿,后续会暴露到配置中 - 当前只有前向计算的代码,没有反向
- 并行原语的实现比较粗暴,有提升效率的空间,也可能会有隐藏的bug,需要更多测试


