-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node Groups #391
base: Development
Are you sure you want to change the base?
Node Groups #391
Conversation
I did not have time to look into the implementation of groups but one thing that can be made possible using groups is a loop node. UI-wise they are always tricky but with groups you would be able to load in a group as your loop target and set an iterations number. Passing the iteration count to the group would basically open up the entire workflow using loops that was only available through code before. I was wondering if the design of the groups in malt would allow for something like this. |
Also we should allow creating new group node trees from the Group Node UI as well as the ability to select certain nodes and compress them down to a node group |
Yep, that should be doable.
Agree, but honestly, I'm somewhat tired of working on so much node/UI stuff lately. |
I can take care of that if you want. Cant do it right this second but I hope I find some time this week. (so much stuff going on now I will need to make myself a todo list :D)
I think that should be enforceable.
I feel you! Do you already have in mind what you want to tackle? |
A while ago, I implemented support for freestyle edges and geometry based line detection (like Freestyle/LineArt) for contours and creases. There's plenty of other stuff I'd like to experiment with, but those are the main ones I think. |
Been testing this out for a good bit, converting old shaders to node groups for efficiency's sake. I'll probably make a longer discussion thread later about some stuff I'd like to see, but figured I should bring this up asap due to how negatively it can affect the workflow. You can't have input properties and output properties with the same name, you always get a redefinition error when doing so. Which it makes sense, I'm guessing this is just how GLSL works? But some sort of fail safe is needed I think, people should be able to call their properties what they want. Perhaps on the frontend, Malt displays the properties as you type them, but in the code it adds Input or Output to the beginning of the property, so that there can't be conflicts there? Or maybe at the very least Malt could entirely prevent you from adding duplicate property names? I was really scratching my head for awhile last night trying to figure out what I was doing wrong with the Node Groups but yeah it was just duplicate properties 😄 |
Fixed! Thanks for the testing. |
8165615
to
8b862f2
Compare
Initial Node Groups implementation.
Each shader type now has a corresponding group type (ie. Mesh and Mesh Group).
These groups can be used with the new Node Group node (Add Node > Other > Node Group).
Group graphs generate a function in a separate file that can be imported by the node trees that use them.
All node group parameters are private and their values are stored in the tree itself (this greatly simplifies the implementation).