Skip to content

Commit

Permalink
Merge pull request #233 from asam-ev/143-required-fields-in-the-mater…
Browse files Browse the repository at this point in the history
…ial-schema

143 required fields in the material schema
  • Loading branch information
ClemensLinnhoff authored Dec 12, 2024
2 parents 7077981 + 7362945 commit 030d976
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 93 deletions.
2 changes: 1 addition & 1 deletion examples/example_mapping.xomm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"copyright": "(C) 2023-2024, Example Company",
"license": "MPL-2.0",
"author": "[email protected]",
"creationDate": "20240703T101728Z",
"creationDate": "20240703T101728Z"
},
"materialMapping": [
["Material_Sphere", "example_material.xomp", "white aluminum"],
Expand Down
16 changes: 7 additions & 9 deletions schemas/asset_schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "ASAM OpenMATERIAL Asset file definition.",
"description": "ASAM OpenMATERIAL 3D Geometry Asset file definition.",
"properties": {
"metadata": {
"type": "object",
Expand All @@ -27,7 +27,7 @@
},
"openMaterialVersion": {
"type": "string",
"description": "The version of the OpenMATERIAL specification used, adhering to semantic versioning (e.g., '1.0.0').",
"description": "The version of the OpenMATERIAL 3D specification used, adhering to semantic versioning (e.g., '1.0.0').",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"copyright": {
Expand All @@ -48,7 +48,7 @@
},
"creationDate": {
"type": "string",
"description": "The date and time of asset creation, formatted in ISO 8601 (e.g., '20240703T101728Z').",
"description": "The date and time of asset creation, formatted as YYYYMMDDTHHMMSSZ according to ISO 8601 (e.g., '20240703T101728Z').",
"pattern": "^\\d{8}T\\d{6}Z$"
},
"modelingMethod": {
Expand Down Expand Up @@ -83,7 +83,7 @@
},
"pbrMaterialWorkflow": {
"type": "string",
"description": "Indicates the usage of a Physically Based Rendering (PBR) material workflow as 'metallic', 'specular' or 'none'. This only applies to the internal materials of the 3D model file, not to mapped OpenMATERIAL property files.",
"description": "Indicates the usage of a Physically Based Rendering (PBR) material workflow as 'metallic', 'specular' or 'none'. This only applies to the internal materials of the 3D model file, not to mapped OpenMATERIAL 3D property files.",
"enum": [
"metallic",
"specular",
Expand Down Expand Up @@ -162,14 +162,12 @@
},
"required": [
"name",
"description",
"uuid",
"assetVersion",
"openMaterialVersion",
"copyright",
"license",
"author",
"creationDate",
"assetType",
"objectClass",
"animated",
Expand All @@ -183,12 +181,12 @@
},
"materialMappingUri": {
"type": "string",
"description": "Relative path to a material mapping file (.xomm). In this file, material names from the 3D model file or texture color codes from textures assigned in materialTextureAssignment are linked to OpenMATERIAL property files.",
"description": "Relative path to a material mapping file (.xomm). In this file, material names from the 3D model file or texture color codes from textures assigned in materialTextureAssignment are linked to OpenMATERIAL 3D property files.",
"pattern": ".*\\.xomm$"
},
"materialTextureAssignment": {
"type": "array",
"description": "Optional array containing material texture assignments. It links material names contained in the 3D model file to OpenMATERIAL assignment textures. In a separate material mapping file, the 'color' values in this texture are linked to OpenMATERIAL property files.",
"description": "Optional array containing material texture assignments. It links material names contained in the 3D model file to OpenMATERIAL 3D assignment textures. In a separate material mapping file, the 'color' values in this texture are linked to OpenMATERIAL 3D property files.",
"items": {
"type": "array",
"items": [
Expand All @@ -198,7 +196,7 @@
},
{
"type": "string",
"description": "File path to the OpenMATERIAL assignment texture. Supported texture formats are png and jpg.",
"description": "File path to the OpenMATERIAL 3D assignment texture. Supported texture formats are png and jpg.",
"pattern": "^(\\./|/)?([a-zA-Z0-9_\\-./]+)\\.(png|jpg|jpeg)$"
}
],
Expand Down
27 changes: 15 additions & 12 deletions schemas/mapping_schema.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Material Mapping Schema",
"type": "object",
"description": "ASAM OpenMATERIAL 3D Geometry Asset file definition.",
"properties": {
"metadata": {
"type": "object",
"description": "The key meta information about the mapping table, including its identity, authorship, technical specifications, and legal details.",
"properties": {
"name": {
"type": "string",
"description": "Name of the material mapping."
"description": "The display name of the material mapping table."
},
"description": {
"type": "string",
"description": "This is a short description of the material mapping table. Use 2-3 sentences."
"description": "Short description of the mapping table in 2 - 3 sentences."
},
"uuid": {
"type": "string",
"description": "Universally unique identifier for the material mapping in 8-4-4-4-12 format, see https://en.wikipedia.org/wiki/Universally_unique_identifier. The uuid stays the same, even if version is updated.",
"description": "Universally unique identifier for the mapping table in 8-4-4-4-12 format, see https://en.wikipedia.org/wiki/Universally_unique_identifier. The uuid stays the same, even if version is updated.",
"pattern": "\\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\\b$"
},
"mappingVersion": {
"type": "string",
"description": "Version of the mapping table.",
"description": "The version number of the mapping table, following semantic versioning (e.g., '1.0.0').",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"openMaterialVersion": {
"type": "string",
"description": "Version of the OpenMaterial format.",
"description": "The version of the OpenMATERIAL 3D specification used, adhering to semantic versioning (e.g., '1.0.0').",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"copyright": {
"type": "string",
"description": "Copyright information with year and company."
"description": "Indicates copyright details, including the year and copyright holder (e.g., '© 2024 ACME Inc.')."
},
"license": {
"type": "string",
"description": "License information. For common open source licenses, provide an SPDX identifier or a URL to the license."
"description": "Describes the license for asset distribution. Use an SPDX identifier for open-source licenses (e.g., 'MIT'), or provide a URL or filename for proprietary licenses."
},
"author": {
"type": "string",
"description": "Email address or name of the author. Can also be a company name."
"description": "Lists the author(s) of the asset as a name, email, or company. Multiple authors should be comma-separated."
},
"creationDate": {
"type": "string",
"description": "Date and time when the material mapping was created in ISO 8601 format.",
"description": "The date and time of asset creation, formatted as YYYYMMDDTHHMMSSZ according to ISO 8601 (e.g., '20240703T101728Z').",
"pattern": "^\\d{8}T\\d{6}Z$"
}
},
Expand All @@ -52,7 +53,9 @@
"uuid",
"mappingVersion",
"openMaterialVersion",
"creationDate"
"copyright",
"license",
"author"
]
},
"materialMapping": {
Expand All @@ -63,7 +66,7 @@
"items": [
{
"type": "string",
"description": "Material name or RGB code. The RGB code represents color values in an OpenMATERIAL assignment texture."
"description": "Material name or RGB code. The RGB code represents color values in an OpenMATERIAL 3D assignment texture."
},
{
"type": "string",
Expand Down
29 changes: 14 additions & 15 deletions schemas/material_brdf_schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "ASAM OpenMATERIAL 3D Material BRDF look-up table file definition.",
"properties": {
"metadata": {
"type": "object",
"description": "Metadata about the material.",
"description": "The key meta information about the BRDF look-up table.",
"properties": {
"name": {
"type": "string",
"description": "Name of the material."
"description": "The display name of the material, such as 'Red brick' or 'Dark asphalt'."
},
"description": {
"type": "string",
Expand All @@ -21,42 +22,40 @@
},
"materialVersion": {
"type": "string",
"description": "Version of the material.",
"description": "The version number of the material, following semantic versioning (e.g., '1.0.0').",
"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.",
"description": "The version of the OpenMATERIAL 3D specification used, adhering to semantic versioning (e.g., '1.0.0').",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"copyright": {
"type": "string",
"description": "Copyright information with year and company."
"description": "Indicates copyright details, including the year and copyright holder (e.g., '© 2024 ACME Inc.')."
},
"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."
"description": "Describes the license for asset distribution. Use an SPDX identifier for open-source licenses (e.g., 'MIT'), or provide a URL or filename for proprietary licenses."
},
"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."
"description": "Lists the author(s) of the asset as a name, email, or company. Multiple authors should be comma-separated."
},
"creationDate": {
"type": "string",
"description": "The date and time of asset creation, formatted as YYYYMMDDTHHMMSSZ according to ISO 8601 (e.g., '20240703T101728Z').",
"pattern": "^\\d{8}T\\d{6}Z$"
},
"source": {
"type": "string",
"description": "Source of the brdf data."
"description": "Source of the BRDF data. Was is measured, simulated, or taken from literature?"
}
},
"required": [
"name",
"description",
"uuid",
"materialVersion",
"creationDate",
"openMaterialVersion",
"copyright",
"license",
Expand Down
29 changes: 14 additions & 15 deletions schemas/material_emp_schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "ASAM OpenMATERIAL 3D Material electro-magnetic properties look-up table file definition.",
"properties": {
"metadata": {
"type": "object",
"description": "Metadata about the material.",
"description": "The key meta information about the EMP look-up table.",
"properties": {
"name": {
"type": "string",
"description": "Name of the material."
"description": "The display name of the material, such as 'Red brick' or 'Dark asphalt'."
},
"description": {
"type": "string",
Expand All @@ -21,42 +22,40 @@
},
"materialVersion": {
"type": "string",
"description": "Version of the material.",
"description": "The version number of the material, following semantic versioning (e.g., '1.0.0').",
"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.",
"description": "The version of the OpenMATERIAL 3D specification used, adhering to semantic versioning (e.g., '1.0.0').",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"copyright": {
"type": "string",
"description": "Copyright information with year and company."
"description": "Indicates copyright details, including the year and copyright holder (e.g., '© 2024 ACME Inc.')."
},
"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."
"description": "Describes the license for asset distribution. Use an SPDX identifier for open-source licenses (e.g., 'MIT'), or provide a URL or filename for proprietary licenses."
},
"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."
"description": "Lists the author(s) of the asset as a name, email, or company. Multiple authors should be comma-separated."
},
"creationDate": {
"type": "string",
"description": "The date and time of asset creation, formatted as YYYYMMDDTHHMMSSZ according to ISO 8601 (e.g., '20240703T101728Z').",
"pattern": "^\\d{8}T\\d{6}Z$"
},
"source": {
"type": "string",
"description": "Source of the electromagnetic property data."
"description": "Source of the electro-magnetic property data. Was is measured, simulated, or taken from literature?"
}
},
"required": [
"name",
"description",
"uuid",
"materialVersion",
"creationDate",
"openMaterialVersion",
"copyright",
"license",
Expand Down
Loading

0 comments on commit 030d976

Please sign in to comment.