# KiBot Render Output Group

kibot:
  version: 1

groups:
  - name: renders
    outputs:
      - @PCBDRAW_2D_TOP_PCB_OUTPUT@
      - @PCBDRAW_2D_BOT_PCB_OUTPUT@
      - @BLENDER_3D_TOP_OUTPUT@
      - @BLENDER_3D_BOT_OUTPUT@
      - @BLENDER_3D_ANGLED_TOP_OUTPUT@
      - @BLENDER_3D_ANGLED_BOT_OUTPUT@

import:

  # PCB 2D Renders (Bare Board) ------------------------------------------
  - file: kibot_out_pcbdraw.yaml
    definitions:
      NAME: @NAME_PCBDRAW_2D_TOP_PCB_OUTPUT@
      COMMENT: PCB 2D Render (Top)
      DIR: @DIR@
      FORMAT: svg
      BOTTOM: false
      COMPONENTS: none

  - file: kibot_out_pcbdraw.yaml
    definitions:
      NAME: @NAME_PCBDRAW_2D_BOT_PCB_OUTPUT@
      COMMENT: PCB 2D Render (Bottom)
      DIR: @DIR@
      FORMAT: svg
      BOTTOM: true
      COMPONENTS: none

  # PCBA 3D Renders (Populated Board; Blender) -------------------------------
  - file: kibot_out_blender.yaml
    definitions:
      NAME: @NAME_BLENDER_3D_TOP@
      COMMENT: High Quality 3D Render (Top)
      DIR: @DIR@
      VIEW: top
      ROTATE_X: 0
      ROTATE_Y: 0
      ROTATE_Z: 0
      SAMPLES: @BLENDER_SAMPLES@
      RESOLUTION_X: @BLENDER_RESOLUTION_X@
      RESOLUTION_Y: @BLENDER_RESOLUTION_Y@
      TEXTURE_DPI: @BLENDER_TEXTURE_DPI@
      DNF_FILTER: @BLENDER_DNF_FILTER@
      DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@
      DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@
      DIFFUSE_LIGHT: 0.7
      ACCENT_LIGHT: 0.1
      SPOT_LIGHT: 0.1

  - file: kibot_out_blender.yaml
    definitions:
      NAME: @NAME_BLENDER_3D_BOT@
      COMMENT: High Quality 3D Render (Bottom)
      DIR: @DIR@
      VIEW: bottom
      ROTATE_X: 0
      ROTATE_Y: 0
      ROTATE_Z: 0
      SAMPLES: @BLENDER_SAMPLES@
      RESOLUTION_X: @BLENDER_RESOLUTION_X@
      RESOLUTION_Y: @BLENDER_RESOLUTION_Y@
      TEXTURE_DPI: @BLENDER_TEXTURE_DPI@
      DNF_FILTER: @BLENDER_DNF_FILTER@
      DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@
      DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@
      DIFFUSE_LIGHT: 0.7
      ACCENT_LIGHT: 0.1
      SPOT_LIGHT: 0.1

  - file: kibot_out_blender.yaml
    definitions:
      NAME: @NAME_BLENDER_3D_ANGLED_TOP@
      COMMENT: High Quality 3D Render (Angled Top)
      DIR: @DIR@
      VIEW: top
      ROTATE_X: @BLENDER_TOP_ROT_X@
      ROTATE_Y: @BLENDER_TOP_ROT_Y@
      ROTATE_Z: @BLENDER_TOP_ROT_Z@
      SAMPLES: @BLENDER_SAMPLES@
      RESOLUTION_X: @BLENDER_RESOLUTION_X@
      RESOLUTION_Y: @BLENDER_RESOLUTION_Y@
      TEXTURE_DPI: @BLENDER_TEXTURE_DPI@
      DNF_FILTER: @BLENDER_DNF_FILTER@
      DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@
      DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@
      DIFFUSE_LIGHT: 0.4
      ACCENT_LIGHT: 0.1
      SPOT_LIGHT: 2.0

  - file: kibot_out_blender.yaml
    definitions:
      NAME: @NAME_BLENDER_3D_ANGLED_BOT@
      COMMENT: High Quality 3D Render (Angled Bottom)
      DIR: @DIR@
      VIEW: bottom
      ROTATE_X: @BLENDER_BOT_ROT_X@
      ROTATE_Y: @BLENDER_BOT_ROT_Y@
      ROTATE_Z: @BLENDER_BOT_ROT_Z@
      SAMPLES: @BLENDER_SAMPLES@
      RESOLUTION_X: @BLENDER_RESOLUTION_X@
      RESOLUTION_Y: @BLENDER_RESOLUTION_Y@
      TEXTURE_DPI: @BLENDER_TEXTURE_DPI@
      DNF_FILTER: @BLENDER_DNF_FILTER@
      DIFFUSE_RADIUS: @BLENDER_DIFFUSE_RADIUS@
      DIFFUSE_HEIGHT: @BLENDER_DIFFUSE_HEIGHT@
      DIFFUSE_LIGHT: 0.4
      ACCENT_LIGHT: 0.1
      SPOT_LIGHT: 2.0

...
definitions:
  # Directories
  DIR: +renders

  # Output Names
  NAME_PCBDRAW_2D_TOP_PCB_OUTPUT: pcbdraw_top
  NAME_PCBDRAW_2D_BOT_PCB_OUTPUT: pcbdraw_bottom
  NAME_BLENDER_3D_TOP: blender_3d_top
  NAME_BLENDER_3D_BOT: blender_3d_bottom
  NAME_BLENDER_3D_ANGLED_TOP: blender_3d_angled_top
  NAME_BLENDER_3D_ANGLED_BOT: blender_3d_angled_bottom

  # Blender Configuration
  BLENDER_DNF_FILTER: _kibom_dnf_Config
  BLENDER_SAMPLES: 2
  BLENDER_TOP_ROT_X: 30
  BLENDER_TOP_ROT_Y: 10
  BLENDER_TOP_ROT_Z: 10
  BLENDER_BOT_ROT_X: -30
  BLENDER_BOT_ROT_Y: 10
  BLENDER_BOT_ROT_Z: 10
  BLENDER_RESOLUTION_X: 1500
  BLENDER_RESOLUTION_Y: 1500
  BLENDER_TEXTURE_DPI: 1031.0
  BLENDER_DIFFUSE_HEIGHT: 10.0
  BLENDER_DIFFUSE_RADIUS: 6.0
