Hello.
I am currently messing with blender spaceship generator plugin, but the plugin's generated materials are using a few blender specifc visual shader nodes, and when you import them into godot, the materials completely borked when exporting with gltf/glb format(surface albedo emission etc setting revert to default).
Then I tried using godot's official escn blender exporter to export with script material option ,but exported shader scripts are in oudated api and function call generated parameters become bugged(number of params don't match declaration) when a node has more than 2 in–variable or more than 1 out–variables.

So what is the optimal way to import or convert blender shader into godot?
Seems I tried most solution on docs/google but none worked properly, maybe rebuild visual shader from scratch in godot is the only solution this problem...

Thanks.

You should probably handle the generator plugins output as a base asset. You merge any relevant objects generated and retopo into a lower poly object, UV it then bake the complex material from the base to the retopologized object as a simpler material with textures for different channels.

That's the basic idea anyways. I haven't used this plugin that you mentioned so I can't offer any specific advice. But there's plenty of tutorials and info in the blender documentation to figure this out.

    Megalomaniak
    Thanks for the advice.

    The plugin is here:
    https://github.com/godotengine/godot-blender-exporter

    And generator:
    https://github.com/ldo/blender_spaceship_generator

    The problem with gltf/glb exporter is the export only supports spatial material export measure, which messes most blender visual shader materials up.
    The plugin I posted above can export with a 'script shader' option, which might work-around some blender specific visual shaders, though the supported blender counterparts are quite limited.

    Anyways, maybe your method will be better, cause the support for blender visual shader conversion won't be perfect in forseeable future.

    Thanks again.

    Also worth a mention that the same logic would apply to anything generative/procedural you might do with the geometry nodes(such as terrain or city generation for an example, or since you seem interested in space games, planets and space stations) so figuring that workflow out for yourself is likely more valuable than you might initially expect.

      Megalomaniak Thanks. I will look into that later, focusing on getting Godot frontend and Godot+nakama+high level multiplayer working atm 😃