forked from asam-ev/OpenMATERIAL-3D
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ClemensLinnhoff/material-mapping-and-assi…
…gnment Material mapping and assignment
- Loading branch information
Showing
12 changed files
with
473 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"metadata": { | ||
"name": "example_mapping", | ||
"description": "This is an example for a material mapping table. This file can be shared between multiple assets.", | ||
"uuid": "c492bda27c8443e6be1903115545e844", | ||
"mappingVersion": "1.0.0", | ||
"openMaterialVersion": "1.0.0", | ||
"copyright": "(C) 2023-2024, Example Company", | ||
"license": "MPL-2.0", | ||
"author": "[email protected]", | ||
"creationDate": "20240703T101728Z", | ||
}, | ||
"materialMapping": [ | ||
["material_red", "materials/material_a.xomp", "metal with red paint"], | ||
["rgba:10;50;255;127", "materials/material_a.xomp", "metal with red paint"], | ||
["material_green", "materials/material_b.xomp", "metal with green paint"], | ||
["material_blue", "materials/material_c.xomp", "metal with blue paint"] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Material Mapping Schema", | ||
"type": "object", | ||
"properties": { | ||
"metadata": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "Name of the material mapping." | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "This is a short description of the material mapping table. Use 2-3 sentences." | ||
}, | ||
"uuid": { | ||
"type": "string", | ||
"description": "Universally unique identifier for the material mapping.", | ||
"pattern": "^[a-f0-9]{32}$" | ||
}, | ||
"mappingVersion": { | ||
"type": "string", | ||
"description": "Version of the mapping table.", | ||
"pattern": "^\\d+\\.\\d+\\.\\d+$" | ||
}, | ||
"openMaterialVersion": { | ||
"type": "string", | ||
"description": "Version of the OpenMaterial format.", | ||
"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 or a URL to the license." | ||
}, | ||
"author": { | ||
"type": "string", | ||
"description": "Email address or name of the author. Can also be a company name." | ||
}, | ||
"creationDate": { | ||
"type": "string", | ||
"description": "Date and time when the material mapping was created in ISO 8601 format.", | ||
"pattern": "^\\d{8}T\\d{6}Z$" | ||
} | ||
}, | ||
"required": ["name", "uuid", "mappingVersion", "openMaterialVersion", "creationDate"] | ||
}, | ||
"materialMapping": { | ||
"type": "array", | ||
"description": "Array containing material mappings.", | ||
"items": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string", | ||
"description": "Material name or RGBA code." | ||
}, | ||
{ | ||
"type": "string", | ||
"description": "File path to the material.", | ||
"pattern": "^(\\./|/)?([a-zA-Z0-9_\\-./]+)\\.xomp$" | ||
}, | ||
{ | ||
"type": "string", | ||
"description": "Description of the material." | ||
} | ||
], | ||
"minItems": 3, | ||
"maxItems": 3 | ||
} | ||
} | ||
}, | ||
"required": ["metadata", "materialMapping"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
= Asset schema | ||
|
||
== metadata | ||
|
||
Metadata about the asset. | ||
|
||
=== name | ||
Name of the asset. | ||
|
||
*Required:* Yes | ||
|
||
=== description | ||
Short description of the asset in 2 - 3 sentences. | ||
|
||
*Required:* Yes | ||
|
||
=== uuid | ||
Universally unique identifier for the asset. | ||
|
||
*Pattern:* `^[a-f0-9]\{32\}$` | ||
|
||
*Required:* Yes | ||
|
||
=== assetVersion | ||
Version of the asset. | ||
|
||
*Pattern:* `^\\d+\\.\\d+\\.\\d+$` | ||
|
||
*Required:* Yes | ||
|
||
=== openMaterialVersion | ||
Version of OpenMATERIAL. | ||
|
||
*Pattern:* `^\\d+\\.\\d+\\.\\d+$` | ||
|
||
*Required:* Yes | ||
|
||
=== copyright | ||
Copyright information with year and company. | ||
|
||
*Required:* Yes | ||
|
||
=== license | ||
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. | ||
|
||
*Required:* Yes | ||
|
||
=== author | ||
Name or email address of the author of this asset. In case of multiple authors, use comma-separation. The author can also be a company name. | ||
|
||
*Required:* Yes | ||
|
||
=== modelCreationTool | ||
The tool or software used to generate the 3D model of this asset. | ||
|
||
*Required:* No | ||
|
||
=== creationDate | ||
Creation date of the asset in the format YYYYMMDDTHHMMSSZ. | ||
|
||
*Pattern:* `^\\d\{8\}T\\d\{6\}Z$` | ||
|
||
*Required:* Yes | ||
|
||
=== modelingMethod | ||
Description how the 3D model was modeled. Was it modeled based on a 3D scan, based on photos, or freehand? | ||
|
||
*Required:* No | ||
|
||
=== validationDescription | ||
Was the geometry of the 3D model validated against a real-world object? If yes, how? | ||
|
||
*Required:* No | ||
|
||
=== assetType | ||
Type of the asset out of the following: object (individual object), scene (a collection of multiple objects) | ||
|
||
*Required:* Yes | ||
|
||
=== objectClass | ||
The class of the object. This only applies if 'asset_type' == 'object'. | ||
|
||
*Required:* Yes | ||
|
||
=== animated | ||
Does the 3D model contain keyframe animations? | ||
|
||
*Required:* Yes | ||
|
||
=== pbrMaterialWorkflow | ||
Does the 3D model contain materials for a PBR workflow? If yes, for a metallic or specular workflow? | ||
|
||
*Required:* Yes | ||
|
||
=== triangleCount | ||
The number of triangles in the 3D model. One quad counts as two triangles. | ||
|
||
*Required:* Yes | ||
|
||
=== meshCount | ||
The number of meshes in the 3D geometry. | ||
|
||
*Required:* Yes | ||
|
||
=== textureResolutions | ||
List of all texture resolutions in the 3D model. This can include any combination of '1K', '2K', or '4K'. | ||
|
||
No description | ||
|
||
*Required:* Yes | ||
|
||
=== normalMapFormat | ||
Does the 3D model have normal maps as textures? If yes, are they using the DirectX format or the OpenGL format? | ||
|
||
*Required:* Yes | ||
|
||
=== boundingBox | ||
Axis-aligned bounding box dimensions specifying the minimum and maximum values in x, y, and z direction. | ||
|
||
*Required:* Yes | ||
|
||
==== x | ||
Minimum and maximum values in m in x direction. | ||
|
||
No description | ||
|
||
*Required:* Yes | ||
|
||
==== y | ||
Minimum and maximum values in m in y direction. | ||
|
||
No description | ||
|
||
*Required:* Yes | ||
|
||
==== z | ||
Minimum and maximum values in m in z direction. | ||
|
||
No description | ||
|
||
*Required:* Yes | ||
|
||
== materialTextureAssignment | ||
|
||
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. | ||
|
||
|
||
Columns of the table: | ||
|
||
- Column 1: Name of the material in the 3D model file. | ||
- Column 2: File path to the OpenMATERIAL assignment texture. Supported texture formats are png and jpg. | ||
|
Oops, something went wrong.