- 2023-03-10:
- Currently, it is compatible with mitsuba3.
- Support GIF recording for moving views or points.
pip install -r requirements.txt
- point cloud format: the extension is
npy
(saved by numpy ), storing a list of [x,y,z,...]. - coordinate definition:
- left: x
- up:z
- screen facing out: y
python scripts/once.py \
-f workspace/demo/car.npy \
-o ./workspace/demo/results/car_single \
--format xyzi \
--color_by i --color_normalize \
--pose 0 0 0 0 0 -180
--preview
arguments:
- -f: path to input point cloud
- -o: path to output image
- --format: the format of the given point cloud, e.g., xyz/xyzi/xyzrgbs/...
- --color_by: which data field is used to render colors when the point cloud file does not provide rgb field for each point.
- --color_normalize: normalize color_by
- --pose: the pose [x y z r p y] of the given points (in degrees).
- --preview: for quickly rendering.
besides, you can modify the config file config.yaml
to adjust the size of images or other parameters of the renderer:
- sample: sample per pixel, the higher, the better rendering quality.
python scripts/anim_obj_axis.py \
-f workspace/demo/car.npy \
-o ./workspace/demo/results/car_rot_z \
--pose 0 0 0 0 0 -180 \
--axis 3 0 360 5 \
--fps 15
arguments:
- -axis: [axis order(x:1,y:2,z:3), begin, end ,interval]
- -fps: the frames per second for gif animation.
python scripts/anim_obj.py \
-f workspace/demo/car.npy \
-o ./workspace/demo/results/car_rot_z \
--pose 0 0 0 0 0 -180 \
--pose_file ./workspace/demo/poses.txt \
--fps 15
python scripts/anim_view.py \
-f workspace/demo/car.npy \
-o ./workspace/demo/results/car_views \
--pose 0 0 0 0 0 -180 \
--view_file ./workspace/demo/views.txt \
--fps 2
arguments:
- --view_file: store a list of (camera_x,camera_y,camera_z,target_x,targe_y,targe_z)
- The official reference link is given inline the code about scene definition.
- Edit the scene: ref
- for more properties of plugins please refer this link.
This script deeply based onMitsuba2PointCloudRenderer and PointFlowRenderer and is an easy-to-use version.