How do I offset a texture from a Blueprint

I’m currently creating a Blueprint for a static wall mesh. Now I want to add two variables that change the X and Y offset of the applied material on the wall (like you can do with Photoshop offset).

If there is also an automatic system that can detect nearby walls and automatically offset the texture so it matches up with the other meshes nearby, that would also be nice, but I would like to be able to offset X Y myself too.

Example 1:
If I place two walls next to each other and the first one has a length of 100, I would like to be able to offset the next wall texture by 100 to match up and align properly. If there is an automatic way for an automatic texture alignment like you have with brushes, that would be nice too.

Example 2:
If I have a material that has dirt on the bottom of the wall, I would like to adjust the offset so the dirt is actually on the bottom.

Hey Blue669 -

Here is a quick pass of a material that would be controllable as you request:

You would probably need to do some math or a better fading gradient with the Dirt Texture to limit its spread. In addition you could take the dirt and also make it WorldAligned like the brick.

Thank You

Eric Ketchum

Thanks Eric!
I’m still looking for a way to offset a texture on a static mesh.
Here’s an image:

The wall is a blueprint and I want to offset the X and Y (or U and V). The blue arrow shows that the texture needs to be offset in the vertical direction to make the dirt look like it’s coming from the top of the wall. The red arrow shows the texture needs to be offset in the horizontal direction so the texture does not repeat over the edge but rather continue.
Sorry if I’m bad at explaining myself.

Hey Blue669 -

I think what you are wanting to do is have control over the U and V tiling within your blueprint and this can be done in a simple way just by taking a Texture coordinate and adding it to a parameter that you then set in the Blueprint construction script. You can do that by Creating a Dynamic Material Instance using the master material as the material source.

Here is a, possible overally complex, material in which you could directly take the X and Y coordinates and input it into the parameter and it would add the offset value to your material. I am using a mask to control the dirt in this example but you could just as easily set those values manually through the parameters. In this example, in total, I have 6 parameters each controlling either U or V of each of the 3 texture types I am using. If you do not want to use teh X and Y value or you find that it doesn’t quite work remove the Frac and Clamp and plug the parameters directly into the Append Vector which should allow you direct control.

Thank You

Eric Ketchum

Also, to add - you should set each of these variables as editable in the Blueprints so that each one can be controlled from the Details panel and set differently for each instance of this blueprint in your level.

Eric

Yes, thank you very much! It works exactly like I wanted.
Very good help, highly appreciated!

This is exactly what im trying to do too, but for door numbers. I want to offset a texture on a staticmesh.

Im having problems doing the above, obviously im missing something. I have the UV node from my texture linked to (math) Add node. Linked to A is a TexCoord node, B goes to an Append Vector node. A and B inputs for the Append is linked to a (Parameters) ScalarParameter. Not sure if thats correct or not. When I change the values of both the ScalarParameters nothing happens in the texture preview?

Can somebody give me a nudge in the right direction.

Hey baz_uk -

What you want is an exact UV selection and the method I gave below is more an indirect overlay. You probably will have to go back and redo your room number texture but here is a really good way to use a probably aligned flipbook style texture and have individual frame control of where the texture aligns.

Cheers Eric,

This is really cool, however, decided to stick to using a material offset in the V direction to assign my different door ID’s to my staticmesh door. They were three digits such as A00. So I needed to offset each digit to make unique door ID’s. I have plans for the flipbook method you just posted though. Looking forward to testing that out!

I am trying to achieve a similar result. I have the offset working in my master material / instance and have setup the blueprint following the tutorial here: - YouTube

The variable works in the blueprint editor, but I don’t see the variable in the editor. (Asset selected, details tab open, but it’s not there). Any ideas on where I went wrong?

Hi jStins -

Have your made the Variable Editable in the Blueprint? It must be set to editable (the eye icon next to the variable should be open) in order to see the variable in the level details panel.

Eric Ketchum

Thanks Eric,

I figured it out. I was looking for the variable on the static mesh asset used to create the Blueprint. I realized that I need to pull the Blueprint into the scene, not the static mesh asset, to access the variable and have it affect my UVs/texture. Thanks for your assistance and sorry for the noobie question (this was my first experience with Blueprints).

Cheers,

Joel