diff --git a/deploy/_redirects b/deploy/_redirects index 54f78be..5d8a8d6 100644 --- a/deploy/_redirects +++ b/deploy/_redirects @@ -1,7 +1,7 @@ /materials /materials.json 200 -/v2/materials /v2/materials.json 200 /lightsources /lightsources.json 200 /cameras /cameras.json 200 -/lenses /lenses.json 200 +/v2/materials /v2/materials.json 200 +/v2/lenses /v2/lenses.json 200 /js/script.js https://plausible.io/js/script.js 200 /api/event https://plausible.io/api/event 200 diff --git a/deploy/materials.json b/deploy/materials.json index 148e4bf..4fdb2ed 100644 --- a/deploy/materials.json +++ b/deploy/materials.json @@ -1022,137 +1022,63 @@ ] }, { - "name": "Skin I", - "color": [0.847, 0.638, 0.552], - "metalness": 0, - "roughness": 0.5, - "ior": 1.4, - "subsurfaceRadius": [0.482, 0.169, 0.109], - "density": 1020, - "category": ["Human"], - "group": "Skin", - "description": "", - "sources": [ - "https://www.spiedigitallibrary.org/journals/journal-of-biomedical-optics/volume-17/issue-9/090901/Optical-properties-of-human-skin/10.1117/1.JBO.17.9.090901.full?SSO=1", - "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3699319/", - "http://graphics.ucsd.edu/~henrik/papers/skin_bssrdf/skin_bssrdf.pdf", - "http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx", - "https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf", - "https://renderman.pixar.com/resources/RenderMan_20/subsurface.html" - ], - "tags": ["epidermis"], - "reference": [ - "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-i-cycles.png" - ] - }, - { - "name": "Skin II", - "color": [0.799, 0.485, 0.347], - "metalness": 0, - "roughness": 0.5, - "ior": 1.4, - "subsurfaceRadius": [0.482, 0.169, 0.109], - "density": 1020, - "category": ["Human"], - "group": "Skin", - "description": "", - "sources": [ - "https://www.spiedigitallibrary.org/journals/journal-of-biomedical-optics/volume-17/issue-9/090901/Optical-properties-of-human-skin/10.1117/1.JBO.17.9.090901.full?SSO=1", - "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3699319/", - "http://graphics.ucsd.edu/~henrik/papers/skin_bssrdf/skin_bssrdf.pdf", - "http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx", - "https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf", - "https://renderman.pixar.com/resources/RenderMan_20/subsurface.html" - ], - "tags": ["epidermis"], - "reference": [ - "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-ii-cycles.png" - ] - }, - { - "name": "Skin III", - "color": [0.623, 0.433, 0.343], - "metalness": 0, - "roughness": 0.5, - "ior": 1.4, - "subsurfaceRadius": [0.482, 0.169, 0.109], - "density": 1020, - "category": ["Human"], - "group": "Skin", - "description": "", - "sources": [ - "https://www.spiedigitallibrary.org/journals/journal-of-biomedical-optics/volume-17/issue-9/090901/Optical-properties-of-human-skin/10.1117/1.JBO.17.9.090901.full?SSO=1", - "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3699319/", - "http://graphics.ucsd.edu/~henrik/papers/skin_bssrdf/skin_bssrdf.pdf", - "http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx", - "https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf", - "https://renderman.pixar.com/resources/RenderMan_20/subsurface.html", - "https://spectraldb.com/measurements/00490/", - "https://spectraldb.com/measurements/00403/" - ], - "tags": ["epidermis"], - "reference": [ - "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iii-cycles.png" - ] - }, - { - "name": "Skin IV", + "name": "Skin", "color": [0.436, 0.227, 0.131], "metalness": 0, "roughness": 0.5, "ior": 1.4, "subsurfaceRadius": [0.367, 0.137, 0.068], "density": 1020, - "category": ["Human"], - "group": "Skin", - "description": "", - "sources": [ - "https://www.spiedigitallibrary.org/journals/journal-of-biomedical-optics/volume-17/issue-9/090901/Optical-properties-of-human-skin/10.1117/1.JBO.17.9.090901.full?SSO=1", - "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3699319/", - "http://graphics.ucsd.edu/~henrik/papers/skin_bssrdf/skin_bssrdf.pdf", - "http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx", - "https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf", - "https://renderman.pixar.com/resources/RenderMan_20/subsurface.html", - "https://spectraldb.com/measurements/00408/" + "variants": [ + { + "name": "Skin I", + "color": [0.847, 0.638, 0.552], + "subsurfaceRadius": [0.482, 0.169, 0.109], + "reference": [ + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-i-cycles.png" + ] + }, + { + "name": "Skin II", + "color": [0.799, 0.485, 0.347], + "subsurfaceRadius": [0.482, 0.169, 0.109], + "reference": [ + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-ii-cycles.png" + ] + }, + { + "name": "Skin III", + "color": [0.623, 0.433, 0.343], + "subsurfaceRadius": [0.482, 0.169, 0.109], + "reference": [ + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iii-cycles.png" + ] + }, + { + "name": "Skin IV", + "color": [0.436, 0.227, 0.131], + "subsurfaceRadius": [0.367, 0.137, 0.068], + "reference": [ + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iv-cycles.png" + ] + }, + { + "name": "Skin V", + "color": [0.283, 0.148, 0.079], + "subsurfaceRadius": [0.367, 0.137, 0.068], + "reference": [ + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-v-cycles.png" + ] + }, + { + "name": "Skin VI", + "color": [0.09, 0.05, 0.02], + "subsurfaceRadius": [0.367, 0.137, 0.068], + "reference": [ + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-vi-cycles.png" + ] + } ], - "tags": ["epidermis"], - "reference": [ - "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iv-cycles.png" - ] - }, - { - "name": "Skin V", - "color": [0.283, 0.148, 0.079], - "metalness": 0, - "roughness": 0.5, - "ior": 1.4, - "subsurfaceRadius": [0.367, 0.137, 0.068], - "density": 1020, - "category": ["Human"], - "group": "Skin", - "description": "", - "sources": [ - "https://www.spiedigitallibrary.org/journals/journal-of-biomedical-optics/volume-17/issue-9/090901/Optical-properties-of-human-skin/10.1117/1.JBO.17.9.090901.full?SSO=1", - "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3699319/", - "http://graphics.ucsd.edu/~henrik/papers/skin_bssrdf/skin_bssrdf.pdf", - "http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx", - "https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf", - "https://renderman.pixar.com/resources/RenderMan_20/subsurface.html", - "https://spectraldb.com/measurements/00396/" - ], - "tags": ["epidermis"], - "reference": [ - "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-v-cycles.png" - ] - }, - { - "name": "Skin VI", - "color": [0.09, 0.05, 0.02], - "metalness": 0, - "roughness": 0.5, - "ior": 1.4, - "subsurfaceRadius": [0.367, 0.137, 0.068], - "density": 1020, "category": ["Human"], "group": "Skin", "description": "", @@ -1163,11 +1089,15 @@ "http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx", "https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf", "https://renderman.pixar.com/resources/RenderMan_20/subsurface.html", + "https://spectraldb.com/measurements/00490/", + "https://spectraldb.com/measurements/00403/", + "https://spectraldb.com/measurements/00408/", + "https://spectraldb.com/measurements/00396/", "https://spectraldb.com/measurements/00414/" ], "tags": ["epidermis"], "reference": [ - "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-vi-cycles.png" + "https://raw.githubusercontent.com/AntonPalmqvist/physically-based-api/main/reference/render/skin-iv-cycles.png" ] }, { diff --git a/deploy/lenses.json b/deploy/v2/lenses.json similarity index 100% rename from deploy/lenses.json rename to deploy/v2/lenses.json diff --git a/deploy/v2/lightsources.json b/deploy/v2/lightsources.json new file mode 100644 index 0000000..0ec63ea --- /dev/null +++ b/deploy/v2/lightsources.json @@ -0,0 +1,275 @@ +[ + { + "name": "Aputure amaran 300c", + "color": [1.0, 0.859, 0.778], + "temperature": [2500, 7500], + "intensity": [19389, 19389], + "unit": ["lm"], + "angle": 90, + "type": ["spot"], + "category": ["Artificial"], + "description": "", + "sources": [ + "https://www.aputure.com/products/amaran-300c/#specifications", + "https://docs.aputure.com/hubfs/Knowledge%20Base/amaran/150c-300c/All%20Files/amaran%20300c%20Product%20Manual%20.pdf?_gl=1*53mffx*_gcl_au*MTAzNTY3Nzg5Ny4xNzAzNzk4MTc1" + ] + }, + { + "name": "Aputure amaran P60c", + "color": [1.0, 0.859, 0.778], + "temperature": [2500, 7500], + "intensity": [3000, 3000], + "unit": ["lm"], + "angle": 45, + "sourceSize": [27, 21], + "type": ["surface"], + "category": ["Artificial"], + "description": "", + "sources": [ + "https://www.aputure.com/products/amaran-p60c/#specifications", + "https://docs.aputure.com/hubfs/Knowledge%20Base/amaran/p60x%20and%20p60c/All%20files/amaran-P60c-Product-Manual-EN_211211-.pdf" + ] + }, + { + "name": "Arri SkyPanel X", + "color": [1.0, 0.859, 0.778], + "temperature": [1500, 20000], + "angle": 121, + "intensity": [51809, 51809], + "variants": { + "format": "Open-Face", + "color": [1.0, 0.859, 0.778], + "temperature": [1500, 20000], + "angle": 121, + "intensity": 51809 + }, + "unit": ["lm"], + "type": ["surface"], + "category": ["Artificial"], + "description": "", + "sources": [ + "https://www.arri.com/en/lighting/led/skypanel/x-series/tech-data", + "https://www.arri.com/resource/blob/341262/e55242c6535912778f7f39d38f490c90/arri-skypanel-x-data-sheet-en-data.pdf" + ] + }, + { + "name": "Candle Flame", + "color": [1.0, 0.22, 0.0], + "temperature": [1850, 1850], + "intensity": [13, 13], + "unit": ["lm"], + "sourceSize": [1], + "type": ["point"], + "category": ["Natural"], + "description": "", + "sources": [ + "https://en.wikipedia.org/wiki/Candle#Characteristics", + "https://en.wikipedia.org/wiki/Color_temperature" + ] + }, + { + "name": "Car Headlight (Halogen)", + "color": [1.0, 0.571, 0.259], + "temperature": [3500, 3500], + "intensity": [700, 2000], + "unit": ["lm"], + "type": ["spot"], + "category": ["Artificial"], + "description": "Tungsten-halogen bulbs, commonly just called halogen, are the most widely used bulbs in car headlights. High beam is approximately double the intensity of a low beam.", + "sources": [ + "https://www.bulbfacts.com/halogen-bulbs/chart/", + "https://en.wikipedia.org/wiki/Headlamp#Light_sources" + ] + }, + { + "name": "Digital Display", + "color": [1.0, 0.943, 0.992], + "temperature": [6500, 6500], + "intensity": [100, 2000], + "unit": ["cd/m2"], + "type": ["surface"], + "category": ["Artificial"], + "description": "Displays like computer monitors, TVs, signage, etc. Typically they have a temperature of 6500K but it can vary. The sRGB spec for monitors targets 80 cd/m2. Typically, monitors calibrated for broadcast or studio color grading should have a brightness of 100 cd/m2 in Japan and in the United States, or 120 cd/m2 in the European Union. This is however considered quite dark for normal use, so consumer monitors tend to be brighter.", + "sources": [ + "https://www.digitalview.com/blog/lcd-panels-backlights-brightness/", + "https://en.wikipedia.org/wiki/Color_temperature", + "https://en.wikipedia.org/wiki/Candela_per_square_metre" + ], + "tags": ["computer", "monitor", "lcd", "oled", "screen"] + }, + { + "name": "Firefly", + "color": [1, 1, 1], + "temperature": [0, 0], + "intensity": [0.0006, 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" + ], + "tags": ["bioluminescence"] + }, + { + "name": "Fluorescent Tube Light", + "color": [1.0, 0.792, 0.628], + "temperature": [5000, 5000], + "intensity": [500, 5000], + "unit": ["lm"], + "sourceSize": [60, 1.5], + "type": ["cylinder"], + "category": ["Artificial"], + "description": "", + "sources": [ + "https://en.wikipedia.org/wiki/Fluorescent_lamp", + "https://www.homedepot.com/b/Lighting-Light-Bulbs-Tube-Lights-Fluorescent-Tube-Lights/N-5yc1vZ2fkol29" + ] + }, + { + "name": "Kerosene Lamp", + "color": [1.0, 0.22, 0.0], + "temperature": [1850, 1850], + "intensity": [8, 100], + "unit": ["lm"], + "type": ["point"], + "category": ["Natural"], + "description": "", + "sources": [ + "https://en.wikipedia.org/wiki/Kerosene_lamp#Performance", + "https://en.wikipedia.org/wiki/Color_temperature" + ] + }, + { + "name": "Household Light Bulb", + "color": [1.0, 0.415, 0.099], + "temperature": [2400, 6000], + "intensity": [400, 1000], + "unit": ["lm"], + "sourceSize": [3], + "type": ["point"], + "category": ["Artificial"], + "description": "Today's household lightbulbs has a LED light source whereas older light bulbs were using a glowing tungsten filament. LED:s are much much more energy efficient and makes the use of wattage, as a measure of intensity, not very useful. This is why lumen is preferred.", + "sources": [ + "https://en.wikipedia.org/wiki/Incandescent_light_bulb", + "https://en.wikipedia.org/wiki/LED_lamp" + ], + "tags": ["incandescent", "tungsten"] + }, + { + "name": "Moon", + "color": [1.0, 0.669, 0.402], + "temperature": [4100, 4100], + "intensity": [0.05, 0.32], + "unit": ["lx"], + "angle": 0.53, + "type": ["directional"], + "category": ["Natural"], + "description": "Technically not a light source, since the light from the moon is simply reflected sunlight. Moonlight is warmer than sunlight due to the surface material of the moon shifting it towards a redder color. Just as sunlight, moonlight is also subject to atmospheric scattering known as Rayleigh scattering, where it goes more towards red during moonrise and moonset. Moonlight is often mistaken to be bluish due to the Purkinje effect.", + "sources": [ + "https://en.wikipedia.org/wiki/Moonlight", + "https://en.wikipedia.org/wiki/Moon", + "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" + ] + }, + { + "name": "Photo Flash", + "color": [1.0, 0.849, 0.754], + "temperature": [5500, 5500], + "intensity": [20000, 20000], + "unit": ["lm"], + "type": ["spot"], + "category": ["Artificial"], + "description": "", + "sources": ["https://en.wikipedia.org/wiki/Flash_(photography)"], + "tags": ["camera"] + }, + { + "name": "Sky (Clear)", + "color": [0.609, 0.695, 1.0], + "temperature": [10000, 10000], + "intensity": [6000, 6000], + "unit": ["lx"], + "type": ["dome"], + "category": ["Natural"], + "description": "Shade illuminated by entire clear blue sky at midday", + "sources": [ + "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" + ] + }, + { + "name": "Sky (Moonless Clear Night)", + "color": [1, 1, 1], + "temperature": [0, 0], + "intensity": [0.002, 0.002], + "unit": ["lx"], + "type": ["dome"], + "category": ["Natural"], + "description": "Even a moonless sky casts some light on earth. A phenomenon called airglow, and also starlight, contributes to this. The color of airglow varies", + "sources": [ + "http://stjarnhimlen.se/comp/radfaq.html#10", + "https://en.wikipedia.org/wiki/Airglow", + "https://en.wikipedia.org/wiki/Starlight", + "https://sciencenotes.org/what-is-airglow/" + ], + "tags": ["airglow"] + }, + { + "name": "Sky (Overcast Day)", + "color": [1.0, 0.943, 0.992], + "temperature": [6500, 6500], + "intensity": [100, 2000], + "unit": ["lx"], + "type": ["dome"], + "category": ["Natural"], + "description": "", + "sources": [ + "https://en.wikipedia.org/wiki/Color_temperature", + "https://en.wikipedia.org/wiki/Daylight", + "https://en.wikipedia.org/wiki/Lux" + ] + }, + { + "name": "Street Light", + "color": [1, 0.761, 0], + "intensity": [2000, 140000], + "unit": ["lm"], + "type": ["spot"], + "category": ["Artificial"], + "description": "The type of yellow light typically used in street lighting is usually a sodium-vapor light. To simulate a sodium-vapor light faithfully you would need a spectral renderer where you can specify the very narrow wavelength range of 589.0 - 589.6 nm in order to get its bespoke monochromatic look.", + "sources": [ + "https://en.wikipedia.org/wiki/Sodium-vapor_lamp", + "https://www.1000bulbs.com/fil/categories/high-pressure-sodium-lamps" + ], + "tags": ["sodium", "vapor"] + }, + { + "name": "Sun", + "color": [1.0, 0.877, 0.822], + "temperature": [5778, 5778], + "intensity": [400, 100000], + "unit": ["lx"], + "angle": 0.53, + "type": ["directional"], + "category": ["Natural"], + "description": "The changing color of the Sun over the course of the day is mainly a result of the scattering of sunlight and is not due to changes in black-body radiation. The solar illuminance constant is equal to 128 000 lux, but atmospheric extinction brings the number of lux down to around 100 000 lux.", + "sources": [ + "https://github.com/AntonPalmqvist/physically-based-api/tree/main/data/lightsources/sun/", + "https://en.wikipedia.org/wiki/Color_temperature#The_Sun", + "https://en.wikipedia.org/wiki/Sunlight#Measurement", + "https://en.wikipedia.org/wiki/Daylight", + "http://stjarnhimlen.se/comp/radfaq.html#10", + "https://nssdc.gsfc.nasa.gov/planetary/factsheet/sunfact.html" + ] + } +] diff --git a/schema-cameras.json b/schemas/schema-cameras.json similarity index 100% rename from schema-cameras.json rename to schemas/schema-cameras.json diff --git a/schema-lenses.json b/schemas/schema-lenses-v2.json similarity index 100% rename from schema-lenses.json rename to schemas/schema-lenses-v2.json diff --git a/schemas/schema-lightsources-v2.json b/schemas/schema-lightsources-v2.json new file mode 100644 index 0000000..92320be --- /dev/null +++ b/schemas/schema-lightsources-v2.json @@ -0,0 +1,171 @@ +{ + "$schema": "http://json-schema.org/schema", + "title": "Light", + "description": "A light source.", + "type": "array", + "items": { + "additionalProperties": false, + "properties": { + "name": { + "description": "Name of the light source.", + "type": "string", + "default": "Name" + }, + "color": { + "description": "Color of the light source.", + "type": "array", + "items": { + "type": "number" + }, + "default": [1, 1, 1], + "minItems": 3, + "maxItems": 3 + }, + "temperature": { + "description": "The typical range of color temperature in Kelvin, if color lies on the Planckian curve. If there's no variation, set both values to the same.", + "type": "array", + "items": { + "type": "number" + }, + "default": [6500, 6500], + "minItems": 2, + "maxItems": 2 + }, + "intensity": { + "description": "Intensity of the light emitted from the light source.", + "type": "array", + "items": { + "type": "number" + }, + "default": [0, 0], + "minItems": 2, + "maxItems": 2 + }, + "variants": { + "description": "If the light source comes in different variations, they can be described here.", + "type": "object", + "minItems": 1, + "items": { + "additionalProperties": false, + "type": "object", + "properties": { + "format": { + "description": "Specifies the format.", + "type": "string", + "default": "Default" + }, + "intensity": { + "description": "Intensity of the light emitted from the light source.", + "type": "array", + "items": { + "type": "number" + }, + "default": [0, 0], + "minItems": 2, + "maxItems": 2 + }, + "angle": { + "description": "The maximum beam angle in degrees. For a directional light, this specifies angular diameter instead.", + "type": "number", + "default": 90 + }, + "temperature": { + "description": "Color temperature in Kelvin, if color lies on the Planckian curve.", + "type": "number", + "default": 6500 + } + }, + "required": ["format", "intensity", "angle", "temperature"] + } + }, + "intensityRange": { + "description": "The typical range of intensity for this specific light source.", + "type": "array", + "items": { + "type": "number" + }, + "default": [0, 1], + "minItems": 2, + "maxItems": 2 + }, + "unit": { + "type": "array", + "items": { + "enum": ["lm", "lx", "cd/m2"] + }, + "minItems": 1, + "maxItems": 1 + }, + "angle": { + "description": "The maximum beam angle in degrees. For a directional light, this specifies angular diameter instead.", + "type": "number", + "default": 90 + }, + "sourceSize": { + "description": "The size of the light source in centimeters. [Radius] if point or spot. [Width, Height] if surface. [Length, Radius] if cylinder.", + "type": "array", + "items": { + "type": "number" + }, + "minItems": 1, + "maxItems": 2 + }, + "type": { + "description": "The type of light, for DCC applications.", + "type": "array", + "items": { + "enum": [ + "directional", + "surface", + "spot", + "point", + "cylinder", + "dome" + ] + }, + "minItems": 1, + "maxItems": 1 + }, + "category": { + "type": "array", + "items": { + "enum": ["Artificial", "Natural"] + }, + "minItems": 1, + "maxItems": 1 + }, + "description": { + "description": "This field should be used for disclaimers and other useful info for CG artists that may affect the way they use the values. It's totally fine to leave this empty.", + "type": "string", + "maxLength": 500 + }, + "sources": { + "description": "Provide at least one source for the values.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "uniqueItems": true + }, + "tags": { + "description": "Tags", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "required": [ + "name", + "color", + "intensity", + "unit", + "category", + "description", + "sources" + ] + } +} diff --git a/schema-lightsources.json b/schemas/schema-lightsources.json similarity index 100% rename from schema-lightsources.json rename to schemas/schema-lightsources.json diff --git a/schema-materials.json b/schemas/schema-materials.json similarity index 78% rename from schema-materials.json rename to schemas/schema-materials.json index b0e2658..d060891 100644 --- a/schema-materials.json +++ b/schemas/schema-materials.json @@ -113,6 +113,51 @@ "minItems": 6, "maxItems": 6 }, + "variants": { + "description": "If the material comes in different variations, they can be described here.", + "type": "array", + "items": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "Name of the material.", + "type": "string", + "default": "Name" + }, + "color": { + "description": "Albedo, or metal color, RGB triplet (vec3) in linear decimal format in rec709 primaries.", + "type": "array", + "items": { + "type": "number" + }, + "default": [0.5, 0.5, 0.5], + "minItems": 3, + "maxItems": 3 + }, + "subsurfaceRadius": { + "description": "The approximate distance up to which light can scatter below the surface, also known as “mean free path” (MFP). Specified in centimeters.", + "type": "array", + "items": { + "type": "number" + }, + "default": [1, 1, 1], + "minItems": 3, + "maxItems": 3 + }, + "reference": { + "description": "Links to reference images.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "uniqueItems": true + } + }, + "required": ["name"] + } + }, "category": { "type": "array", "items": { diff --git a/workspace.code-workspace b/workspace.code-workspace index 718c4e1..e3cf105 100644 --- a/workspace.code-workspace +++ b/workspace.code-workspace @@ -8,19 +8,23 @@ "json.schemas": [ { "fileMatch": ["/deploy/materials.json"], - "url": "/schema-materials.json" + "url": "/schemas/schema-materials.json" }, { "fileMatch": ["/deploy/lightsources.json"], - "url": "/schema-lightsources.json" + "url": "/schemas/schema-lightsources.json" + }, + { + "fileMatch": ["/deploy/v2/lightsources.json"], + "url": "/schemas/schema-lightsources-v2.json" }, { "fileMatch": ["/deploy/cameras.json"], - "url": "/schema-cameras.json" + "url": "/schemas/schema-cameras.json" }, { - "fileMatch": ["/deploy/lenses.json"], - "url": "/schema-lenses.json" + "fileMatch": ["/deploy/v2/lenses.json"], + "url": "/schemas/schema-lenses-v2.json" } ] }