Hi, this is not really possible to create a node that will work in RS.
When you implement a node there is different terms you need to know:
- User Node: This is the UI of the node, defined via the resource editor (like a .res for a BaseObject).
- Core Node: This is the process unit, this one have the logic of each nodes.
- Node Template: Similar to an asset but coded. Its a blueprint that re-use other node templates or core nodes. Typical logic is load an user node (the UI), create others core nodes or node template and connect them together.
- True Node: A User Node + a Core Node or a Node Template. This term is used in documentation to hint at a node as a typical user would understand it.
Then regarding how a graph is being executed, in the case of Scene Node and Standard there is two main stages to know:
- Compile Time: All nodes are unrolled and their data are flatten as much as possible. If you do a simple addition with 2 value nodes, during this phase the 2 values are added together, and only the result will be used (like in C++ if you do constexpr). But if one of the two initial values is dynamic (e.g. like the output of another node) then the logic will be executed at Run Time.
- Run Time: The previously unrolled graph with all "constant" data and all core nodes that rely on dynamic data are executed.
In the case of Redshift, the execution of the graph differs. It doesn't utilize the two previous stages. Instead, it examines the graph generated in Cinema 4D and replicates it internally as a GPU shader graph. As a result, there is no compile-time execution in Redshift.
With all these information, the real answers to your question is you can create node for everything that is not bound to the Redshift Execution so this means only:
- Create a Node Template that re-use only existing nodes.
- Create a Node Template that will work only at compile time. See ColorInvertNode Compile Time Example. But since RS for the moment did not support compile-time for most of there nodes, this will be quickly limited, but for Standard render that does use more compile-time node and it can make sense to go for that.
So I would say this leave very little room for implementing any meaningful shader for RS.
Finally regarding your question, in order to make your node visible in a node space, you should implement the method NodeTemplate::SupportsImpl and return true to inform if your node template support the given node space. Note that each core node get wrapped into a default node template, and this default nodetemplate call the NodeSystem::SupportsImpl methods, which is the methods defined by a NodeSpace to specify which nodes to accept.
If you have any other question, please let me know, but please keep in mind that we will have reduced Levels of Support between 22/04 and 26/04.
Cheers,
Maxime.