ConnorDY / OSRS-Environment-Exporter

Tool for exporting Old School RuneScape environments so they can be used in 3D modeling programs like Blender.
GNU General Public License v3.0
48 stars 16 forks source link

[REQUEST] Combine glTF, bin file, and textures directory into one glb file #29

Open ConnorDY opened 2 years ago

ConnorDY commented 2 years ago

Requirement: Make it possible to turn this off for debugging.

GLB Docs: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#glb-file-format-specification https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/Specification.adoc#glb-file-format-specification

CMTrago commented 1 year ago

I need this.

Supalosa commented 5 months ago

I personally just use gltf.report for this. I took a GLTF + bin file exported by this tool and used the unpartition() pipeline to combine it into a single GLB file. The full script I used was:

    import { prune, dedup, resample, weld, unpartition } from '@gltf-transform/functions';

    await document.transform(
        weld({exhaustive: true}),
        unpartition(),
        dedup(),
        resample(),
        prune()
    );