b3dm with multiple textures

Hello,

is it possible to use multiple textures in a b3dm?

One mesh with different primitives, which are using the same accessors, but a different indices accessor. Like this:

“meshes”: {

“Cube-mesh”: {

“name”: “Cube”,

“primitives”: [

{

“attributes”: {

“NORMAL”: “accessor_45”,

“POSITION”: “accessor_43”,

“TEXCOORD_0”: “accessor_47”

},

“indices”: “accessor_38”,

“material”: “Material1-effect”,

“mode”: 4

},

{

“attributes”: {

“NORMAL”: “accessor_45”,

“POSITION”: “accessor_43”,

“TEXCOORD_0”: “accessor_47”

},

“indices”: “accessor_41”,

“material”: “Material2-effect”,

“mode”: 4

}

]

}

},

``

I know using a texture atlas would be the best solution, but I have data in which one building uses more than one texture atlas.

Hi Benjamin,

Yes, this should work. It requires different materials for each primitive, which your example shows.

To help debug this, have you tried to load the same glTF model separate from a b3dm file?

Also, check out this thread, and let me know if you want me to include your 3D Tiles work in my OGC talk next week.

Patrick

Thanks!
The example was just a test, what the cesium COLLADA to glTF Converter does, when converting a mesh with two textures.

I am writing an glTF exporter, that should also export b3dm in the near future and this was kind of a design question.

3D Tiles is not implemented, yet. The exporter has to be finished first, but this is my bachelor “internship like” project.

Ah, cool. What tool are you writing the glTF exporter for?

Patrick

For a geo tool of the Fraunhofer IGD.

Ah, very cool. I have been working with Fraunhofer a lot on glTF.

Patrick