editor
editor copied to clipboard
Node-Based Shader Editor
Our artists are blocked by the technicalities of writing GLSL and have to turn to our programmers when they need custom visuals beyond what the built-in physical material is capable of. This makes our programmers a bottleneck in production. We would prefer that our artists are self-reliant, working directly in the PlayCanvas editor as much as possible. This is why we think a visual, node-based shader editor would be a major improvement to their workflow. This would also bring PlayCanvas up to par with competing engines in terms of material and shader creation capabilities.
I do not recommend taking this direction.
- Node graphs are only good for extremely simple shaders. For complex shaders they are even harder to manage than code. Check any sufficiently complex material in UE4, and you'll see "code nodes", encapsulating normal HLSL sprinkled everywhere, which kinda defeats the purpose.
- Artists still need to understand how shaders work to avoid hitting slow paths.
- Node graphs offer same operations GLSL does. The only difference is that instead of tiny words you have huge draggable rectangles.
- Making node graphs support ALL native GLSL features is hard. Unity's new ShaderGraph is lacking lots of features, for example.
If your artists can't write shaders (but can write graphs), there can be only two reasons:
- Engine API for shader customization is too complex and requires more knowledge than basic GLSL ops. Can be improved, if that's the case. For example, chunk overrides for materials can be shown in UI.
- Irrational fear of code. Can be improved by explaining that there is in fact little difference between writing code and connecting nodes.
Hi :-)
I definitely understand your concern. My intention was not to suggest that PlayCanvas should replace GLSL with node graphs. Instead, I would really like to see both systems co-exist with node graphs as an abstraction on top of GLSL. Something similar to what Amplify Shader Editor or Shader Forge did before Unity decided to implement their own Shader Graph. If the node graphs simply created vertex and fragment shaders as an output, we'd even have room for programmers to optimize any slow-running code without being bothered by nodes ;-)
What I'm currently seeing in production is artists creating materials in Blender or Maya using nodes which they're then unable to recreate in PlayCanvas. In my experience, there's a huge leap from node graphs to writing shader code and our artists have no coding experience at all – they would have to start from scratch learning how to code and that's not what they're hired to do. We want them to work directly on shaders and materials in the engine because they have a better understanding of artistic principles and what makes a game look great. If possible, I think we really need to leverage that and avoid bottlenecks in production that arise when programmers have to do art. I would really like to see a workflow where artists are in control of the entire art pipeline, freeing up programmers to focus on gameplay and systems.