Skip Textures on Import

Hello everyone,
maybe someone can help me please?
Currently I am importing a .babylon file from Maya with BABYLON.SceneLoader.ImportMesh.
During this import the textures associated with it over the materials are also imported and are using traffic and performance.
In my usecase I want to replace the materials by name after import. But the texture of the materials to be replaced are already requested and are using unnecessary resources.

Is there a way I can replace the existing material so that the referenced textures before are not requested and used?

Hey! They will be loaded at load time unfortunately. One option is to manually edit the Babylon file to remove the textures

Maybe @Drigax has another idea directly from Maya?

@Kinggrass it sounds like you want to disable material export when exporting, as your materials are going to be overridden, and you only really care about the geometry loaded from the file, right? Currently we don’t have a toggle for that, but adding one should be pretty trivial. Ill see if i can cook something up really quick for you.

Material toggle should be live in the next exporter release:

1 Like

Hi @Drigax.

thank you very much for your work.
Unfortunately it is not quite what i need. I hoped I expressed myself explicitly for no misunderstanding.

If the materials are not exported anymore the exported model does also not have any materials on it with their names I could replace/remap/override anymore.
If it could be done so textures are not included but the “material-slots” (i will call it like that now for “empty materials”) so that the names are kept than it would be nice. Same Materials but without textures.

Other solution I could think of, is that it would be possible to give import options with BABYLON.SceneLoader.ImportMesh which considers them. There could be an option to skip texture import.

Other Point I noticed now is on the exporter a bug which came with the last build of the exporter. The Bottom Scroll-Bar is now out of window. And I cant see the start of a line, because I can’t scroll to the left with the bar.

I am really sorry to cause this trouble.

I’m not sure what you mean, the screenshot isn’t terribly helpful. can you explain a bit more.

I assume this is due to the export window size and minimum size being misaligned…

Ah, i see. Sorry for making the previous assumption. I did not fully understand your usecase.

I added a toggle to the exporter plugin to support this, “Export Textures” will ignore any textures in scene, while preserving your materials, and their non-texture related parameters.

Either way, “Export Materials” was a feature gap in the Maya exporter, so its good that I finally got around to it as well.

2 Likes

What I was talking about was the bottom edge of the window. The inner content is overflowing there.
Sry for my last picture. In the new one it is better to see.
But now after your last edit the horizontal scroll-bar is again visible but only to the half.

1 Like

Thank you very much !!! :smiley:.
Its working now and the inital load time is now very small because the loader does not load unnecessary resources anymore.

1 Like

Glad to hear I could help, let me know if you have any issues in the future :slight_smile: