First a short note: In post #9, you posted a screenshot of a call to the 3D Tiles Tools
b3dmToGlb command, saying
Error: Expected version “1” but got "538976257
I think that I know where this error is coming from, but not why it appears. Could it be that this input file (i.e. the
myTiles/data/data1.b3dm) is broken or corrupted in some way?
(If you could pack that file into a ZIP and attach it here, I might be able to take a closer look…)
Regarding the actual issue here:
I think that it’s important to analyze the “root cause” and identify the actual issue that causes the problem. From the posts so far, it looks like bertt was right, and the problem is caused by a
metallicFactor:1 at some place.
The question is how this can be avoided or fixed.
Unfortunately, I’m not familiar with FME or KMZ, and may not have fully understood the intended workflow. And importantly: I’m not even sure which of the workflows (mentioned in the first post) may have been attempted workarounds for problems (and where it might be possible to solve the original problem in another way).
When you say
OBJ–>3Dtiles (dark texture)
OBJ–>KMZ–>3Dtiles (dark texture)
Then I have to ask about some details:
For the first one:
Is the input here a single OBJ file, or is the input a list of OBJ (+MTL) files? When you load this (one file or many files) into FME, and and export it as 3DTiles, then what is the output? From the remaining conversation here, it sounds like the output is a
tileset.json and a bunch of
.b3dm files, is that correct?
For the second one:
Is it right that the intermediate step of using KMZ was an attempted workaround for the dark textures?
Just to confirm:
In the last screenshot, you showed a
Test.glb file opened in a text editor. Is it correct that
- This GLB was extracted from one of the B3DM files that was generated by FME?
- The value for the
metallicFactor there was originally a ‘1’, but you changed it to ‘0’
In any case:
Iff FME does not offer any functions for configuring the output in a way so that it writes the proper
metallicFactor, then there certainly are solutions for this.
The 3D Tiles Tools may offer some options here. It would be relatively easy to create a small script that
- Takes an input B3DM file
- Extracts the GLB file from that
- Changes the
0 in all materials
- Creates a new B3DM file from the modified GLB
This script could then be applied to the tileset, to fix the materials for all 40000 buildings in some sort of “batch run”.
(NOTE: The 3D Tiles Tools currently don’t have an official (public) API. This would only be a workaround to quickly solve the issue for a given data set. It would be strongly preferable to fix FME, so that it writes sensible
metallicFactor values to begin with. If they don’t do that, and there is a noticable demand for this operation, then we could even consider options for offering this as a predefined functionality in the 3D Tiles tools)