Download

Questions related to texel density, tiling textures, and uv maps for my modular buildings

Hello,

On my course to standardize a workflow for all of my future work, I’ve made it to the texturing side of things. I’ve just begun to start modeling wall/doorway meshes to replace my BSP brushes that I used to block out with, and immediately had to deal with the texture scale on my object vs the BSPs. The BSP brushes seem to automatically scale its UVs based off the size you make the brush, and sadly that’s not the case with custom meshes. I don’t understand anything so far such as what size the texture resolutions should be to match my walls, what texel density I should use – and more than anything, how to keep it perfectly consistent across multiple differently-sized objects that are meant to snap together.

The first wall I replaced, the scale of the texture I dropped onto it was too large. I’ve heard of the Texture Coordinate node, but I haven’t really gotten into researching it because I still don’t know where to start in terms of UV mapping for tiling objects. If I create a wall that is 500 in width and 300 in height, is my texture resolution going to be best set at 4096? I’ve seen 8 pixels per 1m or something, but that doesn’t make sense to me, because if I have walls large enough, I would consistently be throwing 4096x4096 textures all over the place and that doesn’t seem right to me for a modular piece that is meant to be tiled.

How do I choose a texel density? I can scale up my UVs and make it so that the texture tiles, but that seems like an awfully manual way to do things, and seems impossible to achieve the exact same scale if I make a different sized wall and have to re-UV map it to the same size as the old one. I’m using Maya, and am currently learning UV mapping, and this is one of the things that’s been stopping me from fully replacing the BSP brushes with meshes, because each mesh I make has different sizes (one wall can be 400x300, 100x300, etc) and I have no idea how to make sure that the UV map will allow correct tiling across every single modular piece that I make.

So for now, those are my main questions:

  • How do I choose a texel density, and how do I make sure that every asset I create thereafter will have the exact same setup, no matter what the size of the mesh? Do I have to constantly scale my modular pieces outside of the 0 to 1 UV space, and what if one sized wall’s texture UVs are just ever so slightly larger/smaller than that of another wall, will their textures blatantly not match up, or is there a way to prevent that?

  • When I get into creating textures for modular pieces, how do I choose the best texture resolution? Do I just make everything 4096x4096 and have it so that, through settings, you’re able to minimize/maximize the texture resolutions to suit your performance needs?

Thanks

Jeeze, I’m not sure I can help or understand your question but here goes.

Can’t you just unwrap all of your walls in Maya and stitch them together to uv map them? That’s the way I uv map in Modo and Blender. Say you have a box, unwrap each wall and stich them together so it’s an unfolded box. From what I understand only lightmaps need to be kept in the uv space.

Maybe this will help even though it’s for Blender it should apply. https://www.youtube.com/watch?v=f2-FfB9kRmE

ecb43f32adb6071d6caf463d375e45e657955d53.jpeg

It may have come out jumbled with all the questions I asked, so to clarify: My end goal is to create a bunch of walls of different sizes, and I want each wall to have seamless tiling going on with the textures. I made a wall, applied a planar map projection to it, and then put it in Unreal. When I place them side to side, and a material onto them both, it looks as if it is tiling, yet there’s a slight but very noticeable seam. It’s technically not tiling at all. I’m not sure if it would be feasible to stitch all the walls together I don’t think…

Maybe I’m going about it wrong. I modeled one house entirely out of BSP brushes, so I made the next step to replace the walls and floors with static meshes. Some walls are rather long (for example, the entire side exterior wall). Say that exterior wall is 800cm in width. I thought to make a 200cm, and a 400cm, so that I can just put the two 400cm together to make the actual length. The reason I thought that would be the way to go is so that for future buildings, I may want to have a different length, and if I made the wall strictly 800cm to suit that specific house, I’d need to make more walls to fit more specific houses.

From what I can see, when I placed two 400cm together to make up the length, there is a clear seam in between the two meshes (even on BSP brushes when two are side by side) because the material isn’t tiling, it’s just simply placing it on each mesh. If I make the 800cm wall and apply the material, its set up to evenly distribute the material across the surface – it doesn’t evenly distribute the material across 2 surfaces though. How do I get the texture to evenly distribute across two separate meshes that are meant to be connected together?

I guess I should add, for the seams, the texture actually matches up across the meshes, however, there’s a noticeable lighting change in the seam that you can see on most materials that are used on the wall. On three 200x200 cubes lined up, you can see the light seam (even with built lighting), but it’s not present on one 600x200 rectangle.

Can you post a few pictures of your walls and the material you’re mapping to it? I don’t think you’re going about this the right way but I could be wrong.

Are you familiar with uv mapping at all or is this your first go?

Well I could say I am familiar with UV mapping but then maybe that’s just not be true xD. I know how to attempt to map objects, but not things that are supposed to be tiled. A wall, with 10cm thickness, should be uvmapped the same way as that cube? Even if its supposed to be tiled?

*Well I tried to map the wall (it isn’t cube-shaped): this is the UV map and this is how it looks. If you look in the red rectangle and see carefully, there is a seam where the texture doesn’t exactly match up. It happened even when I UV mapped it so that the UVs stretched out to the border of the 0-to-1 space as well. I don’t know if the UV mapping doesn’t matter for tiled objects, or if I need to be setting up things like a Tex Coord or a World Space node, something I’ve read about too.

First thing is you need to have a seamless texture map (diffuse) as I can see in your image, I guess it’s brick, the texture itself isn’t seamless.

If I get you right you’re saying you want to make a kit of parts already uv’d so that you can design different houses? If that’s the case then you need a seamless texture for your walls then you should probably only join them together in a corner. So, make a 50, 100, 150, 200, 250, 300 etc. series of walls with one texture for each wall. Then if you’re of a hair when you uv them at least it will be in a corner and hopefully not noticeable.

I’m still not quite sure what you’re trying to do.

Seamless texture example:

stonework-051_d100.png

I’m using the materials in the starter content. I thought they were seamless, but now I guess they are only set up to be seamless across one object, and not multiple that are side by side. Basically, I want to model a set of various sized walls in Maya, and then put them into Unreal so that I can snap them together and build different houses as I wish. As it stands currently, when I do that, there are notable seams. I guess I’ll have to look into seamless texture creation if this is the case. And I also will just need help on the best approach to making modular pieces as a whole.

Since modeling it is easy, the texturing process is what I’m blocked at right now.

  • Do I need to model all the walls I plan to use and then line them up in Maya and UV map them all in a straight line consecutively to make sure each one is aligned?

  • Do I need to have my texture already loaded into Maya so I can actively place the UVs within the editor to make sure each piece lines up?

  • Will just using a checker/UV grid pattern and counting the grids, making sure each piece of the wall is lined up work?

  • Does it matter how much UV space each wall takes up across the UV grid if I want each piece to have the same texture density, or does it not matter in Maya and is instead handled within Unreal? And if it would be handled within Maya, how do I make sure they the density across the pieces are identical?

  1. It depends if you use different textures down the road the checker pattern is probably best but you’ll still have to scale things in Unreal.
  2. If Maya works like most 3D packages that would be best, stich all your walls together end to end.

I think you should go to YouTube and watch that video series I posted on uv mapping, it should help you understand better.

I’ll check some out and see what I can find. I didn’t know what to really look for at first because from what I see, UV mapping for tiling objects is much different than mapping out a single mesh. Thanks.

The principal is the same, you just need to make sure your textures are seamless and they align - however you want to do that.

Hi once again! So watching those blender videos unfortunately didn’t help me much because it didn’t necessarily talk about my exact issue. I’m already familiar with how to approach standalone objects, but making things like walls are different in terms of setting up. I couldn’t ever find any other material to try to learn from, so I ended up testing out the Architecture meshes provided in the starter content. I pieced a few of them together and applied the same texture to them all, and I found that the textures tiled perfectly across each piece that I had snapped together, even if they were different sizes, as long as they were lined up properly.

So I exported those meshes into Maya and checked the UV layout of each one, and I found out how it was set up. So those wall assets weren’t bound to the 0-1 UV space, they were each scaled within the UV editor to match their actual dimensions. For instance, if a wall was 3m tall, the UV Grid would be set to 3, and the wall UV would be scaled up to 3 meters tall and it’s matching meters in width. This makes it so that the 0-1 is tiling across an equal number of times, so any piece I clamp together will always be tiling.

I wasn’t able to properly UV map various sized walls by keeping them in the 0-1 space. If I had one wall 4 meters in width, and another 8 meters, and then put them both as squares in the 0-1, the texture would be fine one one and stretched on the other. Even if I used a Texture Coordinate, it would be too much trouble because changing the coords to scale differently on one wall would cause the other to also scale, making it so the walls would never be aligned. So I tested it out on my own meshes and it worked as well. Luckily I’ve also solved my problem with getting the texture density to sync up across each wall – since the UVs are using the exact dimensions of the wall, the texture density will always be even. With that said, it also leads me to my next question:

*Are there any drawbacks to using this method of scaling the UVs to match the wall’s/object’s exact dimension? Is it increasing something in a negative manner by having the UVs scaled in this manner? I haven’t had any success keeping the tiling consistent when mapping all sized walls within the 0-1 space.

3ds max UV mapping to get uniform texel density

Hey Ashern, I definitely understand you as I have the same problem! Its so frustrating and crazy (and impossible to be accurate) if we were supposed to scale each object in the scene to match the same texel density. HOWEVER I do have a workaround, which I know is not the best thing out there, but it might work for now until someone figure out something else. In the example below, I will use a simple cube, so that its easier for you to understand.

**1. I created a cube of 1x1x1cm. Then add an edit poly modifier. ** The units I set up for 3ds Max is cm.

1.jpg

2. Add a UVW Map modifier. Use the settings below, TICK real-world map size, and choose box. (because its a cube)

2.jpg

3. Add a Unwrap UVW modifier and then use flatten mapping. Use the settings below, UNTICK normalize clusters as it will resize the things and we dont want that, it is already at the correct scale set by the real-world map size at the UVW map modifier. I would untick rotate clusters as well, it might cause some clusters to be rotated very slightly and not perfectly horizontal/vertical.

3.jpg

Here we can see that the 0-1 space of the UVW mapping is equal to 1 unit (cm). Therefore, Now we have to know our textures and know how big is that supposed to be. For example, the texture below is a 1024x1024 texture of bluestone tiles I made and i know that the dimensions of each stone are 100x50cm, therefore that texture represents 2x2m in the real world. So now for this specific texture (or textures with the same scale), 1024x1024 is equal to 2x2m. The amount of pixels doesn’t affect the scaling at all. With this information, we can go into ue4 and try to test out texturing our models.

Bluestone_Tiles.jpg

4. Import your own mesh which you unwrapped using the technique above, into ue4, and create a new material. Create your material as follows, you can use my material above and use the same settings. We need to add the texture coordinate and plug it into the textures, so we can set the U/Vtiling. How do we get t to be 0.005? easy. If the texture is supposed to be 200x200cm like the bluestone tiles above, just get 1/200=0.005. That will be the value you put into the U/Vtiling.

6d68e665ffe24f340de057920e2ce60f3415ee20.jpeg

5. Assign the material to your mesh and rejoice. The example below is the result i get, the height of the wall is 3.3m, and the orange thing, I used a BSP box brush with the dimensions 50x100cm and positioned it there to show you that the texture is the same as the real-world dimensions.

5.jpg

**NOTE:**Don’t forget to align the clusters during UVW mapping so that the tiles grout will flow seamlessly from side to side or whatever else is needed to be aligned.

Hope this helps! :slight_smile: