Download

How to set the texture scale on imported objects?

Bit flummoxed by this - I’ve got a wall mesh that I’ve created in blender, and imported to UE. It’s the same dimensions as the sample wall meshes that come with the editor BUT when I apply a material to it, the material scale is very very different than it is on the ‘native’ meshes that are included in Unreal. My mesh is UV unwrapped and seems to be valid in all the ways I can tell. What/how controls how ‘big’ the textures pace on my mesh is?

Unless you adjust the scaling of the textures in the material the texture will cover the 0,0 to 1,1 uv space.

So for static meshes that is supposed to use tiling textures I would normally scale the UVs so they go outside this space and make sure everything will be aligned properly before exporting the mesh. Then if I need some texture to be unique (i.e mask or nomrals etc) I try to make it reuse the second UV set also used for lightmaps (Not always the best solution though). Might be possible to use more than 2 UV channels to, haven’t needed it yet though.

The other way to go about it is to scale the UV coords in the material, with the downside that the material will be uniquely scaled for the specific mesh.

Edit: Just to add some more on how I handle the tiling textures. I have set a target texel density of 1024px per meter. All the tiling materials assumes the UVs to be setup such that the UV coordinates are in meters. This way It easy to make sure I scale the UVs of any mesh correctly so that any tiling materials will work on it. I think this also lines up with the default UVs on BSPs but not sure, I think I’ll need to check that. Now of course you can still break this rule when needed but you know what the effect of it will be as it will be consistent on all meshes.

Thanks for this, just solved a issue I’ve had for a while :slight_smile:

This is the same as the default BSPs; I am currently putting together an arch-viz scene and wanted to use their pre-existing models so I had to check them :slight_smile:

Hi

I do have a question… Making your tiling textures with correct sizes is a piece of cake, but… once you have different sized large environment pieces, what is your workflow to keep the UVs across the objects within the same scale?

Let’s say I have an apartment. I do need to texture different walls, let’s say 3,3m wall and 5,6m wall with the same scale of my tiling material. Modular pieces are not an option as doors and windows are placed irregullary.

Do you have any tips that could make managing all this scales a bit less of a pain? All I can think off at this point is manually controlling the UV scaling with a help of a 1m reference object, and then adjusting the material tiling according to the scale of the UV when needed. Not a real problem with a few walls, but if you start using the same tiling textures on more and more different kinds of objects making UVs and managing scale for them will be a pain. So does anyone know any good painkillers? :slight_smile:

You can use world space coordinates for a texture, so that it will be scaled based off the world rather than the object.