Author Topic: Passing Parameters  (Read 2200 times)

I'm puzzled by this that I think it should be obvious but it isn't for me.

I have two graphs, let say graph Main and graph Utility. Main uses Utility 3 times and it is published to be used en Maya.

Utility does something and the only parameter that needs to be exposed is Color in a Color to Mask Node. I will call that paramater Utility_color

The idea is to use Utility more than once inside of Main because they are at least three masks to be edited in Maya. The goal is to give the user the ability to change the color in each mask, that is to say that if i have 3 Utilities inside Main, you could inside of Maya assign 3 different colors to 3 different parameters.

The problem is: I created three variables (let say, Color_1, Color_2, Color_3) inside of Main and passed one to each Utility, but the only parameter being exposed inside of Maya is Utility_color, i was expecting Maya to show me Color_1, Color_2 and Color_3 as parameters but I haven't yet found the way to do so.

Could you help me with this problem. I hope I've explained myself clearly.

Thanks.

I tried sort of a workaround just to move on.

I created two utility graphs: Utility_A and Utility_B. They are the same exact graph but the Utility_color parameter is different for each one. I included both of them in the Main graph instead of instancing just one utility hoping that given that the parameters are different Substance wouldn't have problem showing them in Maya.

Maya shows me only the color parameter corresponding to Utility_A. I was expecting to see both color parameters because i'm not instancing the original graph, I'm literally using two different ones although they are the same on the inside.

I don't understand, this is pretty counterintuitive and frustrating if i may be honest.

Any help is appreciatted.

Thanks.
Last Edit: May 06, 2016, 12:15:35 am

Hi,

I'm wondering about the value you exposed. It might have overwritten itself as if you just expose the value from the instance graph it will be the same name which is why I am thinking you are only seeing one parameter. When you expose the property, before hitting OK, make sure you use a unique name.

Cheers,
Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

I tried another way:

Inside the same project I created another package different from the one where inititally i had both graphs, let say Package_A and Package_B being the lastest the new one.

On Package_B I copied the graph Utility erasing it from Package_A, then I instanced the Utility from there to graph Main (which is localted inside Package_A) and everything works as intended, so far at least. I created another Utility totally different from the first one, with different exposed parameters and it works as well.

It seems that the thing that wasn't working have to do with the parameters naming as you suggest, but believe me that I tried every single combination i could try on the numbers of parameters, names of them, labels and so forth. I know by now that I must be doing something odd, but I think having a different package for the utilities saves me the trouble (so far) of having to be aware of proper naming. I guess is more like a workaround than a proper solution but I need to finish my job.

Take this as a feedback: probably I'm not getting the idea right just yet, but I insist that understanding the way parameters are passed to instanced nodes is kind of counterintuitive to me, from a pure programming standpoint, an instanced node is a function you call from a main routine (in this case main graph), said function should have by default its variables with local scope, so parameter naming in the main graph shouldn't be a problem no matter how many times i instance a particular node (or even if I nested it inside graphs) or if Im passing an exposed parameter in the main graph to the instanced ones. The input parameters that are displayed in the host application should be the top most called inside the main graph, not the instanced parameters. It was kind of frustrating to figure out what I stated in the previous paragraphs and I'm sure I'm not getting the idea anyway.

Don't get me wrong, I love Substance Designer and all this situation is the result of me getting into more detailed stuff other than creating materials and more on the Tech Artist side of things. I really enjoy working with Designer and you guys are the best. My frustration is part of the process.

I will keep you posted.

Thanks.

Last Edit: May 06, 2016, 05:57:50 am

maybe if you can share your graph, we could have a better look ?

The "workaround" I've explained worked like a charm so far, I finished the task and I'm actually having an entire new issue that I will post right after writing this in another thread, but I erased the original graph due the fact of that very session being the same one where i eventually created two packages to define the Substance.

I do know that I'm not understanding something basic here, so it is in my best interest to try to reproduce problem. Hopefully I get on the right track while doing so, or if the issue reemerges you can have it as a possible feedback.

Thanks.