Skip to main content

Hello.

We are converting LandXML to 3D tiles and found that 3D tiles generated are not correct. The gltf meshes inside the b3dm files are empty, and we think that property should be populated.

The geometry from the LandXML reader is GML dimension 3 geometry. The 3D tile writer is writing these geometries correctly for polygons.

Is this a bug or an enhancement to the 3D tile writer?

Hi @bbehling -

 

Firstly you want to verify that FME is reading these geometries correctly? Can you verify in the FME data inspector that these geometries can be read in?

Secondly, check how FME represents the geometries (IFMEMesh, IFMELine, etc). You can use a GeometryFilter with all of the geometries added to see what you're LandXML is made of.

I know that in FME 2019.0 the 3D Tiles writer supports IFMEMeshes (I haven't check FME 2018.1). If, however you're 'Mesh' is made up of lines or triangles, consider converting them into faces. You will need to close lines into areas, then convert the areas into faces using the FaceReplacer. Use the GeometryValidator (to check for, and fix, non-planer areas - make sure areas are checked too). Follow this by a deaggregator and then put the areas into the FaceReplacer. You can then either Aggregate ir try and use the MeshBuilder custom transformer to make a Mesh

 

Another thing which might help is to create Surface Normals. This will help with the rendering of the models. You can use the GeometryValidator on surfaces to create these.

Perhaps you can share with us an ffs file of the data just before it goes into the writer (you can use a Recorder transformer to do this).

 

 


HI @virtualcitymatt

I think there is some confusion as to what I mean by Mesh. This isn't for a terrain or surface. Inside a b3dm file, there is a gltf object. There is a property in that object called Meshes. I've been informed by Cesium that property should be populated. In a b3dm file created from polygons, the meshes property is populated.

This is the gltf object for a line:

{

"asset": {

"generator": "FME 2019.0.0.0 Beta",

"version": "2.0"

},

"materials": [

{

"name": "default_material",

"pbrMetallicRoughness": {

"baseColorFactor": [

0.8,

0.8,

0.8,

1

],

"roughnessFactor": 0.30000000000000004,

"metallicFactor": 0.5

}

}

],

"meshes": [],

"nodes": [

{}

],

"scenes": [

{

"nodes": [

0

]

}

],

"scene": 0,

"extensionsUsed": [

"CESIUM_RTC"

],

"extensionsRequired": [

"CESIUM_RTC"

],

"extensions": {

"CESIUM_RTC": {

"center": [

-1277507.7496905169,

-4730530.394980809,

4069322.4733702904

]

}

},

"accessors": [],

"bufferViews": [],

"buffers": []

}

 

This is the gltf object for a polygon:

{

"asset": {

"generator": "FME 2019.0.0.0 Beta",

"version": "2.0"

},

"materials": {

"name": "default_material",

"pbrMetallicRoughness": {

"baseColorFactor": 0.8, 0.8, 0.8, 1],

"roughnessFactor": 0.30000000000000004,

"metallicFactor": 0.5

}

}],

"meshes": {

"primitives": {

"attributes": {

"_BATCHID": 2,

"NORMAL": 1,

"POSITION": 0

},

"indices": 3,

"material": 0,

"mode": 4

}]

}],

"nodes": {

"mesh": 0

}],

"scenes": {

"nodes": 0]

}],

"scene": 0,

"extensionsUsed": "CESIUM_RTC"],

"extensionsRequired": "CESIUM_RTC"],

"extensions": {

"CESIUM_RTC": {

"center": -1277511.174626682, -4730537.2264261255, 4069322.4733702904]

}

},

"accessors": {

"bufferView": 0,

"byteOffset": 0,

"componentType": 5126,

"count": 16376,

"type": "VEC3",

"min": -128.3018341064453, -157.1747283935547, -96.68477630615234],

"max": 128.3018341064453, 157.1747283935547, 96.68477630615234]

}, {

"bufferView": 1,

"byteOffset": 0,

"componentType": 5126,

"count": 16376,

"type": "VEC3",

"min": -0.9866975545883179, 0, -0.9847195744514465],

"max": 0.9792209267616272, 0.9716680645942688, 0.9980272054672241]

}, {

"bufferView": 2,

"byteOffset": 0,

"componentType": 5121,

"count": 16376,

"type": "SCALAR",

"min": 0],

"max": 128]

}, {

"bufferView": 3,

"byteOffset": 0,

"componentType": 5123,

"count": 16398,

"type": "SCALAR",

"min": 0],

"max": 16375]

}],

"bufferViews": {

"buffer": 0,

"byteOffset": 0,

"byteLength": 196512,

"target": 34962

}, {

"buffer": 0,

"byteOffset": 196512,

"byteLength": 196512,

"target": 34962

}, {

"buffer": 0,

"byteOffset": 393024,

"byteLength": 16376,

"target": 34962

}, {

"buffer": 0,

"byteOffset": 409400,

"byteLength": 32796,

"target": 34963

}],

"buffers": {

"byteLength": 442196

}]

}


HI @virtualcitymatt

I think there is some confusion as to what I mean by Mesh. This isn't for a terrain or surface. Inside a b3dm file, there is a gltf object. There is a property in that object called Meshes. I've been informed by Cesium that property should be populated. In a b3dm file created from polygons, the meshes property is populated.

This is the gltf object for a line:

{

"asset": {

"generator": "FME 2019.0.0.0 Beta",

"version": "2.0"

},

"materials": [

{

"name": "default_material",

"pbrMetallicRoughness": {

"baseColorFactor": [

0.8,

0.8,

0.8,

1

],

"roughnessFactor": 0.30000000000000004,

"metallicFactor": 0.5

}

}

],

"meshes": [],

"nodes": [

{}

],

"scenes": [

{

"nodes": [

0

]

}

],

"scene": 0,

"extensionsUsed": [

"CESIUM_RTC"

],

"extensionsRequired": [

"CESIUM_RTC"

],

"extensions": {

"CESIUM_RTC": {

"center": [

-1277507.7496905169,

-4730530.394980809,

4069322.4733702904

]

}

},

"accessors": [],

"bufferViews": [],

"buffers": []

}

 

This is the gltf object for a polygon:

{

"asset": {

"generator": "FME 2019.0.0.0 Beta",

"version": "2.0"

},

"materials": {

"name": "default_material",

"pbrMetallicRoughness": {

"baseColorFactor": 0.8, 0.8, 0.8, 1],

"roughnessFactor": 0.30000000000000004,

"metallicFactor": 0.5

}

}],

"meshes": {

"primitives": {

"attributes": {

"_BATCHID": 2,

"NORMAL": 1,

"POSITION": 0

},

"indices": 3,

"material": 0,

"mode": 4

}]

}],

"nodes": {

"mesh": 0

}],

"scenes": {

"nodes": 0]

}],

"scene": 0,

"extensionsUsed": "CESIUM_RTC"],

"extensionsRequired": "CESIUM_RTC"],

"extensions": {

"CESIUM_RTC": {

"center": -1277511.174626682, -4730537.2264261255, 4069322.4733702904]

}

},

"accessors": {

"bufferView": 0,

"byteOffset": 0,

"componentType": 5126,

"count": 16376,

"type": "VEC3",

"min": -128.3018341064453, -157.1747283935547, -96.68477630615234],

"max": 128.3018341064453, 157.1747283935547, 96.68477630615234]

}, {

"bufferView": 1,

"byteOffset": 0,

"componentType": 5126,

"count": 16376,

"type": "VEC3",

"min": -0.9866975545883179, 0, -0.9847195744514465],

"max": 0.9792209267616272, 0.9716680645942688, 0.9980272054672241]

}, {

"bufferView": 2,

"byteOffset": 0,

"componentType": 5121,

"count": 16376,

"type": "SCALAR",

"min": 0],

"max": 128]

}, {

"bufferView": 3,

"byteOffset": 0,

"componentType": 5123,

"count": 16398,

"type": "SCALAR",

"min": 0],

"max": 16375]

}],

"bufferViews": {

"buffer": 0,

"byteOffset": 0,

"byteLength": 196512,

"target": 34962

}, {

"buffer": 0,

"byteOffset": 196512,

"byteLength": 196512,

"target": 34962

}, {

"buffer": 0,

"byteOffset": 393024,

"byteLength": 16376,

"target": 34962

}, {

"buffer": 0,

"byteOffset": 409400,

"byteLength": 32796,

"target": 34963

}],

"buffers": {

"byteLength": 442196

}]

}

Ahhh I see, interesting find. I think you should pass this onto Safes tech support. Do you find that it renders correctly?

 

I've also found that the gltf output from FME doesn't map the appearence properties correctly, it always gives it a metallic factor which causes all the models to appear shiny when sometimes this isn't always desired.

Ahhh I see, interesting find. I think you should pass this onto Safes tech support. Do you find that it renders correctly?

 

I've also found that the gltf output from FME doesn't map the appearence properties correctly, it always gives it a metallic factor which causes all the models to appear shiny when sometimes this isn't always desired.

Sure thing.

In Cesium JS, it should possible to style 3D tiles client side, so not too worried about the appearance from FME.


Reply