Home Technical Talk

UV unwrapping issue with Blender-xNormal workflow

Hi, I have built a high poly and a low poly model in Blender, which I need to add to xNormal to bake the normal map textures. For my low poly model, I use a brick texture and hence I need it to flow continuously. As a result of this, some of the unwrapped faces lie outside the default 0,1 space. I wasn't aware that this would be a problem when baking the textures in xNormal. Many of the meshes that I'm using are kind of huge semi circular walls and hence I end up having to use more space for unwrapping. Is there any way to get around this issue in xNormal? Even a different method or software is fine by me.

Replies

  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    What do your high-poly and low-poly meshes look like? If you have a high-poly mesh that corresponds to your tilable texture, and if your tilable texture is planar enough, you could just bake the normals for that part of the high-poly mesh to a plane that's UV-mapped to that part of UV space. Or, just duplicate and separate one part of the low-poly mesh that is giving you trouble, which has its UVs entirely in 0..1 space, and bake that separately. Then you can use an image editor to put the one normal map on top of the other and use your ordinary tiling UVs for the final texturing. Clear as mud ay?
  • spiderspy
    UV Coordinates are more like a percentage(0,1) 0 - 100% of any texture size.

    This means that the size of your models unwrap should not be taking up more visible space in the unwrap editor but in the actual texture you will be baking later on.

    1. The size of your model does not matter in UV space.
    2. You should always use up as much space as possible in the UV space, thus utilizing more of your actual texture.
    3. If you are making a big object and need more resolution simply create a larger texture with more resolution.

    I hope this was helpful :)

    Edit: The easiest quick fix for this is to press ctrl+P to pack all the UV "meshes" into the UV texture Coordinates properly and optimized usage of space.
  • Stormrage256
    What do your high-poly and low-poly meshes look like? If you have a high-poly mesh that corresponds to your tilable texture, and if your tilable texture is planar enough, you could just bake the normals for that part of the high-poly mesh to a plane that's UV-mapped to that part of UV space. Or, just duplicate and separate one part of the low-poly mesh that is giving you trouble, which has its UVs entirely in 0..1 space, and bake that separately. Then you can use an image editor to put the one normal map on top of the other and use your ordinary tiling UVs for the final texturing. Clear as mud ay?

    This is what my high poly mesh looks like.

    abc.jpg


    My tileable texture is also shown below in UV image editor. The problem is I need to align them properly so that the bricks flow smoothly from the front face to the side face in a way similar to what you see in the model. I've already managed to that in the low poly model. I'm not sure if I got what you said completely, I'm just starting out with baking textures. Did you mean that I should do multiple bakes by shifting the UVs so that I can get the whole normal map in multiple textures?
    But in any case, if I put bake two separate normal maps and put one on top of each other, won't that destroy the details of the normal map that lies below?
  • Stormrage256
    spiderspy wrote: »
    UV Coordinates are more like a percentage(0,1) 0 - 100% of any texture size.

    This means that the size of your models unwrap should not be taking up more visible space in the unwrap editor but in the actual texture you will be baking later on.

    1. The size of your model does not matter in UV space.
    2. You should always use up as much space as possible in the UV space, thus utilizing more of your actual texture.
    3. If you are making a big object and need more resolution simply create a larger texture with more resolution.

    I hope this was helpful :)

    Edit: The easiest quick fix for this is to press ctrl+P to pack all the UV "meshes" into the UV texture Coordinates properly and optimized usage of space.

    Thanks for your suggestion, I'm gonna try increasing the texture size by combining it side by side. But the problem with that is that I'll have to go to 4096 x 2048 range at least in order to accommodate my larger models. I will have to probably reduce the texture size and lose some detail when I use it in the game as 4096 is not a feasible resolution. The size of the model shouldn't matter normally, but since I'm using these models for different segments of the wall, I need to have them all maintain the same brick size throughout for consistency. So I cannot use seams and have separate islands. I'll have to unwrap along a straight segment, and as a result part of the model tends to unwrap outside the default 0,1 space.
  • Stormrage256
    Also just in case I have to go with a high resolution texture as stated in the previous comment, it would take up a few MBs just for this particular normal map. At the same time, my static mesh costs only around a few hundred KBs at the most. So in this situation, which would be more taxing on the system? Using a high resolution texture for each model, or increasing the detail on the static mesh in Blender before importing it to UDK? I already have another normal map that matches the UV Layout I've done for my low poly model. This additional normal map is mainly to eliminate the sharp edges of my low poly model. This is actually my first project, so I'm not completely aware of the best practices in the industry. So it would be really helpful if someone could clear this up for me. Thanks :)
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    Well... as I see it there are a couple of alternatives that could get you where you want.

    Option 1 is probably the easiest and makes the most sense. You could just bevel all the edges out and fix your normals that way, and then use the tilable normal map that you generate from the height-map you painted from your tilable texture on your regular UV set to get normal details. With something that looks like it uses so few triangles in the low-poly model already, this is probably the way to go as it doesn't use more texture memory.

    Option 2 is what you seem to want to do. In this case, you would have to lay out another UV set that's all in 0..1 space and bake a normal map against that. If you also use a detail normal map from the tilable height-map you painted from your diffuse texture, you could use both normal maps within the UDK material editor, mapping the detail normal using your tiling UV set and mapping the baked normal map using your baking UV set. But I personally think Option 1 would be easier.
  • Stormrage256
    Well... as I see it there are a couple of alternatives that could get you where you want.

    Option 1 is probably the easiest and makes the most sense. You could just bevel all the edges out and fix your normals that way, and then use the tilable normal map that you generate from the height-map you painted from your tilable texture on your regular UV set to get normal details. With something that looks like it uses so few triangles in the low-poly model already, this is probably the way to go as it doesn't use more texture memory.

    Option 2 is what you seem to want to do. In this case, you would have to lay out another UV set that's all in 0..1 space and bake a normal map against that. If you also use a detail normal map from the tilable height-map you painted from your diffuse texture, you could use both normal maps within the UDK material editor, mapping the detail normal using your tiling UV set and mapping the baked normal map using your baking UV set. But I personally think Option 1 would be easier.


    Thanks, I thought of going the option 2 route because that's what I saw everyone doing in the videos. Atleast for the parts of my model that were baked in xNormal, I didn't notice such a huge increase in the quality of the model when I added that normal map in UDK. As you have also pointed out, I'm already using another normal map texture based on the diffuse map. I made that by baking my original diffuse texture on a plane. So except for the edges, it's working pretty ok as it matches my UV layout. Also since I don't plan to use tessellation, there can never be an actual increase in depth of my model.

    Now since that route is not viable, I would have to take option 1. So in that case, even if I bump up the polys on my model to make the edges smoother, it takes up less memory than an additional normal map texture. So would you recommend subdividing the polys a few more times if I can keep the mesh memory below an additional normal texture map size?
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    If I were you I would make your model look like this. Anything more is probably pretty unnecessary, but you could hypothetically add some geometry to break up the silhouette. It depends on what you're rendering in.

    834aWhG.png
  • Stormrage256
    If I were you I would make your model look like this. Anything more is probably pretty unnecessary, but you could hypothetically add some geometry to break up the silhouette. It depends on what you're rendering in.

    834aWhG.png

    I did the same thing you mentioned in your previous post. I beveled the edges by a small amount and applied smooth shading. I'm rendering it in UDK. It's for a Helm's Deep map that I'm working on. And instead of baking, I'm thinking of using some decals and vertex painting so that I can hide some details from the sharp edges that way. If that doesn't work I'll add a few more polys. Right now I'm proceeding with a beveled low poly model.
  • JedTheKrampus
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    OK, good luck!
Sign In or Register to comment.