Gltf-blender-io: Option to ignore textures at export

Created on 13 Nov 2019  路  9Comments  路  Source: KhronosGroup/glTF-Blender-IO

I need to export the geometry + materials but with no textures, since the textures are added back later on in the pipeline. The problem is some of the materials come with textures assigned to them, which means I have to constantly go into the shader view and delete the textures in all materials in order to avoid exporting them.

Describe the solution you'd like
My proposal is to either add a new Images option below the Materials option or to add a None option in the Images enum menu.

image

This way it would be easy to export geo with material groups but making sure no image data is packed in.

Material enhancement exporter

Most helpful comment

Ignoring textures on export is very much needed. These days gltf is the recommended exchange format for godot. But this automatic packing increases the size of these exchange files drastically (indirectly even creating duplicates) and unecessarily as game engines have their own means of managing texture resources.

All 9 comments

I think this option would be very useful, because lots of people use .basis compressed textures in web apps nowadays. Since the exporter doesn't support image copression, users have to either bloat the file size (and uncompressed textures increase it by A LOT) or manually remove all the image nodes from every material before export.

Also I happen to run into an issue where some of my models share the same textures, so I would be unnecessarily loading them many times (models need to be displayed at different times, so I dont want to put everything into one file).

Another issue is if a mesh has multiple materials on it, the exporter creates one geometry (primitive) per material, but then doesn't associate any material information with it, so you can't re-create it in a downstream consumer.

There apparently was a PR made to do just this about a year ago: https://github.com/KhronosGroup/glTF-Blender-IO/pull/453

@yoanlcq I don't suppose you ever ended up revisiting that PR, did you?

the exporter creates one geometry (primitive) per material, but then doesn't associate any material information with it, so you can't re-create it in a downstream consumer.

I don't think I understand this part... each primitive will still have materials associated. If that's not what you're seeing you may have a separate bug?

My PR (#453) isn't really a solution for OP, but rather for the "texture sharing" case described by @DolphinIQ , which IMHO would need a separate ticket, given how simple OP's request is.

Indeed I have not kept up with the latest changes, so I suspect it could not be merged today without major changes; I'm still using the feature in my personal project though, and it works great for my purposes.

"texture sharing" was suggested as a post-processing step, but IMO this is too late in the pipeline to do it (you'd need to work out which texture files are "equal" after exporting your multiple GLTFs), especially since all file paths are readily available in Blender, along with whether or not they are relative or absolute. At the very least, they could be provided in JSON via extras.

... And, while we're at it, we could choose not to export the textures, and just leave them where they are, assuming the application would use the provided file path.

All of that would make sense to me, as _options_ in the exporter, as long as they don't replace the defaults; they would just be there for those who need it.

If that sounds good, then I might try to unearth my PR, but in any case, this might need a separate ticket as I mentioned. :)

Ignoring textures on export is very much needed. These days gltf is the recommended exchange format for godot. But this automatic packing increases the size of these exchange files drastically (indirectly even creating duplicates) and unecessarily as game engines have their own means of managing texture resources.

I think we'd like to support this feature request, but no one is able to work on it at the moment. The only immediate question I see is whether the option should be in the "Include" section or under the "Images" dropdown:

Screen Shot 2020-10-07 at 7 33 44 PM

For a moment I thought the new Placeholder Material feature was related to this request. But when I checked the JSON I saw that there is no material block at all and of course no material name. Shame because I thought it was so close! Is the placeholder feature designed for a very different use case? Otherwise can we make it export empty materials with only the name parameter in them?

image

Is this feature still being considered or are the contributors focused on getting Basis/KTX support first?

From my perspective, https://github.com/KhronosGroup/glTF-Blender-IO/issues/770#issuecomment-705294497 still holds. I'd support this feature being added to the exporter, but do not have plans to work on it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rainclaws picture rainclaws  路  3Comments

dsinni picture dsinni  路  3Comments

scurest picture scurest  路  4Comments

julienduroure picture julienduroure  路  3Comments

Quinten123 picture Quinten123  路  4Comments