How to Blueprint a plane that will change its scale based on UV Scale of its Material

I am trying to create a smart sign that can automatically adjust its scale based on the aspect ratio of a texture.
Using a simple Blueprint of a plane or Any Mesh, how do I connect its scale to the UV scale of its material?

You can do so using a dynamic material and material parameters. In the material editor hook up 2 parameters which multiplies with the UV. In a blueprint you can simply then create a dynamic material from that material and expose those parameters to the blueprint. With the values you can now change the mesh or the material parameters.

Although this video is about downloading and loading textures in Unreal, it still showcases what I explained above.

Thank you so much for pointing me in this direction.

In the Above scenario, The piece I’m specifically struggling with, is given an attached texture, how to I grab, it’s “aspect ratio” and apply that scale ratio to a mesh

Do you mean the aspect ratio of the texture?

Yes, I have an in-game sign being provided by players, where i have an unpredictable aspect ratio. to overcome this I want the sign to shrink and grow to reveal their uploaded image without distorting it.

I have an in-game poster that can be uploaded by players, I don’t ever want to distort it. So i want a mesh or decal that will automatically adjust their size/scale to present the image undistorted.

I see, in that case you can use the Texture Size nodes. Simply create a Texture 2D object and drag it into the grid as a Get, from that node you can then use the GetSizeX and GetSizeY. With this information you can simply pass it into a parameter of the Create Dynamic Material Instance.

Also since it is a variable, you need to either set the texture in the details panel or change it by the Set function.

(Checking …Thank you for your time and patience.)

1 Like