Home Adobe Substance

help me with idea for a custom node

greentooth
Offline / Send Message
Finnn greentooth
Hey Substancers,

I had an idea for a technical custom node (some kind of a blend node) that has changing parameters depending on a preset.
For example: I want adjustable input numbers and several parameters changing accordingly in the background. Like different masks for each input etc.

Would be great if you could give me a hint for a starting point. I know there is the 'create node from selection' option, but I think my idea is to complex for the standard node editor.
I appreciate every input,

have a nice day
Finn

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    sounds like that's what functions are for - they're documented fairly well on the website
  • Finnn
    Offline / Send Message
    Finnn greentooth
    Yeah you are right. The only time I've been to the function side of SD was for the pixel processor in one of the allegorithmic tutorials.
    I will defently look into the documentation, maybe I can figure something out on my own.
    If anyone has some knowledge inside the function editor, I would be happy about a hint how I would start doing a custom node like this. :)

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    you'll need to be a bit more specific about what you want to do really.  

    The input parameter functions work the same as pixel processor and fx-map functions so it'll all be familiar.  
  • Finnn
    Offline / Send Message
    Finnn greentooth
    My ideas was to create a custom node for the community where it is possible to blend the different shader maps for material presentation. Height/Normal/Diffuse each with the same mask size, so when you want blend 4 maps together, the size of the masks change accordingly. Which can be easily calculated in the function editor I guess.
    But I need a starting point...


    Like Josh Lynch did here for example:

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Sounds like you just want some material blends that are all hooked into the same input parameter.  It's pretty straightforward,  just get the graph working and then if you get confused about hooking it all up just post up a picture of the graph and someone will talk you through it
  • Finnn
    Offline / Send Message
    Finnn greentooth
    I've been trying something in the graph editor: I used a Material I made some weeks ago. This isnt very customizable though... Any idea how I could create custom outputs amount of outputs? 


  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Ohh,  you meant the image on the right.

    You won't be able to dynamically choose the maximum number of inputs but you can choose the number displayed up to a preset maximum

    If you feed all channels into a pixel processor you can simply tell it to output ..

    input 1 if $pos.x < 1/numberofinputs
    Input 2 if $pos.x > 1/numberofinputs && $pos.x < 2*1/numberofinputs

    Etc. (obviously that's just typed out on a phone and probably won't work as written) 
  • Finnn
    Offline / Send Message
    Finnn greentooth
    If the conditions are true, I activate the input? Or is this already about setting the right position for the cropPING according to the number of inputs?
    So divide 1 (for the whole matrix) through the number of inputs to get the crop size for the first input. 

    I created a Pixel Processor, fed my material maps in, and tried to create pos.x value. 
    I used float 1 (I guess that's right, because the pos.x value is the x-value of the matrix that we work with so one value)
    Edit:
    But I was wrong - I have to use get float 2 for the pos value. How do I get the pos.x value from there?
    also, how do I get the number of inputs?
    also, how do I even get the inputs?

    Thanks for alot helping me !  :D
  • Finnn
    Offline / Send Message
    Finnn greentooth
    Here is what I have tried. As you can see I did not know how to get the pos.x value and how to get the input values... But am I on the right path ?

  • Clark Coots
    Offline / Send Message
    Clark Coots polycounter lvl 13
    I'm new at custom functions too, but my guess would be your $pos is a Float2 which means you need to break it into just the pos.x value with a Swizzle node (I think) so you're comparing the same variable type as your 1/number of inputs
  • Finnn
    Offline / Send Message
    Finnn greentooth
    I'm new at custom functions too, but my guess would be your $pos is a Float2 which means you need to break it into just the pos.x value with a Swizzle node (I think) so you're comparing the same variable type as your 1/number of inputs
    The swizzle node works perfectly. I can simply select any of the values that $pos includes. Thanks!
Sign In or Register to comment.