Questions tagged [gltf]

The GL Transmission Format (glTF) is a runtime asset delivery format for GL APIs: WebGL, OpenGL ES, and OpenGL. glTF bridges the gap between 3D content creation tools and modern GL applications by providing an efficient, extensible, interoperable format for the transmission and loading of 3D content.

0
votes
0answers
16 views

failing to import a .gltf file with webpack

I'm struggling to import .gltf files with Webpack (gatsby project with react+webpack+react-three-fiber). In development mode, I get this error: This relative module was not found: ⠀ * ../../static/...
1
vote
1answer
28 views

Babylon.js: rendering order of instances

At the moment I'm trying Babylon.js, because I've only worked with Threejs so far and Babylon.js has been recommended to me several times. I develop a turn-based strategy game in which the players ...
-1
votes
0answers
23 views

How to create glTF animation from multiple meshes? [on hold]

I have N distinct meshes and want to create a glTF 2.0 animation out of them (i.e. N frames, each holding different mesh). The meshes are completely different and therefore I cannot use skinning. How ...
1
vote
1answer
28 views

How does the indexing of the box in this gltf file work?

So from my understanding if I want to render a box using indexed triangles, I would need 8 vertices (for the 8 corner points) and 36 indices (the box has 6 sides, with 2 triangles per side and 3 ...
0
votes
0answers
28 views

How to load gltf files in react.js

I am trying to load a glTF file in my reactjs application using gltf loader. I manage to display a basic cube on the canvas, but using the gltf loader I only get the blank canvas without the 3D object....
0
votes
0answers
12 views

A-Frame 0.8.0+: gltf colors either too dark or washed out

Whenever I use the newer versions of a-frame (0.8.0+), I have trouble with color accuracy. The colors and contrast of my gltf models in a-frame 0.7.0 are very close to the render view in Cinema 4D, ...
0
votes
0answers
10 views

GLTF reporting incorrect file size

I am using Python to generate geometry for use in GLTF format. However, the file I am writing is of one size when written in Python, but GLTF is reading it as if it has a smaller size. print('BUFFER ...
3
votes
2answers
37 views

Struct packing and unpacking is not correct

I am trying to create a simple cube in GLTF. I am using a Python script to write the index and vertex buffers to binary data. Here's my code; import base64 import struct indices = [ 0, 1, 2, ...
0
votes
0answers
22 views

How do I fix the three.js “url.lastIndexOf is not a function” error?

I'm currently working on loading a gLTF in Three.js r105. After loading the file I tried to change the url after loading it to see if I could some how change it after loading it. This is were my ...
-1
votes
0answers
29 views

gltf equivalent for opengl [closed]

Is there a file format similar to gltf that can be loaded with opengl? I want to have a 3D model with predefined states where switching between the states would transition the model into different ...
0
votes
0answers
36 views

Is there any way to convert three.js 3d object on a pdf?

I'm programming a 3D Product Configurator with threejs. Is there any way to export all personalised configuration of color and models on a PDF like this one does https://www.wanzl.com/fileadmin/...
0
votes
1answer
23 views

How to apply multiple textures to GLTF models?

I tried to apply the texture to the model, but it works only in the case of a single texture. With multiple textures, the model is not displayed. Sample code with a single texture: loader = new ...
0
votes
1answer
29 views

Assign texture to loaded glb model in Three.js

I load a simple glb model created in SketchUp using Three.JS. The model contains a group called Text. The model loads and displays fine in Three.js, and I can find the mesh by traversing the loaded ...
0
votes
0answers
34 views

Distorted mesh with bones

I have a question with my test model for experimenting blender 2.8 and gltf. It has a few bones but stays very simple. AFter loading into my three.js platform it looks OK (right on image) but rotation ...
0
votes
1answer
36 views

3D object material goes black when morph target influence reaches value 1

I include an Object with morphtargets and a standard material into a three.js scene ; the object is loaded from a GLTF export done from Blender ; the morphTarget influences values are working right as ...
0
votes
0answers
33 views

Three.js glTF model centered but rotating on circular curve rather than center point

I've loaded a glTF model using the three.js glTF Loader. Although the object is centered on the origin (0, 0, 0), it appears to rotate along the curve of a circle on the x-plane. This is an image of ...
0
votes
0answers
20 views

Double Sided GLTF Texture Exported from Blender 2.8 looks Splotchy on the Reverse Side in Three.js Scene

We exported a scene using the GLTF exporter included in Blender 2.8 and imported it into a Three.js scene with the GLTFLoader(). Our texture has an alpha channel so that you can see through parts of ...
0
votes
2answers
47 views

Example three.js glTF loader not rendering 3D model

When I download the three.js-master folder on threejs.org, and open up the glTF loader example (file name webgl_loader_gltf.html), my browser does not render the 3D model. It should show the 3D ...
0
votes
0answers
17 views

How to do animation using “three-gltf-loader” npm package

I am building an application on react where I have to show a 3D model (glTF) with an animation. I am using "three-gltf-loader" npm package and I am able to load the 3D model correctly. But while ...
1
vote
1answer
27 views

Uncaught (in promise) TypeError: Cannot read property 'geometry' of undefined

I am trying to load a workshop (glTF file) in my scene but all I get is the error message Uncaught (in promise) TypeError: Cannot read property 'geometry' of undefined at GLTFLoader.js:2572 I ...
2
votes
1answer
31 views

Can I compress the glb file using the draco encoder with node.js?

I upload an obj file and convert it to a glb file on three.js. So I wanted to compress the file using the Draco encoder, but I only knew how to compress it using cmd. Is there any way to compress ...
1
vote
1answer
16 views

Why does the glTF schema define enums like this?

If I search for "enum" in the glTF 2.0 schema, I see a lot of definitions of enums like: "type": { "description": "Specifies if the camera uses a perspective or orthographic ...
2
votes
1answer
60 views

Can I make the glb file smaller?

I have a large obj file of 306 mb. So I converted it into a glb file to reduce its size. The size of the file has decreased a lot to 82 mb, but it is still big. I want to make this file smaller. Is ...
1
vote
1answer
32 views

Blender 2.79 material export to gltf looses gloss

I am trying to export a blender file (v2.79) to gltf 2.0 with material. I am using khronos gltf exporter for this purpose. I have also linked the gltf materials as indicated in the document here - ...
2
votes
1answer
41 views

Using the glTF C# loader on a Xamarin Android project

I tried to use the NuGet package "glTF loader" for my Xamarin Android C# project, but every time I try to load a model with: Gltf model = Interface.LoadModel(mystream); ...my application crashes ...
0
votes
0answers
30 views

How to use DRACOLoader with GLTFLoader in ReactJs?

I have a use case in which I am trying to load a GLTF file which is compressed using DRACO-Compression. I am able to run it using plain javascript but I am facing issues integrating the loader with ...
0
votes
0answers
48 views

Handling multiple Primitive items inside a glTF2 Mesh?

I am developing a small app using OpenGL ES and the glTF reference loader library (c#) on a Xamarin Android based Visual Studio project. Right now, I am trying to build my own class structure for ...
3
votes
1answer
110 views

Understanding the skinning part of a GLTF2.0 file for OpenGL engine

I have a simple blender model which consists of three meshes with three bones controlling one mesh each. The animation is just the bones rotating the cubes a bit around the y-axis and back. The center ...
0
votes
0answers
26 views

How to load gltf model's texture images and .bin with A-frame?

I have a 3D model with customized textures made from Substance Painter. I try to load it on a webpage with A-frame. The gltf model comes with albedo, normal images and a .bin file. How can I load them ...
0
votes
0answers
40 views

How to fix GLB/GLTF exporter from exporting a single mesh as several meshes

Currently im trying to export a bunch of meshes to three.js, but for some reason. GLB exporter converts my single mesh, into a group of varying sizes. The reason this sucks is because: Im rendering ...
0
votes
1answer
38 views

Aframe glTF not displaying

I am testing a-frame and trying to load other glTF file(s) that not the examples provided in the tutorial. I have downloaded a couple of glTF packs files from Sketchfab and they don't seem to load. ...
0
votes
1answer
56 views

Invisible material when exporting to .glb instead of .gltf

I have exported model using gltf exporter included in blender 2.8. Exporting to .gltf works fine but when exporting to .glb I cannot see the texture anymore. What is weird is that if I check .glb file ...
1
vote
1answer
39 views

glTF 2.0 video texture support

I have been reading the glTF specs and looking around and haven't been able to find an explicit answer to this: are video textures supported by glTF 2.0 or one of its extensions? Could anyone point me ...
1
vote
1answer
64 views

Lights are not working with .gltf model in A-frame 0.9 (works in 0.8)

I'm importing a .gltf model of a gallery and add ambient and directional lights (tried all types). Everything works as expected in 0.8.0; however, when using version 0.9.0 the interior of the model ...
0
votes
0answers
28 views

Variable inside of function doesn't pass on to global variable, cant access it [duplicate]

I am working currently with three.js, and i'm having a bit of an issue. I have to implement the code has it is shown below, the problem here is that I can't really access the variable gltf.scene ...
0
votes
0answers
21 views

GLB model not rendering properly in browser

I am just strating with A-frame, please take that in consideration. When trying to load a tree GLB model exported from Blender 2.8 i have noticed that in the Scene mode it shows a glare/glow effect ...
2
votes
1answer
68 views

How move a gltf model in threejs?

How move a gltf model in threejs indipendently from the scene defined? In my code I have updated an gltf model and I tried to move it using KeyboardState.js. The control used is OrbitControl.js. ...
0
votes
0answers
30 views

How do I convert OBJ-MTL file to GLTF file when MTL file ha local path texture mapping in it?

I am trying to convert OBJ-MTL files to GLTF. For that, I am using obj2gltf. BUT the problem is that there is a scenario in which the MTL file might be referring to a local path of the textures which ...
1
vote
0answers
92 views

rendering multiple gltf 3D model in a single layer on map using mapbox gl and three js

I used adding gltf 3D Model on map using mapbox gl with three.js from the link but adding single 3D gltf model in single separate layer and adding them to map is working fine,but is there any way to ...
0
votes
1answer
99 views

How can I get texture to the right place when I change texture in gltf format with Three.js?

I've tried to change the texture of glTF model dynamically by replacing the texture with THREE.TextureLoader. The color of the texture changed as I expected to, however the pattern of the texture was ...
1
vote
1answer
139 views

Blended materials / textures support using GLTF

Before I get into the problem, I want to emphasize I'm far from an expert when it comes to 3D modelling, texturing and rendering techniques. I know some of the basics, but please let me know if my ...
0
votes
0answers
24 views

A-Frame GLTF models either oversaturated or washed out

My setup is modelling in Blender 2.8 and texturing in Substance Painter. Finished models are exported via GLTF and loaded in A-Frame. My models looks either washed out or oversaturated and when color ...
0
votes
0answers
32 views

Detecting collision between and applying materials and textures to three.js model in GLTF file format

I am working on a three.js game, where a model has to move on mouse movement. I am done with loading the model in GLTF format and moving it in the world space. I am now stuck with two things, ...
3
votes
1answer
84 views

Byte offset greater than Byte Length in BufferView

I'm trying to read data from scene.bin files using Microsoft::glTF SDK. TinyGLTF is not an option. When I try to read MeshPrimitive attribute called TEXCOORD_0 i get a situation where BufferView ...
3
votes
1answer
112 views

Conversion from USDZ file to glTF file

I am currently trying to work with AR in android but I have been given models in .usdz format. So far I have been looking for a way to convert this file into one that works with android (.fbx .obj ....
0
votes
1answer
35 views

How to export color changing animation from Blender to three.js

I tried with gltf. My model changes color with changes in frames. So hope to get a positive response. Thanks in advance [from grey color1 to [Red color][2]
0
votes
0answers
19 views

GlTF Cmake for MacOS

Im trying to compile Microsoft Gltf SDK for MacOs with the help of Cmake,i have Cmake file in some moment it generates custom header from existing file in the directory and adds this header as a ...
-1
votes
1answer
109 views

Aframe angular 7 unable to load gltf model

I am trying to display a gltf-model in Aframe using Angular 7. `<a-scene embedded="" cursor="rayOrigin: mouse"> <a-assets> <a-asset-item id="bedroom" src="../../assets/models/...
1
vote
0answers
43 views

threeJs wrong (too low) camera position

I am new to ThreeJS, what I am trying to accomplish is to load a gltf model, which is correctly shown in three-gltf-viewer, it is valid. When I load it into threeJS, the model loads up ok but the ...
0
votes
0answers
29 views

GLTF object are grounding when loaded

On loading GLTF files from the server, objects are not taking the origin but counting as position (0,0,0) from the bottom, but when the same file we check in blender all the objects are in correct ...