godot-blender-exporter
godot-blender-exporter copied to clipboard
Feature request: Allow the user to edit the material in Godot
I wish that the user can edit the material within Godot. This can be useful if the user wanted to change a material's color during game play via script.
Pretty interesting point, Spatial Material may be the best option to do this functionality, however, I still haven't come out a compact way to export Blender material to Spatial Material.
If you want to do it with the current shader script, it is possible but it may need to have some understanding of the shader script and add uniform variable somewhere in the script. Uniform variable can be changed via gdscript
Besides, current I am working in progress supporting VisualShader coming in Godot 3.1, once it is done, it could be easier to add some uniform node
I wonder if converting 'value' and 'rgb' nodes into uniform values would be a sane approach?
@sdfgeoff I think most people don't use value
node and rgb
node, more likely they would set the value on socket. But you just inspired me, it would a good idea to make non-zero socket to be uniform (or at least given an option to do that). It would be easy to implement after my recent refactoring
The problem I see with that is that there's no nice way to name them, and in most cases, the majority of sockets will be unconnected resulting in many many unused uniforms.
Even though most shaders currently don't use value nodes, I think it would be better to use them and then document that - and then you can draw the uniform name from the node name