Overlay images on a texture with custom locations.

Hello all and thanks in advance.

Perhaps this question has already been asked but I have not found a clear answer or I have not known how to use the right words to find it.

The question is: I have a base material with a base texture. And I want to overlay several images on a custom position over the texture.

Here is some images that explain better what I want to do.

Base texture:

Location of overlaying images:

Result:

Could you help me?

Forgive me if I have not explained myself well or it has already been asked before, I am quite new into the unreal engine stuff.

You want to do it all in material? Not in a widget?

1 Like

Hey, thanks for your reply!

I’m not very familiar with widgets in Unreal, but I think it’s more for creating user interfaces and stuff? Sorry for my ignorance.

My idea is to start with a 3d object of a traffic sign, put an “empty” base texture on it. And when you place the signal in the level, you can select which icons to put in each “Image parameter 1, 2, 3…”

Signal with base material:

Material:

Result:

Is it possible to do this with widgets? I’ve searched a bit but i didn’t find what i’m trying to do exactly.

I’d do it with a widget (think of road signs as of UI for the driver!) because of the incredible flexibility and ease of use when compared to doing it purely in material. Just doing text in material is somewhat nightmarish…

Would a setup like this work for what’s ahead of you:

You plop down an actor and choose what it displays from the panel on the right?

The bast part is that is that once you have a widget, you still get to choose whether you want it as a plain widget component (as above) or something more complex since you can pull it through a Retainer Box and use it as actual texture elsewhere.

1 Like

Hello!! Thanks for yor reply.

I think that is perfect for what I want.

I have spent some time to learn how to do the widget, because I had no idea xD.

And I got this, but I’m not sure how to apply it to the actor on the scene. (The signal Static Mesh has configured to work with the texture 90 degrees rotated so I have rotated in the widget?)

Like you said, I’ve tried to figure out how to do it with retainer box and use as a texure searching tutorials, but maybe I’m a bit stupid xD.

I’ll keep trying but maybe could you help me?

I have spent some time to learn how to do the widget, because I had no idea xD.

This is actually impressive, UMG is a beast.

You should not be applying the widget as the entire texture for the sign. This would be very inefficient and difficult. Leave the static mesh as is. Attach a widget component to the mesh and apply the widget there.

image

I cut that bit out of your texture and used it as backdrop.


So you’ll end up with 2 elements:

  • a static mesh - mapped and textured, you’re already there
  • a dynamic, configurable 3d widget sticker you attach to the static mesh
1 Like

You should not be applying the widget as the entire texture for the sign. This would be very inefficient and difficult. Leave the static mesh as is. Attach a widget component to the mesh and apply the widget there.

So I’ve added the widget component to the mesh but I can’t find how to apply my widget there. Sorry for my ignorance :sweat_smile:

I cut that bit out of your texture and used it as backdrop.

I have cut the desired piece of texture too

It’s called Widget Class, in the panel on the right. You can set the size there, too.

1 Like

Sorry, maybe i’m dumb but I cant find the Widget Class you mention. I’ve tried with “Widget” and called customWidget (like in the picture) but I can’t see anything for setup my widget here.

This is where you decide which widget the component added to the actor will show. If you’re looking for these:

This will need extra work. I did not post any detail as I was unsure whether it was something that would suit your needs. If you think this kind of workflow would work for you, I’d be happy to post the way to set it up. Do tell.

1 Like

Oh I understand.

Wold you help to do what you are showing in the picture pls? It would fit better for what I want. Thanks!

1 Like
  • in the widget:

  • in the actor with the widget component:

Call this event in the Construction Script as well. The texture and text variables in the 2nd pic are flagged as Instance Editable - this way they show up after the actor is selected in the scene.


There’s a couple ways of doing this, hopefully that’s good enough.

1 Like

Looks great! I’ll try it when I have some time.

Thanks for taking your time to explain it, you are a life saver.

I’ll let you know when I have something (or not :rofl:)

1 Like