b3dm with multiple textures

285 views
Skip to first unread message

Benjamin

unread,
Mar 1, 2016, 7:33:25 AM3/1/16
to cesium-dev
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.

Patrick Cozzi

unread,
Mar 2, 2016, 10:30:19 AM3/2/16
to cesium-dev
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
Message has been deleted

Benjamin

unread,
Mar 2, 2016, 11:13:41 AM3/2/16
to cesium-dev
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.

Patrick Cozzi

unread,
Mar 2, 2016, 1:41:44 PM3/2/16
to cesiu...@googlegroups.com
Ah, cool.  What tool are you writing the glTF exporter for?

Patrick

On Wed, Mar 2, 2016 at 11:10 AM, Benjamin Abb <benn...@gmail.com> wrote:
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.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/wIxwpak4ft8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/wIxwpak4ft8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Benjamin

unread,
Mar 2, 2016, 2:03:56 PM3/2/16
to cesium-dev
For a geo tool of the Fraunhofer IGD.

Am Dienstag, 1. März 2016 13:33:25 UTC+1 schrieb Benjamin:

Patrick Cozzi

unread,
Mar 2, 2016, 4:29:01 PM3/2/16
to cesiu...@googlegroups.com
Ah, very cool.  I have been working with Fraunhofer a lot on glTF.

Patrick

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/wIxwpak4ft8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages