-
Notifications
You must be signed in to change notification settings - Fork 5
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
155 provide example for the material mapping #156
Open
ClemensLinnhoff
wants to merge
6
commits into
main
Choose a base branch
from
155-provide-example-for-the-material-mapping
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
230cacd
Add example fr material assignment and mapping
ClemensLinnhoff c51c068
Add readme explaining the examples
ClemensLinnhoff 03e08c5
Fix asset and material file
ClemensLinnhoff e760bdf
Fix object class
ClemensLinnhoff f64bfe4
Add uri to mapping file
ClemensLinnhoff 595c768
Add further description
ClemensLinnhoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Examples | ||
|
||
This folder contains examples for all file formats defined in ASAM OpenMATERIAL. | ||
This showcases the usage of asset files alongside a 3D model file, the material assignment via mesh or texture, the mapping to material property files als well as the definition of specific property look-up tables. | ||
|
||
| File Name | Description | | ||
|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `checker.png` | Visual texture used in the 3D model. | | ||
| `checker_xom.png` | ASAM OpenMATERIAL assignment texture used to assign different materials to certain parts of the object (texture-based material assignment). | | ||
| `example_asset.gltf/bin` | 3D model file in glTF format, representing the 3D geometry. | | ||
| `example_asset.xoma` | ASAM OpenMATERIAL asset file (.xoma), containing asset metadata and the link to the assignment texture. | | ||
| `example_mapping.xomm` | Material mapping file (.xomm), providing mappings for different material definitions, per mesh or texture color value. | | ||
| `example_material.xomp` | ASAM OpenMATERIAL material property file (.xomp), defining core material characteristics. | | ||
| `example_material_2.xomp` | Second example of an ASAM OpenMATERIAL material property file to showcase the mapping of multiple materials. | | ||
| `example_material_emp.xompt` | Material property look-up table (.xompt), containing electromagnetic properties. | | ||
| `example_material_camera_brdf.xompt` | Material property look-up table (.xompt), containing BRDF data specific to camera sensors. | | ||
| `example_material_lidar_brdf.xompt` | Material property look-up table (.xompt), containing BRDF data specific to lidar sensors. | | ||
| `example_material_radar_brdf.xompt` | Material property look-up table (.xompt), containing BRDF data specific to radar sensors. | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,218 @@ | ||
{ | ||
"asset":{ | ||
"generator":"Khronos glTF Blender I/O v4.2.57", | ||
"version":"2.0" | ||
}, | ||
"scene":0, | ||
"scenes":[ | ||
{ | ||
"name":"Scene", | ||
"nodes":[ | ||
0 | ||
] | ||
} | ||
], | ||
"nodes":[ | ||
{ | ||
"mesh":0, | ||
"name":"Cube" | ||
} | ||
], | ||
"materials":[ | ||
{ | ||
"doubleSided":true, | ||
"name":"Material_Cube", | ||
"pbrMetallicRoughness":{ | ||
"baseColorTexture":{ | ||
"index":0 | ||
}, | ||
"metallicFactor":0, | ||
"roughnessFactor":0.5 | ||
} | ||
}, | ||
{ | ||
"doubleSided":true, | ||
"name":"Material_Sphere", | ||
"pbrMetallicRoughness":{ | ||
"baseColorFactor":[ | ||
0.800000011920929, | ||
0.800000011920929, | ||
0.800000011920929, | ||
1 | ||
], | ||
"metallicFactor":0, | ||
"roughnessFactor":0.5 | ||
} | ||
} | ||
], | ||
"meshes":[ | ||
{ | ||
"name":"Cube", | ||
"primitives":[ | ||
{ | ||
"attributes":{ | ||
"POSITION":0, | ||
"NORMAL":1, | ||
"TEXCOORD_0":2 | ||
}, | ||
"indices":3, | ||
"material":0 | ||
}, | ||
{ | ||
"attributes":{ | ||
"POSITION":4, | ||
"NORMAL":5, | ||
"TEXCOORD_0":6 | ||
}, | ||
"indices":7, | ||
"material":1 | ||
} | ||
] | ||
} | ||
], | ||
"textures":[ | ||
{ | ||
"sampler":0, | ||
"source":0 | ||
} | ||
], | ||
"images":[ | ||
{ | ||
"mimeType":"image/png", | ||
"name":"Asset 1", | ||
"uri":"checker.png" | ||
} | ||
], | ||
"accessors":[ | ||
{ | ||
"bufferView":0, | ||
"componentType":5126, | ||
"count":16, | ||
"max":[ | ||
1, | ||
2, | ||
1 | ||
], | ||
"min":[ | ||
-1, | ||
0, | ||
-1 | ||
], | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":1, | ||
"componentType":5126, | ||
"count":16, | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":2, | ||
"componentType":5126, | ||
"count":16, | ||
"type":"VEC2" | ||
}, | ||
{ | ||
"bufferView":3, | ||
"componentType":5123, | ||
"count":42, | ||
"type":"SCALAR" | ||
}, | ||
{ | ||
"bufferView":4, | ||
"componentType":5126, | ||
"count":296, | ||
"max":[ | ||
0.999999463558197, | ||
3, | ||
0.9999994039535522 | ||
], | ||
"min":[ | ||
-0.9999992847442627, | ||
2, | ||
-0.9999986886978149 | ||
], | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":5, | ||
"componentType":5126, | ||
"count":296, | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":6, | ||
"componentType":5126, | ||
"count":296, | ||
"type":"VEC2" | ||
}, | ||
{ | ||
"bufferView":7, | ||
"componentType":5123, | ||
"count":1440, | ||
"type":"SCALAR" | ||
} | ||
], | ||
"bufferViews":[ | ||
{ | ||
"buffer":0, | ||
"byteLength":192, | ||
"byteOffset":0, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":192, | ||
"byteOffset":192, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":128, | ||
"byteOffset":384, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":84, | ||
"byteOffset":512, | ||
"target":34963 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":3552, | ||
"byteOffset":596, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":3552, | ||
"byteOffset":4148, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":2368, | ||
"byteOffset":7700, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":2880, | ||
"byteOffset":10068, | ||
"target":34963 | ||
} | ||
], | ||
"samplers":[ | ||
{ | ||
"magFilter":9728, | ||
"minFilter":9984 | ||
} | ||
], | ||
"buffers":[ | ||
{ | ||
"byteLength":12948, | ||
"uri":"example_asset.bin" | ||
} | ||
] | ||
} |
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,35 @@ | ||
{ | ||
"metadata": { | ||
"name": "another example", | ||
"description": "Second example material to showcase OpenMATERIAL assignment and mapping", | ||
"uuid": "807db46a39654e5d83d43ddebad07dc3", | ||
"materialVersion": "1.0.0", | ||
"creationDate": "20241024T110000Z", | ||
"openMaterialVersion": "1.0.0", | ||
"copyright": "(C) 2023-2024, Example Company", | ||
"license": "MPL-2.0", | ||
"author": "[email protected]" | ||
}, | ||
"materialProperties": { | ||
"surfaceRoughness": { | ||
"surfaceHeightRms": 0.5, | ||
"surfaceCorrelationLength": 0.3, | ||
"source": "estimate" | ||
}, | ||
"emissivityData": { | ||
"emissivityCoefficient": 0.07, | ||
"temperature": 300.0, | ||
"source": "internet: https://www.engineeringtoolbox.com/emissivity-coefficients-d_447.html" | ||
}, | ||
"elasticityData": { | ||
"youngsModulus": 70e9, | ||
"poissonsRatio": 0.35, | ||
"source": "internet: https://en.wikipedia.org/wiki/Aluminium" | ||
}, | ||
"densityData": { | ||
"density": 2699.0, | ||
"source": "internet: https://en.wikipedia.org/wiki/Aluminium" | ||
}, | ||
"electromagneticPropertiesUri": "example_material_emp.xompt" | ||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @ClemensLinnhoff i am wondering if we should limit ourself to RGB values here. 24 Bit, 16 Mio values enough for all kinds of MaterialIDs.
I think that the alpha value could be useful for something we plan in OpenMaterial 2.0. But if people now already use the alpha channel for IDs, then its hard to change.
My idea here would be to reserve the alpha channel for the future. Maybe for layered Materials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding this: we may also want to clarify, that the MaterialID Textures need to be 32Bit RGBA.
or do we want to support 24Bit RGB as well?