Changing materials for imported meshes for MultiMesh

Godot Version

Godot 4.2.2

Question

I’m looking to use some multimesh-based approach for foliage in my game (namely, I’ve tried MetaMultimesh3D, Yamms and Spatial Gardener). However, the problem with this approach (and vanilla MultiMesh for that matter) is that MultiMesh works with only Mesh resource.

I currently import models with advanced importer and set materials there as external. However, this makes the imported type a scene, not mesh. Using OBJ as Mesh importer results the materials being imported from the model instead.

Only workaround I’ve found so far is to make an inherited scene of the model and copy the Mesh from there. And in case of Spatial Gardener there’s extra hoop jo jump through as it needs the mesh to be saved into a file.

The workaround works, but iterating on the design is major pain, requiring multiple steps to be able to see the results in-engine.

I looked into import plugins, but if I understand right, EditorImportPlugin bypasses the default importer entirely and EditorScenePostImport works again with scenes, not meshes (altough it could be possible to use it to save the mesh upon reimport).

Any ideas? Maybe I’ve overlooked some obvious possibility?

You can save the Mesh Resources in the advanced import window under Actions... / Set Mesh Save Paths

If you need more control you’ll need to write an EditorScenePostImport script and code whatever you need there.

1 Like

Thanks, this is what I was looking for :ok_hand:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.