forked from xxlong0/Wonder3D
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17dd457
commit 0358a12
Showing
10 changed files
with
1,240 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Prepare the rendering data | ||
|
||
## Environment | ||
The rendering codes are mainly based on [BlenderProc](https://github.com/DLR-RM/BlenderProc). Thanks for the great tool. | ||
BlenderProc use blender Cycle engine to render the images by default, which may meet long-time hanging problem in some specific GPUs (like A800, tested already) | ||
|
||
` | ||
pip install -r requirements.txt | ||
` | ||
|
||
## How to use the code | ||
Here we provide two rendering scripts `blenderProc_ortho.py` and `blenderProc_pinhole.py`, which use **orthogonal** camera and **perspective** camera to render the objects respectively. | ||
|
||
### Use `blenderProc_ortho.py` to render images of a single object | ||
` | ||
blenderproc run --blender-install-path /mnt/pfs/users/longxiaoxiao/workplace/blender | ||
blenderProc_ortho.py | ||
--object_path /mnt/pfs/data/objaverse_lvis_glbs/c7/c70e8817b5a945aca8bb37e02ddbc6f9.glb --view 0 | ||
--output_folder ./out_renderings/ | ||
--object_uid c70e8817b5a945aca8bb37e02ddbc6f9 | ||
--ortho_scale 1.35 | ||
--resolution 512 | ||
--random_pose | ||
` | ||
|
||
Here `--view` denotes a tag for the rendering images, since you may render an object multiple times, `--ortho_scale` decides the scaling of rendered object in the image, `--random_pose` will randomly rotate the object before rendering. | ||
|
||
|
||
### Use `blenderProc_.py` to render images of a single object | ||
|
||
` | ||
blenderproc run --blender-install-path /mnt/pfs/users/longxiaoxiao/workplace/blender | ||
blenderProc_persp.py | ||
--object_path ${the object path} --view 0 | ||
--output_folder ${your save path} | ||
--object_uid ${object_uid} --radius 2.0 | ||
--random_pose | ||
` | ||
|
||
Here `--radius` denotes the distance of between the camera and the object origin. | ||
|
||
### Render objects in distributed mode | ||
see `render_batch_ortho.sh` and `render_batch_persp.sh` for commands. | ||
|
Oops, something went wrong.