Download

How to create a blueprint that prevents texture stretching on meshes

Hi, I have been wondering how to create a texture from stretching on meshes, i know its possible, I seen it in UDK and I also seen this on UE4: How can I prevent texture stretching while scaling a mesh? - UE4 AnswerHub

I was wondering if first of all the method to do so is simple, I have very very very little knowledge of blueprint, although i plan to change that soon, but I am working on a serious commercial project and right now I have 6316 meshes in my world, one thats not even done yet, and if i can figure this out, I can reduce that number to less than half. Would it be possible for anyone to show me how its made and tell me what I have to do?

Those answerhub examples are not from blueprint editor but from material node (shader) editor. If you have meshes that are mostly parallel to one of 0-x 0-y or 0-z surfaces you can use world coordinate mapping in MATERIAL EDITOR. That is great for roads. or walls (if they are along N-S or W-E directions)

You can also pack more than single texture on meshes (use masks, or vertex color or separate materials on meshes). So while one material on mesh is UV mapped (skin) another may use world coordinates. Or for box like shape you can use 3 materials (1 for up down, 1 for N-S and 1 for E-W directions). Really combinations are limitless.

If you make pictures of some set of meshes that you want to replace with one, I may be able to give you better advice.

Hmm, ok well here is a screenshot of a wall, it’s the same all around my map, not sure if thats what you wanted.

Yup this one example begs for vertex painted material: vertex paint tutorial
There are some examples of materials at bottom of page.

This is a bit outdated (but creating meshes in 3d max part is still valid):
http://www.hourences.com/tutorials-ue3-modeling-1/
http://www.hourences.com/tutorials-ue3-modeling-2-advanced/

You need to create material that does not repeat (tile) texture so hard. Then you need to improve it for vertex painting blend of 2 or more materials. Then happily vertex paint your walls.

As for hiding tiles of material, easiest way is to create tileable material than add some color variation with some noise masks. Easy way for tileable textures is Alleghoritmic and their procedural texturing suite, you can elso get nice textures from gametextures.com, there is also filterforge (but this one is rather poor choice for creating game textures).

Ps. I am moving this topic, now that i am sure you do not need blueprints for it.

PPs. if you can post more pictures and describe problems you have with them i am sure people here will happily help.

hmm, well the assets i’m using are pre made, I dont know how to model or texture so I kind of wanted a solution that didnt involve me doing either of those things. What i want to do is just stretch a model and have the texture not stretch with it. I created a simple wall texture, not very good, but it works, it’s 2048 x 2048, I believe the textures that came with the assets were 16x16 and tiled. Also im not really understanding how vertex painting will be useful in this situation, if you could please explain a little more.

Here is the picture, also while im at it, how do i make my walls and stuff not be lit like that? it looks terrible. I re built all lighting but that didnt help at all.

Please help

Hello mate! Here are a couple of posts for you!

https://answers.unrealengine.com/questions/62856/static-lights-on-wall-not-appearing-smooth.html

Perhaps something like this is what you’re looking for:
https://youtube.com/watch?v=YcoHWSxFEko
Skip to 4:30 for the final effect.

This uses the “WorldAlignedTexture” node in the material.

dbInteractive, thank you that was exactly what i was looking for. Is there any downside to using this method? It seems like my lighting takes waaaaaaayy longer to build. and EliasWick, thank you i will take a look at that.

I tried that lighting thing, and it didnt work. The problem is that I can see all the other meshes, as you can see in the picture they are all lit differently.

Is there a way for static meshes to block lighting without making them or the textures double sided? Those options dont seem to do anything at all. The only solution i can think of for fixing this is to encase the level in a BSP brush and delete the inside faces so you can see out but leave the outside faces so they block the light, but i was wondering if there was a better way.