Skip to content

Commit

Permalink
- Updated Lightsources
Browse files Browse the repository at this point in the history
- Updated Lightsources schemas
  • Loading branch information
AntonPalmqvist committed Mar 2, 2025
1 parent 8fbdc28 commit 3ebad76
Show file tree
Hide file tree
Showing 4 changed files with 934 additions and 182 deletions.
65 changes: 56 additions & 9 deletions deploy/lightsources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
"temperature": 5600,
"temperatureRange": [2500, 7500],
"intensity": 19389,
"variants": [
{
"format": "Bare Bulb",
"color": [1.0, 0.859, 0.778],
"temperature": 5600,
"angle": 90,
"intensity": 17244
},
{
"format": "Hyper Reflector",
"color": [1.0, 0.859, 0.778],
"temperature": 5600,
"angle": 65,
"intensity": 26155
}
],
"unit": ["lm"],
"angle": 90,
"type": ["spot"],
Expand Down Expand Up @@ -235,7 +251,7 @@
"color": [1.0, 0.571, 0.259],
"temperature": 3500,
"intensity": 1500,
"intensityRange": [700, 2000],
"intensityRange": [1000, 2000],
"unit": ["lm"],
"type": ["spot"],
"category": ["Artificial"],
Expand All @@ -250,7 +266,7 @@
"color": [1.0, 0.943, 0.992],
"temperature": 6500,
"intensity": 200,
"intensityRange": [100, 2000],
"intensityRange": [100, 2500],
"unit": ["cd/m2"],
"sourceSize": [61, 38],
"type": ["surface"],
Expand All @@ -268,13 +284,29 @@
"color": [1, 1, 1],
"temperature": 0,
"intensity": 0.0006,
"variants": [
{
"format": "Green",
"color": [0, 1, 0],
"intensity": 0.0006
},
{
"format": "Yellow",
"color": [1.0, 0.5, 0],
"intensity": 0.0006
},
{
"format": "Red",
"color": [1.0, 0, 0],
"intensity": 0.0006
}
],
"unit": ["lm"],
"sourceSize": [0.25],
"type": ["point"],
"category": ["Natural"],
"description": "Fireflies produce a \"cold light\", with no infrared or ultraviolet frequencies. The light may be yellow, green, or pale red, with wavelengths from 510 to 670 nanometers. Some species such as the dimly glowing \"blue ghost\" of the Eastern US may seem to emit blueish-white light from a distance and in low light conditions, but their glow is bright green when observed up close. Their perceived blue tint may be due to the Purkinje effect.",
"sources": [
"https://what-if.xkcd.com/151/",
"https://www.nature.com/articles/s41598-021-91839-3",
"https://en.wikipedia.org/wiki/Firefly"
],
Expand All @@ -286,6 +318,23 @@
"temperature": 5000,
"intensity": 1000,
"intensityRange": [500, 5000],
"variants": [
{
"format": "2700 K",
"color": [1.0, 0.415, 0.099],
"temperature": 2700
},
{
"format": "4000 K",
"color": [1.0, 0.654, 0.377],
"temperature": 4000
},
{
"format": "6500 K",
"color": [1.0, 0.943, 0.992],
"temperature": 2700
}
],
"unit": ["lm"],
"sourceSize": [60, 1.5],
"type": ["cylinder"],
Expand Down Expand Up @@ -359,7 +408,6 @@
"https://en.wikipedia.org/wiki/Purkinje_effect",
"https://chrisbrejon.com/cg-cinematography/chapter-4-light-categories/#moon",
"https://iopscience.iop.org/article/10.1088/0031-9120/48/3/360",
"https://web.archive.org/web/20151005215129/http://www.cast-lighting.com/search/1/display-document/71",
"https://www.physics.unlv.edu/~jeffery/astro/moon/sun_moon_angular.html"
]
},
Expand All @@ -372,8 +420,7 @@
"type": ["spot"],
"category": ["Artificial"],
"description": "",
"sources": ["https://en.wikipedia.org/wiki/Flash_(photography)"],
"tags": ["camera"]
"sources": ["https://en.wikipedia.org/wiki/Flash_(photography)"]
},
{
"name": "Sky (Clear)",
Expand All @@ -388,7 +435,7 @@
"https://github.com/AntonPalmqvist/physically-based-api/tree/main/data/lightsources/sky-clear/",
"https://en.wikipedia.org/wiki/Color_temperature",
"https://en.wikipedia.org/wiki/Daylight",
"http://web.archive.org/web/20120807211236/http://www.npl.co.uk/upload/pdf/npl_summary_report_best_blue_sky_2006.pdf"
"http://eprintspublications.npl.co.uk/3518/"
]
},
{
Expand Down Expand Up @@ -425,8 +472,8 @@
},
{
"name": "Sky (Moonless Clear Night)",
"color": [1, 1, 1],
"temperature": 0,
"color": [1.0, 0.943, 0.992],
"temperature": 6500,
"intensity": 0.002,
"unit": ["lx"],
"type": ["dome"],
Expand Down
87 changes: 64 additions & 23 deletions deploy/openapi-schema-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ paths:
servers:
- url: 'https://api.physicallybased.info/v2'
tags:
- name: Cameras
- name: Light Sources
- name: Materials
- name: Light Sources
- name: Cameras
- name: Lenses
components:
schemas:
Expand Down Expand Up @@ -211,7 +211,7 @@ components:
$ref: '#/components/schemas/tags'
references:
type: array
description: List of references. At least one reference needed.
description: List of references. At least one reference required.
minItems: 1
uniqueItems: true
items:
Expand Down Expand Up @@ -361,6 +361,43 @@ components:
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.'
Expand All @@ -386,16 +423,21 @@ components:
- Natural
description:
$ref: '#/components/schemas/description'
sources:
$ref: '#/components/schemas/sources'
tags:
$ref: '#/components/schemas/tags'
references:
type: array
description: List of references. At least one reference required.
minItems: 1
uniqueItems: true
items:
$ref: '#/components/schemas/reference'
required:
- name
- intensity
- unit
- category
- sources
- references
examples:
- name: Household Light Bulb
color:
Expand Down Expand Up @@ -423,15 +465,6 @@ components:
tags:
- incandescent
- tungsten
sources:
type: array
title: sources
description: Provide at least one source for the values.
minItems: 1
uniqueItems: true
items:
type: string
format: uri
Camera:
type: object
title: Camera
Expand Down Expand Up @@ -488,16 +521,20 @@ components:
- Mobile
description:
$ref: '#/components/schemas/description'
sources:
$ref: '#/components/schemas/sources'
description: Provide at least one source for the values. Source link to official manufacturer website is preferred.
tags:
$ref: '#/components/schemas/tags'
references:
type: array
description: List of references. At least one reference required.
minItems: 1
uniqueItems: true
items:
$ref: '#/components/schemas/reference'
required:
- name
- sensorSize
- category
- sources
- references
examples:
- name: Arri Alexa 35
sensorSize:
Expand Down Expand Up @@ -645,14 +682,18 @@ components:
description: Shortest distance from the sensor to the subject that the lens can achieve focus. Specified in centimeters.
description:
$ref: '#/components/schemas/description'
sources:
$ref: '#/components/schemas/sources'
description: Provide at least one source for the values. Source link to official manufacturer website is preferred.
tags:
$ref: '#/components/schemas/tags'
references:
type: array
description: List of references. At least one reference required.
minItems: 1
uniqueItems: true
items:
$ref: '#/components/schemas/reference'
required:
- name
- focalLength
- aperture
- blades
- sources
- references
Loading

0 comments on commit 3ebad76

Please sign in to comment.