Skip to content

Latest commit

 

History

History
158 lines (128 loc) · 4.78 KB

README.md

File metadata and controls

158 lines (128 loc) · 4.78 KB

Run the Blender Tookit

Render the 3D static scene

Before we start to render anything, the code will generate a giant number of footprints you may / may not keep track of. Be sure to set the folder at an appropriate place, and create symbolic link for the data directory.

Set the config

First, take a look at the blender/configs/config file. In the config file of STATIC_3D_SCENE part:

  • data_folder: this is where the data folder is.
  • input_path: this is where the raw data (default BundleFusion) is
  • tmp_path: the openexr files directly generated by blender.
  • output_folder: the processed outputs for the final data format.

and the output folder (the processed outputs for the final version), and the scene in the dataset, e.g. office3. The stride number is to control the keyframes sampled from the ground truth trajectory.

Render the 3D static scene

To generate the rendering of the 3D static scene:

cd blender
sh quick_run/render_static_scenes.sh

Run the parser script to generate the final outputs:

python parse_static_scene.py

This should generate the rendered outputs given the specific configuration.

To generate multiple keyframes of all BundleFusion dataset, run the all in one script:

# For the purpose of running the rendering in parallel 
# The blender path is default in my machine as:    
# BLENDER_PATH='~/develop/blender-2.79b'
# please set it to the correct path in your machine
python run_BunldeFusion.py

The final output Layout

An example of the final layout after running the scripts are:

data:
---- RefRESH:
-------- BundleFusion
------------ tmp  # temporary folder for blender output, will be cleaned
---------------- apt0
---------------- apt1
...
---------------- office3 # the scene names
-------------------- keyframe_1
-------------------- keyframe_2
...
-------------------- keyframe_10 
------------------------ Image{:6d}.exr # multipass_openexr 
------------ render # final output files
---------------- apt0
---------------- apt1
...
---------------- office3 # the scene names
-------------------- keyframe_1
-------------------- keyframe_2
...
-------------------- keyframe_10 
------------------------ depth
---------------------------- {:6d}.png 
------------------------ flow_forward
---------------------------- {:6d}.flo 
------------------------ flow_backward
---------------------------- {:6d}.flo 
------------------------ flow_vis_forward
---------------------------- {:6d}.png 
------------------------ flow_vis_backward
---------------------------- {:6d}.png 
------------------------ rendered_images 
---------------------------- {:6d}.png 
------------------------ invalid # the invalid region (depth not properly rendered)
---------------------------- {:6d}.png

Render the dynamic humans from existing 3D cameras

Set the config

  • data_folder: this is where the data folder is.
  • tmp_path: the openexr files directly generated by blender.
  • output_folder: the processed outputs for the final data format.

Render the dynamic humans

To generate the rendering of the 3D static scene:

cd blender
sh quick_run/render_humans_from_trajectories.sh

Run the parser script to generate the final outputs:

python parse_humans_from_trajectories.py

The final output Layout

data:
---- RefRESH:
-------- BundleFusion_dynamic
------------ tmp  # temporary folder for blender output, will be cleaned
---------------- apt0
---------------- apt1
...
---------------- office3 # the scene names
-------------------- keyframe_1
-------------------- keyframe_2
...
-------------------- keyframe_10 
------------------------ Image{:6d}.exr # multipass_openexr 
------------ render # final output files
---------------- apt0
---------------- apt1
...
---------------- office3 # the scene names
-------------------- keyframe_1
-------------------- keyframe_2
...
-------------------- keyframe_10 
------------------------ depth
---------------------------- {:6d}.png 
------------------------ flow_forward
---------------------------- {:6d}.flo 
------------------------ flow_backward
---------------------------- {:6d}.flo 
------------------------ flow_vis_forward
---------------------------- {:6d}.png 
------------------------ flow_vis_backward
---------------------------- {:6d}.png 
------------------------ rendered_images 
---------------------------- {:6d}.png 
------------------------ invalid # the invalid region (depth not properly rendered)
---------------------------- {:6d}.png

(Optional) Generate video clips

To preview the background images, we can use ffmpeg command to generate a video clip for background. An example command

ffmpeg -framerate 10 -i ../data/RefRESH/apt0/frame-%06d.color.jpg color.avi