Page 1 of 1

Custom node group to apply colors

Posted: Tue Feb 06, 2018 7:33 am
by Lights_and_Shadows
Just have a quick question / possible feature request (more than likely low priority, but just an idea):

Would it be possible to implement some form of custom nodework for materials, such that we could group together some color nodes into one bigger version and be able to say exchange colors based on presets using them, instead of having to do each color one by one? Would reduce the monotony of such tasks significantly in my honest opinion, but not everyone does that sort of thing.

I suppose I could put some colors in an image texture, and then try to separate them in real-time using existing nodes. Worth a shot.

Re: Custom node group to apply colors

Posted: Tue Feb 06, 2018 8:11 am
by B.Y.O.B.
You will have to show me some kind of mockup or explain further because I can't quite grasp what you mean exactly.
You can plug one "constant color" node into multiple sockets and then you can change all those values at once with the "constant color" node (however you can't texture them). Do you mean something like this?

Re: Custom node group to apply colors

Posted: Tue Feb 06, 2018 5:22 pm
by Lights_and_Shadows
Alright, I have something like this:
example.png
The ones highlighted are the ones I'd like to change, the top ones stay at #00000 because those are being used to assign the bottom color to a texture for assignment. To give context, I have a set of textures that place material types in certain sections of a model, and what I'm looking to do is basically create a preset node of sorts so that instead of having the adjust each color value one at a time, I'd just simply select a different node group and they all change at once. And yes, they are all different colors.

Would it be easier to use a Color Ramp and try separating the colors from that maybe? I'm only looking to make color editing for this project less tedious lol

Re: Custom node group to apply colors

Posted: Tue Feb 06, 2018 6:23 pm
by B.Y.O.B.
I had that idea in the past, too: to make a special node for stencil textures.
But maybe we can also make it more generalized, e.g. try to emulate Blender node groups for example.
Maybe we can add/remove input and output sockets to a pointer node (and have a new input node and dynamic outputs on the output node).

It would be good if you register on github and open a new issue there so I don't forget about it in the future.
https://github.com/LuxCoreRender/BlendL ... issues/new
(You can delete the OS/graphics card stuff in the form obviously)

Re: Custom node group to apply colors

Posted: Tue Feb 06, 2018 7:54 pm
by Dade
As far as I understand, it may be useful to have macro-nodes: virtual nodes that have a list of custom inputs and produce a list of custom outputs and are replaced, during the export phase, with a graph of real nodes. However it sounds like a lot of work.

Re: Custom node group to apply colors

Posted: Tue Feb 06, 2018 7:58 pm
by B.Y.O.B.
Yes, that's what I meant.
However this is solely a BlendLuxCore issue, I don't think it requires any changes in LuxCore.

Re: Custom node group to apply colors

Posted: Tue Feb 06, 2018 9:46 pm
by Lights_and_Shadows
B.Y.O.B. wrote: Tue Feb 06, 2018 6:23 pm I had that idea in the past, too: to make a special node for stencil textures.
But maybe we can also make it more generalized, e.g. try to emulate Blender node groups for example.
Maybe we can add/remove input and output sockets to a pointer node (and have a new input node and dynamic outputs on the output node).

It would be good if you register on github and open a new issue there so I don't forget about it in the future.
https://github.com/LuxCoreRender/BlendL ... issues/new
(You can delete the OS/graphics card stuff in the form obviously)
This is precisely what I was thinking about :) This would also open up a whole new range of material capabilities.

I'll gladly set one up at Github, any way to help ^^

EDIT: Consider it done ^^ issue is ready for viewing when you're ready