@Marco13 Thx. But now I know How injected metadata to own buildings:
here is my example:
budynki.zip (217.5 KB)
-
I create buildings in Blender with _FEATURE_ID_0:
-
Connect vertexes to _FEATURE_ID_0
-
Export gltTF with attribute table:
-
Create own binary file with metadata:
Form me cesium#estimatedHeight :
FLOAT32 big-endian hexa 0x00002041 = 10
FLOAT32 big-endian hexa 0x0000F041 = 30
FLOAT32 big-endian hexa 0x00004842 = 50
elemetID:
INT32 hexa 0x00000000 = 0
INT32 hexa 0x01000000 = 1
INT32 hexa 0x02000000 = 2
- Connect metadata file to glt:
"buffers":[
{
"byteLength":3384,
"uri":"budynki.bin"
},
{
"name": "bufferMeta",
"byteLength": 24,
"uri": "bufferMeta.bin"
}
],
- Create bufferViews with metadata:
"bufferViews":[
{
...
},
{
"buffer": 1,
"byteLength": 12,
"byteOffset": 0
},
{
"buffer": 1,
"byteLength": 12,
"byteOffset": 12
}
],
- add accessors with metadata:
"accessors":[
{
..
},
{
"bufferView":6,
"componentType":5126,
"count":12,
"type":"SCALAR",
"max":[
50
],
"min":[
10
]
},
{
"bufferView":7,
"componentType":5125,
"count":12,
"type":"SCALAR",
"max":[
2
],
"min":[
0
]
}
],
- connect to mesh:
"meshes":[
{
"name":"Cube.003",
"primitives":[
{
"attributes":{
"_FEATURE_ID_0":0,
"COLOR_0":1,
"POSITION":2,
"NORMAL":3,
"TEXCOORD_0":4
},
"indices":5,
"material":0,
"extensions": {
"EXT_feature_metadata": {
"featureIdAttributes": [
{
"featureTable": "default",
"featureIds": {
"attribute": "_FEATURE_ID_0"
}
},
{
"featureTable": "default",
"featureIds": {
"constant": 0,
"divisor": 2
}
}
]
}
}
}
]
}
],
- Add class:
"extensionsUsed": [
"EXT_feature_metadata"
],
"extensionsRequired": [
"EXT_feature_metadata"
],
"extensions": {
"EXT_feature_metadata": {
"schema": {
"classes": {
"default": {
"properties": {
"cesium#estimatedHeight": {
"type": "FLOAT32",
"default": 0.0
},
"elementId": {
"type": "INT32"
},
"year": {
"type": "STRING",
"optional": true,
"default": "2022"
}
}
}
}
},
"featureTables": {
"default": {
"class": "default",
"count": 3,
"properties": {
"cesium#estimatedHeight": {
"bufferView": 6
},
"elementId": {
"bufferView": 7
}
}
}
}
}
}
All works finie in UE.
This example change tekstur when heigh is 30:
But now I need write python script to Blender and automate this process. And I need to know how to use EXT_mesh_gpu_instancing