- Generate path envs for LuisaCompute
- create
.env
file by copy.env.template
file, and modify theLC_DIR
andLC_XREPO_DIR
to the LuisaCompute path on your machine xmake l setup.lua
to generatelc_options.generated.lua
- create
- Build
xmake
lcgs-app
will be generated inbuild/bin/
if successful
- 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-splatting
will 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>
- 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>
- 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. - e.g.
xmake run lcgs-app --ply="D:\ws\data\pretrained\gaussian\nerf_blender_chair_30000.ply" --out=D:/ws/data/mid/lcgs/ --backend=dx --world=blender
- e.g.
xmake run lcgs-app --ply="D:\ws\data\pretrained\gaussian\mip360_bicycle_30000.ply" --out=D:/ws/data/mid/lcgs/ --backend=dx
- then you can check
<dir_to_your_out_img>
with<ply_name>_<dx/cuda...>.png
for 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/D
to move the camera forward/backward/left/rightEsc
to 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,需要更多测试