How do I use a parameter created in a BluePrint class in the material editor in Unreal Engine 5

I’m following a video where the author creates a Parameter (Elevation) in the Set Scalar Parameter on the Material node.

The idea is to use that parameter in the Material Editor so I can do some actions based on the Parameter value.

I don’t know how to use the Parameter. What do I need to do to find it in the Material editor? I don’t see it in the left panel as other parameters create inside the Material Editor, so I don’t know if I need to do something in the blueprint class where the Set Scalar Parameter on the Material node creates the parameter.

Thank!

1 Like

It works the other way around.

You make the parameter in your material, and talk to it from the blueprint.

You just have to make sure you have exactly the same name ( case sensitive ).

1 Like

On material editor, add ScalarParameter for float scalar parameter or VectorParameter for vector parameter.

Based on your screenshot, the LandColor parameter can be set using Set Vector Parameter Value on Materials and set the Parameter Name to LandColor

1 Like

Thank you for the guidance, but it seens that something else is missing from my side. I’ve created the parameter in the Material editor using the same name (case sensitive), but seens to be no connection with the one I have in the BluePrint. I mean, the Elevation parameter should be the one that changes the color of the tile, but it has their value from the Material editor.

So you make a dynamic material instance in your BP, and then control the scalar param?

I’m not sure about your question. But the objective is to use the Parameter “Elevation” to control the color of each tile in a grid. So far, I get the same color on all of them.

This is an image of the video tutorial where you can see that the parameter Elevation is there, but there is no place for a value.

Which is not my case. My Elevation parameter has its value.

This should be something dumb from my side that I’m not figurate out how to use the tool.

Appreciate all your help!

Can you show me where you’re setting it in the blueprint?

So I made a material

And a blueprint

Construction script

Event graph

hex

2 Likes

It’s super clear now. I thought I do have to do something in some other place in order to link both “Elevation” parameters, but it seems that just the name has to be equal. I was also confused 'cos the video I’m following uses Instance objects and not instance objects, so when I was expecting a multi-color grid as an Instance, the change was happening on the no Instances objects. (My boolean variable was on and should be off)

I do appreciate your time for helping me with this!

I’m convinced that Tutorials are not always helpful. You mustunderstand the “Why’s” behind any action to release your creativity! :wink:

1 Like