This repository contains a script to batch-process a number of ShapeNet-style model files and create depth maps for each of them, from different positions along a circular path around the object.
The repository is intended not as a standalone application to use, but more as an learning tool to understand the whole process, including camera parameter concepts and how the Blender tool works.
- Install Blender.
- Use the
Pipfile
to download and install the required libraries. I recommend using Pipenv for this.
Run the following line of code:
blender -b -P render_images.py > /dev/null
(The /dev/null
part is to redirect Blender's output logs away from STDOUT
.The script's own logs are output to STDERR
.)
This file contains the main script. Essentially, it loops over every model contained in the ShapeNetMeshes
folder, and creates depth maps for each object from multiple viewpoints which are defined on a circular path around the object. These depth maps are stored in the RenderedImages
folder.
This file contains settings and parameters for the rendering process. It includes camera parameters and rendering parameters.
This file contains settings for each type of ShapeNet model file present in the ShapeNetMeshes
directory.
This folder contains all the model files which are to be processed. They are stored in a format compatible with ShapeNet's format.
NOTE: The models included in this folder are obtained from ShapeNet. As part of this repository, these models are licensed to be used only for non-commercial and/or educational purposes.
This folder will contain the rendered depth map images. The directory-tree structure is be akin to the ShapeNetMeshes/
structure.