Join Joel Bradley for an in-depth discussion in this video Building an FX map, part 1, part of Substance Designer Essential Training.
- [Instructor] As we saw in our previous exercise, we can create functions for most of the parameters that we find on a node, and whilst this is brilliant, if we want to control quite a few parameters via functions, it can get a little tiresome (laughs), keep swapping between all the function graphs that get created. Which is where variables come into their own, as these allow us to create all of our function logic inside a single graph, and then simply assign them to the different sections, meaning we can then add a single node to our other parameters and get them to reference the value associated with the variable of our choosing.
If that makes little sense at this point in time, don't worry, as we will be seeing it in action. Continuing from where we left off, then, we can see that our graph has a number of tabs running across the top, and so let's make sure that we are in our FX map, and then click on the Quadrant node to see its parameters. Now, our luminosity controls aren't showing up because we currently have a function controlling them. What we can do, then, is increase our Iterate node's iterations value by clicking on it and setting it to, or roundabout, 400.
This will give us 400 blades of grass in our zero to one space. Because each of these is slightly see-through, the alpha stack making our blades look much brighter than they should, which shows that the Iterate node is working, as the blades are clearly being stacked on top of one another. And what we need to do now, then, is set up a function so as to randomize those positions. And so, let's click the function button on our luminosity to jump back into that function graph.
Now, position has two control parameters in Substance Designer, which is x and y, or u and v, to cover the zero to one space. What we can do, though, is use just a single parameter, and then use functions to randomize them. Because of the Iterate node, this randomized function will be called for each blade of grass, thus giving each of them a unique position in the FX map's zero to one space. Let's press the space bar key and add a new Float node via the space bar search, and set its value to one.
With it selected, let's press the space bar again, and this time, type the word random, and click to add a Random Function node. Then, with it selected, let's press Control + C and Control + V to give us a copy. We have done this because, as stated, we need two values to control the position, and doing things this way will give us a random value for both the x or u and y or v parameters. We do need to combine these into a Float2 value, though, as we will need to set a node as the output, and, of course, we can only have one output.
To tackle that problem, let's select the top Random node, press the space bar key, and type the words vector float, and then choose the Vector Float2 node, which will bring our two random float numbers into a single output, whilst at the same time retaining the two separate information channels. Let's make sure that both nodes are piped into the Vector two node there. Okay, so that is our function for creating random position information, but, of course, we have created this logic inside the luminosity control.
The question, then, is how do we get it now to affect each blade's position value? Well, this is where our variables come into play. Let's make sure that we have the Vector Float2 node selected so that we can press the space bar key, type the word set, and then choose the node of the same name. What this node will do is let us assign the information piped into it, so our two random float values, to a variable that can be referenced.
Let's give this a clear descriptive name, such as Position_Random, and then highlight the text and press Control + C in order to copy it. Let's come back to the FX node graph and click the Quadrant node, and then, in the pattern offset controls, where we see our two float values, we can add a new empty function, and then click to enter its graph. Now we simply press space and type get, choose the Get Float2 value, seeing as we know the variable we created contains the two float values that we need, and then paste the variable name that we copied earlier, and press Enter.
We should now see the name appear in the node preview. Don't forget, as I have done many times before, to set this Get variable node to be the output via a right click. It is very easy to miss this step and end up spending 30 minutes pulling your hair out, asking why nothing is working. Well, let's get back to the luminosity function, where our logic lies, as we currently have a problem, and our luminosity controls are set to be the output for this function, and we can't choose to set the Variable node as the output, as well.
Thankfully, we can set up a sequence that will run through all of the function logic one step at a time. With the random position Variable node selected, then, let's press the space bar, type sequence, and then choose that node, and pipe our very first float value into the second slot, after which we can right click on the Sequence node and set it as our output. Right away, we see that our position gets randomized, but we don't seem to have 400 blades of grass.
This is because we have yet to randomize the scale or the rotation values of the FX map. Still, you can hopefully start to see that when we add the power of functions to our Substance Design workflow, we can make some pretty amazing tools. As our last step in the exercise, let's select the very first float that we created, the one controlling luminosity, that is. Press the space bar and type random. And then add a Random node to the grass. This will just make sure that we are adding random luminosity to our end result, as well.
If we are creating all of our functions inside a single graph, however, then it is going to be important that we organize them well. And so, off-capture, before we move into our next video for the chapter, I will create some frames here and name them accordingly.
Instructor Joel Bradley begins with an overview of a prebuilt substance graph, demonstrating the strengths and nondestructive workflow of Substance Designer, and walking through basics such as navigating the Substance Designer interface, adjusting important preferences, importing meshes and maps, and using the 2D, 3D, and Graph views. He then moves onto the large array of essential "atomic" nodes in Substance Designer, including the Blend, Curve, Slope Blur, Normal, Gradient, and Water Level nodes. These nodes comprise the heart of the Substance Designer workflow. Then learn how to create a custom panorama from scratch, and explore more advanced topics such as MDL materials, functions, and FX maps. Finally, Joel closes out the course by putting a substance to use. Learn about the advantages of using a published substance file (SBSAR) over hard-coded bitmaps for in-game materials, and see how to import a substance package into a game engine such as Unreal.
- Choosing a graph template
- Importing meshes and maps
- Navigating the Explorer and Library
- Working with the Graph view
- Using 3D and 2D views
- Using the atomic nodes
- Creating and combining normals
- Blending shapes together
- Creating MDL materials
- Building an FX map
- Publishing a substance
- Using a substance in a game engine like Unreal