Code Monkey home page Code Monkey logo

Comments (1)

michaliskambi avatar michaliskambi commented on June 15, 2024

Sorry for delayed response. I'm just getting back to my feet after COVID.

  1. You need to have both scene.gltf and scene.bin present in the same directory. That is, download http://www.kshell.com/pages/gltfassets/toomuchcoffee/scene.gltf and http://www.kshell.com/pages/gltfassets/toomuchcoffee/scene.bin and place them in the same directory. View3dscene (as any other glTF reader) needs the .bin data, it contains all the per-vertex data (like positions and texture coordinates), without it is impossible to display the 3D content.

    I see the model also uses a texture. Create subdirectory textures and place there https://www.kshell.com/pages/gltfassets/toomuchcoffee/textures/material_0mat_baseColor.jpeg .

    That is how the glTF (from http://www.kshell.com/pages/gltfassets/toomuchcoffee/scene.gltf ) works. In the scene.gltf file, there are links (just trivial relative URLs) that point to scene.bin and textures/material_0mat_baseColor.jpeg. Any glTF reader has to expect these files at respective locations.

    Opening the scene.gltf in view3dscene will now work. I can open it and play the dancing animation happily :)

    scene_0

    Converting to X3D tovrmlx3d scene.gltf > new.x3d also works. But be warned: resulting X3D is huge. X3D file size just sucks, with textual encoding, and the way CGE "expands" animation data makes the issue much worse (we add a huge CoordinateInterpolator inside). Resulting X3D in XML encoding is 1.3 GB! (from a few MB of gltf + bin file). For practical purpose, I would not save it to X3D. Fixing this relies on 1. CGE handling skinned animation from glTF better (this will happen definitely soon), 2. X3D having binary encoding like glTF (unknown when it will happen).

  2. As an author, alternatively you could have prepared glTF "embedded" (the per-vertex data from .bin, and the texture data, could be embedded within a single .gltf file). That would make it easier to copy the file / open it anywhere. But your scene.gltf wasn't prepared like that.

  3. For a normal user (not an author of this file) there is an easier option to open it, to let view3dscene download the linked files:

from view3dscene.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.