3D-PDF-Consortium / PDF-with-glTF

Repository for the ISO TC 171 SC 2 WG 7 glTF discussion group
Other
1 stars 0 forks source link

Use case - creating PDF from web pages that include glTF #4

Open philspreier opened 3 years ago

philspreier commented 3 years ago

Develop use case

bdoubrov commented 3 years ago

GLTF is commonly supported on web via:

From the GLTF loader documentation:

Assets may be provided either in JSON (.gltf) or binary (.glb) format. External files store textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, textures, skins, skeletons, morph targets, animations, lights, and/or cameras.

An illustrative example is provided at: https://threejs.org/examples/#webgl_loader_gltf

This example visualizes the following GLTF file: https://threejs.org/examples/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf which references additional external assets:

    "buffers" : [
        {
            "byteLength" : 558504,
            "uri" : "DamagedHelmet.bin"
        }
    ],
    "images" : [
        {
            "uri" : "Default_albedo.jpg"
        },
        {
            "uri" : "Default_metalRoughness.jpg"
        },
        {
            "uri" : "Default_emissive.jpg"
        },
        {
            "uri" : "Default_AO.jpg"
        },
        {
            "uri" : "Default_normal.jpg"
        }
    ]

See glTF 2.0 Quick Reference Guide for the overview of external assets that can be used by GLTF.