Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change snake_case to camelCase in json files and schemas; Change material metadata #110

Merged
merged 8 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions examples/example_asset.xoma
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
"name": "example_car",
"description": "This is an example car asset. It demonstrates how OpenMATERIAL assets work.",
"uuid": "87769375a5109c689af8cc3ad3dd8349",
"asset_version": "1.0.0",
"openmaterial_version": "1.0.0",
"assetVersion": "1.0.0",
"openMaterialVersion": "1.0.0",
"copyright": "(C) 2023-2024, Example Company",
"license": "MPL-2.0",
"author": "[email protected]",
"model_creation_tool": "Blender",
"creation_date": "20240703T101728Z",
"modeling_method": "Modeled according to images",
"validation_description": "The dimensions of the vehicle in x, y and z where compared to a real vehicle. They were accurate within a margin of 0.01 m.",
"asset_type": "object",
"object_class": "vehicle",
"modelCreationTool": "Blender",
"creationDate": "20240703T101728Z",
"modelingMethod": "Modeled according to images",
"validationDescription": "The dimensions of the vehicle in x, y and z where compared to a real vehicle. They were accurate within a margin of 0.01 m.",
"assetType": "object",
"objectClass": "vehicle",
"animated": false,
"pbr_material_workflow": "metallic",
"triangle_count": 100000,
"mesh_count": 10,
"texture_resolutions": ["2K"],
"normal_map_format": "OpenGL",
"bounding_box": {
"pbrMaterialWorkflow": "metallic",
"triangleCount": 100000,
"meshCount": 10,
"textureResolutions": ["2K"],
"normalMapFormat": "OpenGL",
"boundingBox": {
"x" : [-2.5, 2.5],
"y" : [-1.1, 1.1],
"z" : [0.0, 1.5]
}
},
"material_mapping": [
"materialMapping": [
["10;50;255;127", "example_material.xomp", "metal with red paint"]
]
}
34 changes: 17 additions & 17 deletions examples/example_material.xomp
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"metadata": {
"copyright" : "(C) 2023-2024, Example Company",
"generator": "Example Companies Fancy Material Tool",
"openmaterial_version": "1.0.0",
"creator": "Example Company",
"creation_date": "20240703T101728Z",
"material_version": "1.0.0",
"id": "fe7d707050e545f19f2658ecacb6ac5e",
"name": "aluminum",
"description": "aluminum material"
"description": "aluminum material",
"uuid": "fe7d707050e545f19f2658ecacb6ac5e",
"materialVersion": "1.0.0",
"creationDate": "20240703T101728Z",
"openMaterialVersion": "1.0.0",
"copyright": "(C) 2023-2024, Example Company",
"license": "MPL-2.0",
"author": "[email protected]",
},
"material_properties": {
"surface_roughness": {
"surface_height_rms": 0.8,
"surface_correlation_length": 1.0
"materialProperties": {
"surfaceRoughness": {
"surfaceHeightRms": 0.8,
"surfaceCorrelationLength": 1.0
},
"elasticity_data": {
"youngs_modulus": 70e9,
"poissons_ratio": 0.35,
"elasticityData": {
"youngsModulus": 70e9,
"poissonsRatio": 0.35,
"source": "internet: https://en.wikipedia.org/wiki/Aluminium"
},
"density_data": {
"densityData": {
"density": 2699.0,
"source": "internet: https://en.wikipedia.org/wiki/Aluminium"
},
"electromagnetic_properties_uri": "example_material_emp.xompt"
"electromagneticPropertiesUri": "example_material_emp.xompt"
}
}
18 changes: 9 additions & 9 deletions examples/example_material_emp.xompt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"metadata": {
"copyright" : "(C) 2023-2024, Example Company",
"generator": "Example Companies Fancy Material Tool",
"openmaterial_version": "1.0.0",
"creator": "Example Company",
"creation_date": "20240703T101728Z",
"material_version": "1.0.0",
"id": "bea5a5f266e74b938a8cd773992dc09c",
"name": "aluminum_emp",
"description": "Electromagnetic properties of aluminum"
"description": "Electromagnetic properties of aluminum",
"uuid": "bea5a5f266e74b938a8cd773992dc09c",
"materialVersion": "1.0.0",
"creationDate": "20240703T101728Z",
"openMaterialVersion": "1.0.0",
"copyright": "(C) 2023-2024, Example Company",
"license": "MPL-2.0",
"author": "[email protected]",
},
"electromagnetic_properties": [
"electromagneticProperties": [
[500e-9, 293.0, 50.0, 0.000001256665, 0.0, -56.0, 24.0],
[500e-9, 300.0, 50.0, 0.000001256665, 0.0, -57.0, 25.0],
[905e-9, 293.0, 50.0, 0.000001256665, 0.0, -182.7, 51.4],
Expand Down
54 changes: 27 additions & 27 deletions schemas/asset_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"description": "Universally unique identifier for the asset.",
"pattern": "^[a-f0-9]{32}$"
},
"asset_version": {
"assetVersion": {
"type": "string",
"description": "Version of the asset.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"openmaterial_version": {
"openMaterialVersion": {
"type": "string",
"description": "Version of OpenMATERIAL.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
Expand All @@ -42,29 +42,29 @@
"type": "string",
"description": "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."
},
"model_creation_tool": {
"modelCreationTool": {
"type": "string",
"description": "The tool or software used to generate the 3D model of this asset."
},
"creation_date": {
"creationDate": {
"type": "string",
"description": "Creation date of the asset in the format YYYYMMDDTHHMMSSZ.",
"pattern": "^\\d{8}T\\d{6}Z$"
},
"modeling_method": {
"modelingMethod": {
"type": "string",
"description": "Description how the 3D model was modeled. Was it modeled based on a 3D scan, based on photos, or freehand?"
},
"validation_description": {
"validationDescription": {
"type": "string",
"description": "Was the geometry of the 3D model validated against a real-world object? If yes, how?"
},
"asset_type": {
"assetType": {
"type": "string",
"description": "Type of the asset out of the following: object (individual object), scene (a collection of multiple objects)",
"enum": ["object", "scene"]
},
"object_class": {
"objectClass": {
"type": "string",
"description": "The class of the object. This only applies if 'asset_type' == 'object'.",
"enum": ["vehicle", "human", "road_network", "other"]
Expand All @@ -73,20 +73,20 @@
"type": "boolean",
"description": "Does the 3D model contain keyframe animations?"
},
"pbr_material_workflow": {
"pbrMaterialWorkflow": {
"type": "string",
"description": "Does the 3D model contain materials for a PBR workflow? If yes, for a metallic or specular workflow?",
"enum": ["metallic", "specular", "none"]
},
"triangle_count": {
"triangleCount": {
"type": "integer",
"description": "The number of triangles in the 3D model. One quad counts as two triangles."
},
"mesh_count": {
"meshCount": {
"type": "integer",
"description": "The number of meshes in the 3D geometry."
},
"texture_resolutions": {
"textureResolutions": {
"type": "array",
"description": "List of all texture resolutions in the 3D model. This can include any combination of '1K', '2K', or '4K'.",
"items": {
Expand All @@ -96,12 +96,12 @@
"minItems": 1,
"uniqueItems": true
},
"normal_map_format": {
"normalMapFormat": {
"type": "string",
"description": "Does the 3D model have normal maps as textures? If yes, are they using the DirectX format or the OpenGL format?",
"enum": ["DirectX", "OpenGL", "none"]
},
"bounding_box": {
"boundingBox": {
"type": "object",
"description": "Axis-aligned bounding box dimensions specifying the minimum and maximum values in x, y, and z direction.",
"properties": {
Expand Down Expand Up @@ -140,24 +140,24 @@
"name",
"description",
"uuid",
"asset_version",
"openmaterial_version",
"assetVersion",
"openMaterialVersion",
"copyright",
"license",
"author",
"creation_date",
"asset_type",
"object_class",
"creationDate",
"assetType",
"objectClass",
"animated",
"pbr_material_workflow",
"triangle_count",
"mesh_count",
"texture_resolutions",
"normal_map_format",
"bounding_box"
"pbrMaterialWorkflow",
"triangleCount",
"meshCount",
"textureResolutions",
"normalMapFormat",
"boundingBox"
]
},
"material_mapping": {
"materialMapping": {
"type": "array",
"description": "Mapping of materials used in the asset",
"items": {
Expand Down Expand Up @@ -185,6 +185,6 @@
},
"required": [
"metadata",
"material_mapping"
"materialMapping"
]
}
63 changes: 31 additions & 32 deletions schemas/material_emp_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,62 @@
"properties": {
"metadata": {
"type": "object",
"description": "Metadata related to the material.",
"description": "Metadata about the material.",
"properties": {
"copyright": {
"name": {
"type": "string",
"description": "Copyright information.",
"pattern": "^\\(C\\) \\d{4}-\\d{4}, .+$"
"description": "Name of the material."
},
"generator": {
"description": {
"type": "string",
"description": "Software or tool used to generate the material."
"description": "Short description of the material in 2 - 3 sentences."
},
"openmaterial_version": {
"uuid": {
"type": "string",
"description": "Version of OpenMATERIAL.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
"description": "Universally unique identifier for the material.",
"pattern": "^[a-f0-9]{32}$"
},
"creator": {
"materialVersion": {
"type": "string",
"description": "Creator of the material."
"description": "Version of the material.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"creation_date": {
"creationDate": {
"type": "string",
"description": "Date when the material was created, in the format YYYYMMDDTHHMMSSZ.",
"description": "Creation date of the material in the format YYYYMMDDTHHMMSSZ.",
"pattern": "^\\d{8}T\\d{6}Z$"
},
"material_version": {
"openMaterialVersion": {
"type": "string",
"description": "Version of the material.",
"description": "Version of OpenMATERIAL.",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"id": {
"copyright": {
"type": "string",
"description": "Unique identifier for the material.",
"pattern": "^[a-f0-9]{32}$"
"description": "Copyright information with year and company."
},
"name": {
"license": {
"type": "string",
"description": "Name of the material."
"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": {
"author": {
"type": "string",
"description": "Description of the material."
"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."
}
},
"required": [
"copyright",
"generator",
"openmaterial_version",
"creator",
"creation_date",
"material_version",
"id",
"name",
"description"
"description",
"uuid",
"materialVersion",
"creationDate",
"openMaterialVersion",
"copyright",
"license",
"author"
]
},
"electromagnetic_properties": {
"electromagneticProperties": {
"type": "array",
"items": {
"type": "array",
Expand Down Expand Up @@ -102,6 +101,6 @@
},
"required": [
"metadata",
"electromagnetic_properties"
"electromagneticProperties"
]
}
Loading