Skip to main content

Hi All,

We've been considering using FME Desktop to convert FBX files to Cesium 3D tiles. In general the process works, but there seems to be an issue with using textures. When opening the FBX, the reader says for each component:

"FBX_2: Part of mesh in node 'XXXXXX' references material #1 but node only has 0 material(s):

The FBX opens just fine in Blender. If we try to export it again, we get a different error which is now:

"FBX_1: A texture used by mesh in node 'XXXXXX' references a UV set named 'default', which doesn't exist"

 

Any idea on how resolve these texture issues? The current result (using either case) makes Cesium crash with a rendering error...

 

Can you try and write the data out to a glb (gltf 2.0 binary) and see if the result will load in either Cesium or other online gltf viewer?

It's hard to say if these warnings are what is causing the Cesium crash.

Have you tried converting other formats to 3D tiles to see if other formats work (e.g., obj)?​


Can you try and write the data out to a glb (gltf 2.0 binary) and see if the result will load in either Cesium or other online gltf viewer?

It's hard to say if these warnings are what is causing the Cesium crash.

Have you tried converting other formats to 3D tiles to see if other formats work (e.g., obj)?​

Also to note that FME does not support layered textures, or texture maps. Perhaps there is some complex texture type that FME is not supporting but regardless FME should just be assigning a default material in this case.​


Thanks for this.

GLTF doesn't quite help since it loses other attributes that the FBX file has. Also, the issue does not seem to be in the writer, but rather the reader that complains about the textures with errors.

 

the errors generated by cesium are

Cesium.js:1 An error occurred while rendering. Rendering has stopped.

RuntimeError: Fragment shader failed to compile. Compile log: ERROR: 0:99: 'undefined' : undeclared identifier

ERROR: 0:99: 'texture2D' : no matching overloaded function found

ERROR: 0:99: 'SRGBtoLINEAR4' : no matching overloaded function found

ERROR: 0:99: '=' : dimension mismatch

ERROR: 0:99: '=' : cannot convert from 'const mediump float' to 'highp 4-component vector of float'

 

So seems to me that a texturing issue is to be suspected.

I also tried to convert my FBX to dae using blender and that solves the texture issue, and it the pipeline converts well into Cesium, but I lose the components IDs in the process and get one single monolithic model instead of the FBX that had individual components...

 


Thanks for this.

GLTF doesn't quite help since it loses other attributes that the FBX file has. Also, the issue does not seem to be in the writer, but rather the reader that complains about the textures with errors.

 

the errors generated by cesium are

Cesium.js:1 An error occurred while rendering. Rendering has stopped.

RuntimeError: Fragment shader failed to compile. Compile log: ERROR: 0:99: 'undefined' : undeclared identifier

ERROR: 0:99: 'texture2D' : no matching overloaded function found

ERROR: 0:99: 'SRGBtoLINEAR4' : no matching overloaded function found

ERROR: 0:99: '=' : dimension mismatch

ERROR: 0:99: '=' : cannot convert from 'const mediump float' to 'highp 4-component vector of float'

 

So seems to me that a texturing issue is to be suspected.

I also tried to convert my FBX to dae using blender and that solves the texture issue, and it the pipeline converts well into Cesium, but I lose the components IDs in the process and get one single monolithic model instead of the FBX that had individual components...

 

The GTLF was more just to see if the issue was also present when converting to a different format (I suspect the GLTF will have the same issue). These warnings in the reader are not super unusual in FME, however it's very likely that you're right.

Note the last comment here: https://github.com/CesiumGS/cesium/issues/6676

It's hard to say if the issue here is with the FBX reader or with the 3DTiles writer. Another thing you can try for viewing the FBX is to upload it to the Autodesk Online viewer (free platform).

The best thing to do would be to submit the FBX to Safe technical support, they might be able to at least give you a workaround.

I suspect the issue is that there is a texture reference in one of the surfaces but it is missing texture coordinates. This cooooullldd be because of texture maps (e.g., a diffuse texture map) which FME doesn't support.

 


Thanks again,

Upon further investigation - seems like am not alone. The error I am getting was reported buy several people who are trying to convert models to Cesium using FME:

 

https://community.cesium.com/t/runtimeerror-fragment-shader-failed-to-compile-compile-log-error-0-111/14792

https://community.cesium.com/t/error-while-loading-gltf/7501

https://github.com/CesiumGS/cesium/issues/6676

 

Some suggestions say it may be related to texture transparency. Perhaps layered textures as you have mentioned as well. Any way of getting around this in FME? (adjust textures somehow?) or perhaps I need to manipulate my model textures in blender?


Thanks again,

Upon further investigation - seems like am not alone. The error I am getting was reported buy several people who are trying to convert models to Cesium using FME:

 

https://community.cesium.com/t/runtimeerror-fragment-shader-failed-to-compile-compile-log-error-0-111/14792

https://community.cesium.com/t/error-while-loading-gltf/7501

https://github.com/CesiumGS/cesium/issues/6676

 

Some suggestions say it may be related to texture transparency. Perhaps layered textures as you have mentioned as well. Any way of getting around this in FME? (adjust textures somehow?) or perhaps I need to manipulate my model textures in blender?

Hmm, hard to say if there is a workaround in FME - It shouldn't be related to transparency, FME supports this. I would put my money on an unsupported texture map. If you have a specular or diffuse map this could be causing the problem.

Your best bet is to stick with simple appearances or just plain textures - Only one texture per surface. If you can see the textures in the export from Blender you could try to just move them.

If there is an option to export the FBX as an an ASCII encoded FBX you might be able to tweak the export manually to remove some texture references.

I would still suggest reporting this to Safe software support


Resolving this would depend whether the error is coming from the reader or the writer. From your error/warning messages it looks like the problem might be the FBX reader.

 

To confirm this, the next step we can take here would be to try and read the data with the FBX reader and view it in the data inspector. If this works we can assume that any problems are coming from the Cesium/gITF writer and not the FBX reader. Let us know how this goes :)


Hi Jenna,

Despite some complaints from the reader, I think the issue might be the writer.

I say this, since I have a different FBX that displays the same reader complaints, but the resulting 3DTiles actually do work.

Also, I am indeed able to open either FBX file in the data inspector, where I can view them and their data.

I couldn't find what the difference is between the model that works and the one that doesn't...

I just keep getting the following failure:

 

Picture1


Hi Jenna,

Despite some complaints from the reader, I think the issue might be the writer.

I say this, since I have a different FBX that displays the same reader complaints, but the resulting 3DTiles actually do work.

Also, I am indeed able to open either FBX file in the data inspector, where I can view them and their data.

I couldn't find what the difference is between the model that works and the one that doesn't...

I just keep getting the following failure:

 

Picture1

As a test can you try and write out the data as GLTF 2.0 (glb binary) and try and render it in Cesium? I suspect you'll get the same errors because a b3dm is just a glb with an extra header. But with glb/gltf there are a few other online applications which support rebdering it so you can at least test the data in other applications​ to see how it behaves.

There is also a gltf validation which you can use to validate it.​


As a test can you try and write out the data as GLTF 2.0 (glb binary) and try and render it in Cesium? I suspect you'll get the same errors because a b3dm is just a glb with an extra header. But with glb/gltf there are a few other online applications which support rebdering it so you can at least test the data in other applications​ to see how it behaves.

There is also a gltf validation which you can use to validate it.​

Hi FME Team, I am also getting same issue, I am creating 3dtilset from cityGML files. Did you people figure out the reason behind it?


Reply