Skip to content

Commit

Permalink
- Added "angle", "sourceSize", and "variants" to OpenAPI schema
Browse files Browse the repository at this point in the history
- Updated Materials
- Updated Lightsources
  • Loading branch information
AntonPalmqvist committed Apr 5, 2024
1 parent 4e34fec commit 3011dbf
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 14 deletions.
3 changes: 3 additions & 0 deletions deploy/lightsources.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
},
{
"name": "Arri SkyPanel X",
"color": [1.0, 0.859, 0.778],
"temperature": 5600,
"temperatureRange": [1500, 20000],
"intensity": 3000,
"variants": [
{
"format": "Open-Face",
Expand Down
44 changes: 33 additions & 11 deletions deploy/materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
"sources": [
"https://github.com/AntonPalmqvist/physically-based-api/tree/main/data/materials/coffee/"
],
"tags": [""],
"tags": ["sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/coffee-cycles.png"
]
Expand Down Expand Up @@ -598,7 +598,7 @@
"https://en.wikipedia.org/wiki/List_of_viscosities",
"https://www.aqua-calc.com/page/density-table/substance/heinz-blank-tomato-blank-ketchup-coma-and-blank-upc-column--blank-00013000004664"
],
"tags": ["liquid"],
"tags": ["liquid", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/ketchup-cycles.png"
]
Expand Down Expand Up @@ -639,6 +639,28 @@
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/lemon-cycles.png"
]
},
{
"name": "Marble",
"color": [0.83, 0.791, 0.753],
"metalness": 0,
"roughness": 0.5,
"ior": 1.5,
"subsurfaceRadius": [0.851, 0.557, 0.395],
"density": 2700,
"category": ["Crystal"],
"description": "",
"sources": [
"https://en.wikipedia.org/wiki/Marble",
"https://www.aqua-calc.com/page/density-table/substance/marble",
"https://www.sciencedirect.com/science/article/pii/S2090447919300826",
"https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf",
"https://renderman.pixar.com/resources/RenderMan_20/subsurface.html"
],
"tags": ["sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/marble-cycles.png"
]
},
{
"name": "Mercury",
"color": [0.781, 0.779, 0.779],
Expand Down Expand Up @@ -685,7 +707,7 @@
"https://en.wikipedia.org/wiki/List_of_viscosities",
"https://www.engineeringtoolbox.com/absolute-viscosity-liquids-d_1259.html"
],
"tags": [""],
"tags": ["sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/milk-cycles.png"
]
Expand Down Expand Up @@ -750,7 +772,7 @@
"https://refractiveindex.info/?shelf=main&book=CaCO3&page=Ghosh-o",
"https://en.wikipedia.org/wiki/Nacre"
],
"tags": ["nacre"],
"tags": ["nacre", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/pearl-arnold.png"
]
Expand All @@ -774,7 +796,7 @@
"https://www.sciencedirect.com/science/article/abs/pii/S1350449520305636",
"https://www.sciencedirect.com/science/article/pii/S003442572200133X"
],
"tags": ["oil", "crude oil"],
"tags": ["oil", "crude oil", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/petroleum-cycles.png"
]
Expand Down Expand Up @@ -1040,7 +1062,7 @@
"https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf",
"https://renderman.pixar.com/resources/RenderMan_20/subsurface.html"
],
"tags": ["epidermis"],
"tags": ["epidermis", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-i-cycles.png"
]
Expand All @@ -1064,7 +1086,7 @@
"https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf",
"https://renderman.pixar.com/resources/RenderMan_20/subsurface.html"
],
"tags": ["epidermis"],
"tags": ["epidermis", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-ii-cycles.png"
]
Expand All @@ -1090,7 +1112,7 @@
"https://spectraldb.com/measurements/00490/",
"https://spectraldb.com/measurements/00403/"
],
"tags": ["epidermis"],
"tags": ["epidermis", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iii-cycles.png"
]
Expand All @@ -1115,7 +1137,7 @@
"https://renderman.pixar.com/resources/RenderMan_20/subsurface.html",
"https://spectraldb.com/measurements/00408/"
],
"tags": ["epidermis"],
"tags": ["epidermis", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iv-cycles.png"
]
Expand All @@ -1140,7 +1162,7 @@
"https://renderman.pixar.com/resources/RenderMan_20/subsurface.html",
"https://spectraldb.com/measurements/00396/"
],
"tags": ["epidermis"],
"tags": ["epidermis", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-v-cycles.png"
]
Expand All @@ -1165,7 +1187,7 @@
"https://renderman.pixar.com/resources/RenderMan_20/subsurface.html",
"https://spectraldb.com/measurements/00414/"
],
"tags": ["epidermis"],
"tags": ["epidermis", "sss"],
"reference": [
"https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-vi-cycles.png"
]
Expand Down
54 changes: 53 additions & 1 deletion deploy/openapi-schema.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.1.0
info:
version: '1.2'
version: '1.3'
title: Physically Based API
description: |-
This is a database of physically based values for CG artists.
Expand Down Expand Up @@ -152,6 +152,7 @@ components:
minItems: 1
maxItems: 1
items:
type: string
enum:
- Calibration
- Crystal
Expand Down Expand Up @@ -284,16 +285,65 @@ components:
minItems: 1
maxItems: 1
items:
type: string
enum:
- lm
- lx
- cd/m2
angle:
type: number
description: 'The maximum beam angle in degrees. For a directional light, this specifies angular diameter instead.'
sourceSize:
type: array
description: 'The size of the light source in centimeters. [Radius] if point or spot. [Width, Height] if surface. [Length, Radius] if cylinder.'
minItems: 1
maxItems: 2
items:
type: number
variants:
type: array
description: 'If the light source comes in different variations, they can be described here.'
minItems: 1
uniqueItems: true
items:
type: object
additionalProperties: false
properties:
format:
type: string
description: Specifies the format.
color:
$ref: '#/components/schemas/color'
description: Color of the light source.
temperature:
type: number
description: 'Color temperature in Kelvin, if color lies on the Planckian curve.'
default: 6500
intensity:
type: number
description: Intensity of the light emitted from the light source.
angle:
type: number
description: 'The maximum beam angle in degrees. For a directional light, this specifies angular diameter instead.'
default: 90
sourceSize:
type: array
description: 'The size of the light source in centimeters. [Radius] if point or spot. [Width, Height] if surface. [Length, Radius] if cylinder.'
minItems: 1
maxItems: 2
items:
type: number
required:
- format
- color
- intensity
type:
type: array
description: 'The type of light, for DCC applications.'
minItems: 1
maxItems: 1
items:
type: string
enum:
- directional
- surface
Expand All @@ -306,6 +356,7 @@ components:
minItems: 1
maxItems: 1
items:
type: string
enum:
- Artificial
- Natural
Expand Down Expand Up @@ -384,6 +435,7 @@ components:
minItems: 1
maxItems: 1
items:
type: string
enum:
- Still
- Movie
Expand Down
12 changes: 10 additions & 2 deletions schemas/schema-lightsources.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}
}
},
"required": ["format", "color", "temperature", "intensity"]
"required": ["format", "color", "intensity"]
},
"category": {
"type": "array",
Expand Down Expand Up @@ -179,6 +179,14 @@
"required": ["variants"]
}
],
"required": ["name", "unit", "category", "description", "sources"]
"required": [
"name",
"color",
"intensity",
"unit",
"category",
"description",
"sources"
]
}
}

0 comments on commit 3011dbf

Please sign in to comment.