Skip to content

How to create a new Model Stage

Daniel Lopez edited this page Apr 4, 2021 · 1 revision

How to create a model stage

This example uses the blender/models/curve-skeleton-cube.obj found in the template

Create a new entry in config.yaml that consists of a few things:

models:
  cool_cube:                                             # name of the obj
    obj_file: 'blender/models/curve-skeleton-cube.obj'.  # obj file
    render_output: 'imgs/out/models/'                    # where to output renders
    scaling_factor: 1                                    # how big should it be, default (1)
    remove_doubles: true                                 # for overlapping verts, default (false)
    edge_split: false                                    # for overlapping edges of different polygons, default (false)
    depth_scale: 1.4                                     # (update me) default (1.4)
    color_depth: 8                                       # (power of two, update me) default (8)
    format: PNG                                          # output format default PNG
    video: false                                         # will this be a video? default (false); if true, `format` must be compatible and rotation_iteration will be 5 sec rotation at 30 fps (150)
    resolution: 600                                      # used for both axis for square pic; default (600)
    rotation_iterations: 30                              # how many are turntable shots? (default 6)
    include:
      - color # default only one active
      - depth
      - normal
      - albedo
      - id

Breakdown

keyword description
obj_file: the filepath of the .obj file (other file formats available later)
render_output: output directory to place frames/movie file
scaling_factor: the relative scale of the obj in scene
remove_doubles: Do we remove overlapping vertices or not?
edge_split: Is geometry connected? Or are triangles separated?
depth_scale: uhh...
color_depth: uhh...
format: what output file format are we using?
video: If true, the format must be compatible, and will be 30 fps (adjust rotation_iterations accordingly)
rotation_iterations: How many pics are we taking? (from 360 turntable)
resolution: Always square
include: A list of Maps that can be produced (see below)

Maps that can be outputted

This will be a different photo file/video file for each map type

Maps Description
Color A Full Color Render
Depth Depth from Camera Info (grayscale)
Normal Vertex Bump information (reddish-blue)
Albedo What color should the light be AFTER it bounces off the surface
ID What pixel belongs to what obj? (Obj masks, really)
Clone this wiki locally