Jump to content

Blender quad export in glTF


Josh
 Share

Recommended Posts

There is supposedly a version of the Blender glTF export plugin available that supports quads:
https://github.com/KhronosGroup/glTF-Blender-IO/pull/622#issuecomment-536230661

Has anyone got this working? Quads are optimal for tessellation and I want to support this.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

52 minutes ago, Vida Marcell said:

Where to download?

It might be included the latest rolling release? I don't see any option to export as quads like I do with objs. Granted, my blender is out of date but seeing that that post was from 2019, I thought I would give it a look.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

6 minutes ago, Josh said:
Quote

Blender 2.80 and higher bundle this addon in the main Blender install package, so no 3rd-party install is required.

I don't see any options for quads here and it exports as triangles. 

image.png.8b49d1d88c1813f5ddfb900ac064f6ab.pngimage.thumb.png.b0de5b8830d9ebd779659180550c6acf.png

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

GPUs only render triangles, even when rendering quads. But if you open the file in a text editor, there should be an extension listed called "FB_ngon_encoding", or something like that.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It appears so:

# Blender v3.0.0 OBJ File: ''
# www.blender.org
mtllib untitled.mtl
o Cube
v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 1.000000
vt 0.625000 0.500000
vt 0.875000 0.500000
vt 0.875000 0.750000
vt 0.625000 0.750000
vt 0.375000 0.750000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.375000 0.000000
vt 0.625000 0.000000
vt 0.625000 0.250000
vt 0.375000 0.250000
vt 0.125000 0.500000
vt 0.375000 0.500000
vt 0.125000 0.750000
vn 0.0000 1.0000 0.0000
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
usemtl Material
s off
f 1/1/1 5/2/1 7/3/1 3/4/1
f 4/5/2 3/4/2 7/6/2 8/7/2
f 8/8/3 7/9/3 5/10/3 6/11/3
f 6/12/4 2/13/4 4/5/4 8/14/4
f 2/13/5 1/1/5 3/4/5 4/5/5
f 6/11/6 5/10/6 1/1/6 2/13/6

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It looks like Blender will export diffuse, emissive, and normal in OBJ but not metal/roughness or AO. That's not too terrible:

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material_MR
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Bump Image_4.jpg
map_Kd Image_0.jpg
map_Ke Image_2.jpg

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I think OBJ will work pretty well. Quads get saved with four indices, and anything else can be added to a second triangle mesh. I'm going to add built-in support for loading and saving OBJ files.

  • Like 3

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Of course OBJ has no support for object hierarchies, so there is currently no way to get a quad-modeled character or hierarchal object into the engine without converting quads to triangles. Maybe Terathon's OpenGEX is an answer?

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...