0
$\begingroup$

I’m trying to export my 3D model to a .glTF file but it does not work. When I am checking my model in glTF viewer.com it does not display anything. Also when I am opening a new Blender project and importing the .glTF file I just made and exported it does not even work. I tried with just a cube and that worked. But not with my 3D model I have made. Is there a setting I am missing or someone that have a clue what I am doing wrong?

(using Blender 4.0) This is how I do it. See image: enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ I guess we might have to look at the actual file to see what the problem is. Just having a quick glance at half the model in viewport does not give much information. Since it worked with the cube, you seem to be exporting correctly in general. $\endgroup$ Commented Mar 18, 2024 at 14:56
  • $\begingroup$ Check if you're using Blender modifiers or other features that aren't included in glTF. The glTF format supports a robust PBR material, but not general Blender material nodes. glTF supports skinning and shape keys (morphing), but not general Blender modifiers. See: docs.blender.org/manual/en/latest/addons/import_export/… $\endgroup$ Commented Mar 18, 2024 at 15:06
  • $\begingroup$ What is the file size of the object your exporting does the size seem too small for your mesh this can indicate that nothing is being exported? maybe a material transparency setting is being exported accidentally. $\endgroup$ Commented Mar 18, 2024 at 16:57
  • $\begingroup$ I tried to remove all the materials. I also tried including modifiers and it still does not work. Regarding the size, I do not think there is somthing wrong. I uploaded the file in the question if someone could take a look at it since I do not understand what I am doing wrong. Would be very appreciated. $\endgroup$ Commented Mar 19, 2024 at 8:52

1 Answer 1

0
$\begingroup$

If I try exporting your model, this appears in the console.

10:41:46 | INFO: Starting glTF 2.0 export 10:41:46 | WARNING: Mesh Pontum 3d viewer.733 is not valid, and may be exported wrongly 10:41:46 | INFO: Extracting primitive: Pontum 3d viewer.733 Error: Array length mismatch (expected 173211, got 173139) 10:41:46 | INFO: Primitives created: 0 10:41:46 | WARNING: Mesh 'Pontum 3d viewer.733' has no primitives and will be omitted. 10:41:46 | INFO: Finished glTF 2.0 export in 0.0600123405456543 s 

I notice the model appearance also gets messed up.

If I then select the mesh and toggle into and then back out of Edit mode, the mesh appears to look correct again.

Now I try to export a second time, and it works.

10:53:14 | INFO: Starting glTF 2.0 export 10:53:14 | INFO: Extracting primitive: Pontum 3d viewer.733 10:53:14 | INFO: Primitives created: 1 10:53:14 | INFO: Finished glTF 2.0 export in 0.13958263397216797 s 

Note that both the first failed export and the edit mode toggle are necessary to fix it.

I don't know how you got this invalid model, but if you can reproduce it, you can report it on Blender's bug tracker.

$\endgroup$
1
  • $\begingroup$ It worked! I tried what you did and all came out fine. i appreciate your taking the time! $\endgroup$ Commented Mar 19, 2024 at 14:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.