Skip to content

Commit

Permalink
Merge pull request #15 from ClemensLinnhoff/50-add-brdf-look-up-table…
Browse files Browse the repository at this point in the history
…-to-the-material-data

50 add brdf look up table to the material data
  • Loading branch information
ClemensLinnhoff authored Oct 23, 2024
2 parents d58ebc2 + 1616009 commit c37a792
Show file tree
Hide file tree
Showing 9 changed files with 13,294 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/antora-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
mv material-schema.adoc ../content/material/
python3 json2asciidoc.py ../schemas/material_emp_schema.json
mv material-emp-schema.adoc ../content/material/
python3 json2asciidoc.py ../schemas/material_brdf_schema.json
mv material-brdf-schema.adoc ../content/material/
- name: Configure Pages
uses: actions/configure-pages@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/validate-json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ jobs:
with:
schema: ./schemas/material_emp_schema.json
file: ./examples/*_emp.xompt

- name: Validate brdf JSON schemas
uses: cardinalby/schema-validator-action@v3
with:
schema: ./schemas/material_brdf_schema.json
file: ./examples/*_brdf.xompt
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@
.vscode/
.idea/

# Autogenerated files
content/geometry/metadata.adoc
content/material/metadata.adoc
content/material/material-properties.adoc
content/material/electromagnetic-properties.adoc
# Autogenerated schema documentation files
content/*/*schema.adoc
1 change: 1 addition & 0 deletions content/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ include::material/introduction.adoc[leveloffset=+1]
include::material/file-structure.adoc[leveloffset=+1]
include::material/material-schema.adoc[leveloffset=+1]
include::material/material-emp-schema.adoc[leveloffset=+1]
include::material/material-brdf-schema.adoc[leveloffset=+1]
Expand Down
1 change: 1 addition & 0 deletions content/nav-openmaterial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
** xref:material/file-structure.adoc[]
** xref:material/material-schema.adoc[]
** xref:material/material-emp-schema.adoc[]
** xref:material/material-brdf-schema.adoc[]



Expand Down
9,259 changes: 9,259 additions & 0 deletions examples/example_material_camera_brdf.xompt

Large diffs are not rendered by default.

926 changes: 926 additions & 0 deletions examples/example_material_lidar_brdf.xompt

Large diffs are not rendered by default.

2,949 changes: 2,949 additions & 0 deletions examples/example_material_radar_brdf.xompt

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions schemas/material_brdf_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"description": "Metadata about the material.",
"properties": {
"name": {
"type": "string",
"description": "Name of the material."
},
"description": {
"type": "string",
"description": "Short description of the material in 2 - 3 sentences."
},
"uuid": {
"type": "string",
"description": "Universally unique identifier for the material.",
"pattern": "^[a-f0-9]{32}$"
},
"materialVersion": {
"type": "string",
"description": "Version of the material.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"creationDate": {
"type": "string",
"description": "Creation date of the material in the format YYYYMMDDTHHMMSSZ.",
"pattern": "^\\d{8}T\\d{6}Z$"
},
"openMaterialVersion": {
"type": "string",
"description": "Version of OpenMATERIAL.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"copyright": {
"type": "string",
"description": "Copyright information with year and company."
},
"license": {
"type": "string",
"description": "License information. For common open source licenses, provide an SPDX identifier. For other types of licenses, provide an URL to a webpage with the license or the filename of a separately provided license file."
},
"author": {
"type": "string",
"description": "Name or email address of the author of this material. In case of multiple authors, use comma-separation. The author can also be a company name."
},
"source": {
"type": "string",
"description": "Source of the brdf data."
}
},
"required": [
"name",
"description",
"uuid",
"materialVersion",
"creationDate",
"openMaterialVersion",
"copyright",
"license",
"author",
"source"
]
},
"brdf": {
"type": "object",
"description": "General information about the lookup table.",
"properties": {
"typicalSensor": {
"type": "string",
"description": "Typical sensor technology this BRDF table is used for, e.g., radar, lidar, camera."
},
"wavelengthRange": {
"type": "array",
"description": "Wavelength range covered by the lookup table.",
"items": [
{
"type": "number",
"description": "Min wavelength in meters."
},
{
"type": "number",
"description": "Max wavelength in meters."
}
],
"minItems": 2,
"maxItems": 2
},
"amplitudeUnit": {
"type": "string",
"description": "The unit of amplitude, either \"1/sr\" or \"linear\"",
"enum": ["1/sr", "linear"]
},
"lookupTable": {
"type": "array",
"items": {
"type": "array",
"description": "Array of bidirectional reflectance distribution function (BRDF) values, with each item representing a different property. The array SHALL be sorted based on the columns starting with the first.",
"items": [
{
"type": ["number", "null"],
"description": "Incident elevation angle in rad."
},
{
"type": ["number", "null"],
"description": "Exit elevation angle in rad."
},
{
"type": ["number", "null"],
"description": "Exit azimuth angle in rad (for BRDFs with incident and exit vectors on the same plane as the normal, exit azimuth angle is 0.)"
},
{
"type": ["number", "null"],
"description": "Polarized plane angle in rad. This is the angle between the plane containing the incident, exit, and normal vector, and the plane of polarization."
},
{
"type": ["number", "null"],
"description": "Wavelength in meters."
},
{
"type": ["number", "null"],
"description": "Amplitude within the linearly polarized plane."
},
{
"type": ["number", "null"],
"description": "Phase within the linearly polarized plane. If the phase is not taken into account, it is null."
}
],
"minItems": 7,
"maxItems": 7
}
}
},
"required": [
"typicalSensor",
"wavelengthRange",
"amplitudeUnit",
"lookupTable"
]
}
},
"required": [
"metadata",
"brdf"
]
}

0 comments on commit c37a792

Please sign in to comment.