On the implementation of input and output nodes #37
Replies: 3 comments 3 replies
-
As a start, and for everyone's convenience, I'll quote the first design/proof of concept presented by @ambientdark333 and @sbudro here, since it was the first step/proposal regarding input/output in Nodezator graphs and currently the only one as far as I can remember.
I'll share my thoughts on such proposal as soon as possible, but it will probably take some days, since I need to divide my time among a lot of tasks regarding Nodezator and the Indie Python project. Y'all have a nice week 😉 |
Beta Was this translation helpful? Give feedback.
-
Hello, everyone, I hope y'all are having a nice day. @ambientdark333 and @sbudro, sorry for the delay on my reply. For now, this reply takes into account the proposal @sbudro posted here, which I pasted as the first comment of this discussion. First of all, in no way a day or two or three will be enough to evaluate a proposal of this kind, because the feature to be implemented just happens to relate to a lot of different features and "services" within Nodezator. It will be something for which I'll have to schedule time to. In other words, there's just too much moving parts. But it's nothing to worry, really. It just means we'll have to push forward one step at a time. So, without further ado, here are my thoughts on your proposal so far: Your approach when thinking about a solution for an input node is very similar to how I do things myself. I try to find something that already offers functionality close to what I need and try to adapt it to my needs. However, in order for this to work, the solution presented must meet the purposes of the feature. In our case our purpose is to create input and output nodes that serve to define a signature for the function represented by our node graph, so that we can export the node graph directly as a full-fledged function, without having to tinker with the code afterwards and being able to use the exported code as the definition for a new node. With that in mind, here's a first question: (1) Nodes in Nodezator are highly versatile in that they can represent any kind of signature a given functions has. This includes positional-variable ( Now, I myself don't have an answer for that either. I'm just pointing out that the design and implementation of the input/output nodes feature is an endeavour larger than it seems at first. My preliminar thought is that though having simplicity as an advantage, your proposal for input nodes doesn't meet the needs/purpose of the feature. I actually think that Blender3D handles input/output of group nodes rather appropriately. Even so, several adjustments would be needed if such design would be brought into Nodezator. For instance, the aforementioned inclusion of variable parameters. Please, take a look at the video linked below. In the video you can see that when a node group is created in Blender there are 02 nodes, named "Group input" and "Group output", that control the input/output of the group: See how effortlessly it is possible to create new parameters just by dragging existing parameters from nodes inside the group into the input node? Additionally, the new input created in the group input node inherits the type/widget used, so the user doesn't even need to worry about it. Of course, if needed, in Blender the user also can create parameters independent of the ones in the inner nodes. Here's another question: (2) Can your proposal be extended to allow the definition of new parameters with the same ease as shown in the video, without the user needing to worry about the type/widget used? I think in the present state your proposal would make it very difficult to provide such functionality. Due to such complexity, I think it would be more appropriate for input nodes in Nodezator to be represented by a new class rather than using proxy nodes. There's just too much additional services it needs to provide in order to fulfill its purpose. For the same reasons, I also think the output node should be a class apart, rather than reuse a built-in node for dict, even though the output node will need far less new services than the input node, since it is quite straightforward. Actually, just like a single output node controls all the outputs of a graph, I think it would be better to have a single input node contain all the inputs as well, like the Group input node in Blender. This is due to various reasons, like organization in general and because it can better manage the inclusion of variable parameters. Please, let me know what you think of my feedback. As I said, I won't impose my design (something similar to what Blender3D does), but I need to make sure that, whichever design/proposal gets accepted in the end, it meets the requirements of the feature. For that to happen there are a lot of aspects and layers we'll have to analyze in order the ensure the final design chosen is adequate. I have yet more questions, but I think we should advance one step at a time. I think this feedback here is a good start. Considering what you've shown me, I think a design closer to how Blender3D handles stuff is still more adequate for Nodezator than the one you've shown. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! I appreciate the thoughtful discussion about this feature so far. Subgraphs are obviously an important and complex feature requiring a lot of thought. (I will refer to this feature as "Subgraphs", but it's known by many names in other apps: Groups/Gizmos in Nuke, Groups in Blender, Compound nodes in Maya, Subnets in Houdini. Feel free to suggest a different name.) Subgraphs in a node editor are like functions in a text-based programming language. Based on this analogy, I can think of a few design options/questions (none of which I have an answer to):
I'm sorry for the stream of consciousness! As I said, I have no answers at all, but I wanted to write down these topics so that we can all discuss them further. |
Beta Was this translation helpful? Give feedback.
-
Concept: Input and output in Nodezator
Hello, everyone,
The idea of inputs/outputs in Nodezator was first suggested/commented by asgore in this highlighted youtube comment where he asks "can we create new functions in the editor using nodes?".
Several months, later @ambientdark333 and @sbudro have been exchanging comments with me, starting with this one, where they presented their design and implementation of input/output nodes as a way to define inputs/outputs for Nodezator graphs. As ambientdark333 mentioned in one of his messages, being able to define inputs and outputs inside Nodezator will help us not only to export the .ndz files as functions with defined signatures but would also allow said functions to be used as nested graphs within other .ndz files, just like macros in Blueprint (or as I mentioned, like group nodes in Blender).
This discussion
This discussions aims to gather suggestions/feedback/ideas/requirements regarding the introduction of input and output nodes in Nodezator. Here anyone can
I also plan to share my own ideas, but in no way I want my word to be taken as final on any matter. Even though I'm the source maintainer of Nodezator (and the Indie Python project in general), I want my role to be that of someone participating in the process and at most helping mediate the discussion as needed.
Only in the extreme case where consensus cannot be achieved or I find some design inherently flawed, potentially harmful or just plain unnecessary, I am to give the final word or exercise my veto power, always explaining the reason behind it.
I won't define a specific date for this discussion to finish yet, since there's still much to discuss and decide (and I have a lot on my plate with the implementation of branching and looping to begin on December 10th.
Beta Was this translation helpful? Give feedback.
All reactions