Skip to main content
ShelLuser
Inspiring
August 29, 2022
Answered

I think I found a 3rd way to expose variables; am I overlooking something here?

  • August 29, 2022
  • 2 replies
  • 672 views

Hi gang!

First of all...  sorry, wee bit offtopic but...  deep & warm compliments for this amazing software environment!  I've bought myself the Steam version a few months ago (Substance Designer & Painter) and it didn't take long for Designer in specific to leave a huge impact on my 3D setup (mainly consisting of Daz Studio & ZBrush). From further enhancing / editing base materials from Painter to designing whole new textures and material presets, I'm still quite excited about all the stuff I can do right now!

 

Totally amazing!

 

Now... I'm still studying (getting my fingers behind functions) and when reading up in the manual about Exposing parameters I learned that there are only 2 options: expose a single parameter or do a batch expose. This section also tells us that static parameters cannot be exposed.

 

Thing is... I think I discovered a loophole, but I'm not 100% sure if this is intended behavior.

 

I've added the "Messy Fibers 1" noise generator (one of my favorites) to a substance graph and I'd like to expose "Random Seed" which is a base parameter; the option to do this isn't available. So I guess it can't be done?

 

However...

  • Double click on the graph window to expose the global parameters for the current graph.
  • In the properties window scroll down to "Input parameters" and add a parameter, expand the new section and then use these values: type is Integer, default value is 0, max value is 10. Don't forget to give it a usefull identifier, I named mine "Randomizer".
  • Go back to the properties of the Messy Fibers node, if you check the menu for 'Random Seed' you'll now notice that you can now assign it to "Randomizer". If you do so the property turns blue, just like it does if you'd exposed the parameter. It didn't of course: instead it has created a function: if you edit it you'll now notice a "Get Integer" node linked to Randomizer (gotta love this software's flexibility!).
  • Now create a new substance graph, and instance the previous one we worked on: you will now notice an instance parameter 'Randomizer' when you check its properties. 
  • Better yet: this parameter will allow you to expose itself through the usual way of using the menu option ("Expose as new graph input").

So basically I managed to expose a parameter which couldn't be exposed through regular means, making me wonder: did I really discover a 3rd liable way to do this? Or is there something I'm overlooking here?

 

I don't have access to my home PC right now, all I have is Designer to work with and so far things work as I expected: when I change the parameter in the properties of the instanced node then the graph gets re-calculated..  But I cannot help wonder if I'm not going to run into issues later?

 

Thanks in advane for any insights you guys may be willing to share!

 

This topic has been closed for replies.
Correct answer ShelLuser

I solved the 'puzzle'!

It may sound stupid but I don't take it lightly to click "mark as answer" on my own posts so obviously I made sure to triple check my facts and I'm going to share the full detail of what's going on here. Hopefully some of you new random readers learn some new too...

 

#1 Base parameters don't need to be exposed!

This turned out to be a newbie mistake on my end: base parameters (as the name already somewhat implies) are basic parameters which get inherited by all instanced (or "child") nodes.

 

I totally glossed over this one: if you create a new (empty) substance graph and check the properties section you'll notice that the base parameters are pretty much the only parameters you can configure. If you then check the available 2 menus closer than I did you'll notice an inheritance menu which can set the parameter "Absolute" or... "Relative to parent" (which is the default!).

 

Meaning that there's no real need ("sorta") to expose this one. However, this also means that this isn't a static parameter as I assumed in my previous post. Better yet: my method definitely has some merit to it because now I can change this parameter either individually or I can the random seeds for all of the nodes within the graphic that I've instanced.

 

#2 Input parameters are basically local variables

I assumed that input parameters were somewhat comparable to the input values which you can set for individual nodes. Not really: they're basically variables that 'live' within the context of the graphic.. And their intended use is actually close to what I did: this method can allow you to change several values at once (functions for the win!).

 

However, that's also the reason why they're accessible by a parent graph, in the end they're still meant to input data.

 

So all in all the above was a combination of being new and using an intended feature for different purposes. Still, it's definitely something I can recommend looking into yourself because... more random settings also imply more creative control over your graphs.

 

Thanks for reading!

2 replies

ShelLuser
ShelLuserAuthorCorrect answer
Inspiring
August 31, 2022

I solved the 'puzzle'!

It may sound stupid but I don't take it lightly to click "mark as answer" on my own posts so obviously I made sure to triple check my facts and I'm going to share the full detail of what's going on here. Hopefully some of you new random readers learn some new too...

 

#1 Base parameters don't need to be exposed!

This turned out to be a newbie mistake on my end: base parameters (as the name already somewhat implies) are basic parameters which get inherited by all instanced (or "child") nodes.

 

I totally glossed over this one: if you create a new (empty) substance graph and check the properties section you'll notice that the base parameters are pretty much the only parameters you can configure. If you then check the available 2 menus closer than I did you'll notice an inheritance menu which can set the parameter "Absolute" or... "Relative to parent" (which is the default!).

 

Meaning that there's no real need ("sorta") to expose this one. However, this also means that this isn't a static parameter as I assumed in my previous post. Better yet: my method definitely has some merit to it because now I can change this parameter either individually or I can the random seeds for all of the nodes within the graphic that I've instanced.

 

#2 Input parameters are basically local variables

I assumed that input parameters were somewhat comparable to the input values which you can set for individual nodes. Not really: they're basically variables that 'live' within the context of the graphic.. And their intended use is actually close to what I did: this method can allow you to change several values at once (functions for the win!).

 

However, that's also the reason why they're accessible by a parent graph, in the end they're still meant to input data.

 

So all in all the above was a combination of being new and using an intended feature for different purposes. Still, it's definitely something I can recommend looking into yourself because... more random settings also imply more creative control over your graphs.

 

Thanks for reading!

ShelLuser
ShelLuserAuthor
Inspiring
August 29, 2022

Update (figured I'd better reply vs. editing my messsage)...

 

It seems I did indeed overlook something...   while the output of my instanced graph definitely changes as soon as I change the value of my "exposed" parameter, when I check the graph itself it can see that the fiber node never changed its appearance. So something is happening, but I'm not 100% sure what so far 😉

 

I'm getting more and more convinced that I'm misusing an existing feature.