Skip to main content

export_3d_object_v3_3.json

export_3d_object.json Copy Json { "$schema": "http://json-schema.org/draft-04/schema#", "description": "3D object Export", "definit...

Updated over 3 weeks ago

export_3d_object.json

Copy Json

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "3D object Export",
  "definitions": {
    "common": {
      "type": "object",
      "properties": {
        "layout": {
          "oneOf": [
            {
              "allOf": [
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "piece": {
                          "enum": [
                            "per_piece",
                            "per_piece_square"
                          ]
                        },
                        "dpi": {
                          "type": "integer",
                          "minimum": 50,
                          "maximum": 400
                        }
                      }
                    },
                    {
                      "allOf": [
                        {
                          "type": "object",
                          "properties": {
                            "piece": {
                              "enum": [
                                "all_pieces_bounding_box",
                                "all_pieces_square"
                              ]
                            }
                          }
                        },
                        {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "dpi": {
                                  "type": "integer",
                                  "minimum": 50,
                                  "maximum": 400
                                }
                              },
                              "required": [
                                "dpi"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "pixels": {
                                  "type": "object",
                                  "properties": {
                                    "width": {
                                      "type": "integer",
                                      "minimum": 10,
                                      "maximum": 10000
                                    },
                                    "height": {
                                      "type": "integer",
                                      "minimum": 10,
                                      "maximum": 10000
                                    }
                                  },
                                  "required": [
                                    "width",
                                    "height"
                                  ]
                                }
                              },
                              "required": [
                                "pixels"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "layout_type": {
                      "enum": [
                        "layout_uv"
                      ]
                    },
                    "file_format": {
                      "description": "for fbx and obj use png or tiff, for gltf use png or jpg",
                      "enum": [
                        "png",
                        "tiff",
                        "jpg"
                      ]
                    }
                  },
                  "required": [
                    "piece",
                    "layout_type"
                  ]
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "layout_type": {
                  "enum": [
                    "native_uv"
                  ]
                },
                "image": {
                  "enum": [
                    "original_image",
                    "combined_image"
                  ]
                },
                "dpi": {
                  "type": "integer",
                  "minimum": 50,
                  "maximum": 400
                },
                "use_material_names": {
                  "type": "boolean"
                }
              },
              "required": [
                "layout_type",
                "use_material_names",
                "dpi"
              ]
            }
          ]
        },
        "export_inside": {
          "type": "boolean"
        },
        "export_thickness": {
          "type": "boolean"
        },
        "scale": {
          "type": "number",
          "minimum": 0.01,
          "maximum": 100
        },
        "up_axis": {
          "enum": [
            "y",
            "z"
          ]
        },
        "use_pattern_pieces_names": {
          "type": "boolean"
        },
        "match_garment": {
          "description": "Available only in imported avatars",
          "type": "boolean"
        },
        "convert_bmp_to_png": {
          "type": "boolean"
        },
        "multipack": {
          "ref": "../../v1.0/render/multipack.json"
        }
      },
      "required": [
        "layout",
        "up_axis",
        "scale",
        "use_pattern_pieces_names"
      ]
    }
  },
  "type": "object",
  "allOf": [
    {
      "properties": {
        "include_avatar": {
          "type": "boolean"
        }
      },
      "required": [
        "3d_format",
        "path",
        "include_avatar"
      ]
    },
    {
      "oneOf": [
        {
          "allOf": [
            {
              "$ref": "#/definitions/common"
            },
            {
              "properties": {
                "3d_format": {
                  "type": "string",
                  "enum": [
                    "autodesk_fbx",
                    "browzwear_pbr_fbx"
                  ]
                },
                "path": {
                  "type": "string",
                  "pattern": "^.+\\.(fbx|zip)$"
                },
                "version": {
                  "default": "FBX201400",
                  "enum": [
                    "FBX201800",
                    "FBX201600",
                    "FBX201400",
                    "FBX201300",
                    "FBX201200",
                    "FBX201100",
                    "FBX201000"
                  ]
                },
                "type": {
                  "enum": [
                    "ascii",
                    "binary"
                  ]
                }
              },
              "required": [
                "version",
                "type"
              ]
            }
          ]
        },
        {
          "allOf": [
            {
              "description": "gltf supports only layout_uv as layout_type",
              "$ref": "#/definitions/common"
            },
            {
              "properties": {
                "3d_format": {
                  "type": "string",
                  "enum": [
                    "gltf"
                  ]
                },
                "path": {
                  "description": "gltf for JSON type, glb for Binary type, zip in order to zip the export",
                  "type": "string",
                  "pattern": "^.+\\.(gltf|glb|zip)$"
                },
                "type": {
                  "enum": [
                    "json",
                    "binary"
                  ]
                },
                "alpha_mode": {
                  "type": "string",
                  "enum": [
                    "opaque",
                    "mask",
                    "blend"
                  ]
                }
              }
            }
          ]
        },
        {
          "allOf": [
            {
              "$ref": "#/definitions/common"
            },
            {
              "properties": {
                "3d_format": {
                  "type": "string",
                  "enum": [
                    "obj"
                  ]
                },
                "path": {
                  "type": "string",
                  "pattern": "^.+\\.(obj|zip)$"
                }
              }
            }
          ]
        },
        {
          "properties": {
            "3d_format": {
              "type": "string",
              "enum": [
                "bwo"
              ]
            },
            "path": {
              "type": "string",
              "pattern": "^.+\\.(bwo)$"
            },
            "dpi": {
              "type": "integer",
              "minimum": 50,
              "maximum": 400
            }
          },
          "required": [
            "dpi"
          ]
        },
        {
          "properties": {
            "3d_format": {
              "type": "string",
              "enum": [
                "vrscene"
              ]
            },
            "render_quality": {
              "type": "string",
              "default": "medium",
              "enum": [
                "low",
                "medium",
                "high",
                "best"
              ]
            },
            "path": {
              "type": "string",
              "pattern": "^.+\\.(vrscene)$"
            },
            "dpi": {
              "type": "integer",
              "minimum": 50,
              "maximum": 400
            },
            "multipack": {
              "ref": "../../v1.0/render/multipack.json"
            },
            "use_gpu": {
              "type": "boolean",
              "description": "GPU setting can result in faster render times (depending on your hardware). There may be some small visual differences between CPU and GPU rendered images."
            }
          },
          "required": [
            "dpi"
          ]
        }
      ]
    }
  ]
}
Did this answer your question?