Home Technical Talk

Edge padding for game characters

polycounter lvl 10
Offline / Send Message
Kot_Leopold polycounter lvl 10
Hey fellas,

I was wondering about edge padding distance in Xnormal. If I am doing a 2k map, I heard it is recommended to keep the number at about 16. The issue is UV islands bleed onto each other pretty bad even at the distance of 8 and the normal map looks messy when using that number.

Most normal maps I've seen here on polycount and elsewhere look very clean as if edge padding wasn't used at all or set to a very low value (e.g. 2)

Do I need to care about edge padding distance at all? How do others get their normals looking nice and clean anyway?

Replies

  • Dylan Brady
    Options
    Offline / Send Message
    Dylan Brady polycounter lvl 9
    I don't bake out any edge padding since the map is going to change during the process of texturing. Once I'm done with the texture i use the dialate filter that xnormal installs in PS and when I do that I just fill up any remaining space in between the islands cause why the fuck not?
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    You edge pad so when your textures get mipmapped, you don't get colours bleeding in at the borders due to the interpolation.

    So depending on the resolution of your base texture, and how it's going to be mipped, you can decide your padding size.

    As an example, going from 2048->1024 you will be interpolating 4 pixels, so you'd need a 5pixel padding atleast to ensure colour integrity at the border.

    You can also try and alleviate the problem somewhat by choosing a neutral colour for your texture base between the islands. Black leaking in on skin texture is gonna be dead obvious, but if you have a softer clout closer to your actual texture, if you get bleeding, you might be able to get away with it entirely.

    If your islands are too tightly packed, you can't really so much. If you combine all your layers in ps before doing dilation as above poster mentioned, you won't get the overlapping of the padding, but you will still be limited by the amount of padding you get in areas where too islands are close to eachorher.
  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    There can't be too much edge-padding, as Dylan Brady said, just take you're finished texture, use your UV shells as a mask, and dilate outwards as much as you can, that's really the best practice.
    Of course you need to have left enough space between your UV shells when unwrapping, or you'll have problems either way.
  • Kot_Leopold
    Options
    Offline / Send Message
    Kot_Leopold polycounter lvl 10
    I don't bake out any edge padding since the map is going to change during the process of texturing.
    You mean the normal map, right? How exactly does it change during texturing? Reason for asking is because I'm new to all this.
    If your islands are too tightly packed, you can't really so much. If you combine all your layers in ps before doing dilation as above poster mentioned, you won't get the overlapping of the padding, but you will still be limited by the amount of padding you get in areas where too islands are close to eachorher.
    So in other words doing dilation in PS filter is no different from doing edge padding in Xnormal? Then the questions is why bother with dilating in PS since the normal map won't change? Well, at least I don't see a good reason why it would.
    Bal wrote: »
    Of course you need to have left enough space between your UV shells when unwrapping, or you'll have problems either way.
    This is the problem I am running into:

    uvmap_distance.jpg

    Is it due to not having enough space between those uv shells?
  • Dylan Brady
    Options
    Offline / Send Message
    Dylan Brady polycounter lvl 9
    Yeah kot I think that might be hapenening cause its doing edge padding at render time, but Im not sure. When using dialation it will automatically stop padding once it hits another border.

    And I was mostly talking about baking vertex colors for the diffuse with my comment. But you could have detail normal overlays or something.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    is that overlapping island a separate normalmap you are combining in photoshop?

    It shouldnt be overlapping like that if both those islands are being baked in one go in Xnormal.

    The dilation filter is useful to have in photoshop if you are going to change the normalmap in any way.
  • Kot_Leopold
    Options
    Offline / Send Message
    Kot_Leopold polycounter lvl 10
    Yeah kot I think that might be hapenening cause its doing edge padding at render time, but Im not sure. When using dialation it will automatically stop padding once it hits another border.
    Xnormal does add edge padding near the end of render. Guess I'll be baking with no padding and using PS filter from now on to avoid such issues in the future.
    is that overlapping island a separate normalmap you are combining in photoshop?

    It shouldnt be overlapping like that if both those islands are being baked in one go in Xnormal.

    The dilation filter is useful to have in photoshop if you are going to change the normalmap in any way.
    I do change and combine my normal maps in PS but no, the ones you see were both rendered in one go in xnormal. When xnormal adds edge padding, it overlaps them together meaning they don't stop where they meet but go pass each others' borders. Which in turn can create black spots on the mesh like I had.

    I found that rendering that piece of cloth separately (left UV island) - solves the problem.

    not_overlapping.jpg

    The UV island on the right still bleeds onto the cloth piece like it did prior but it's not on top of the cloth anymore which got rid of the black spot I had.

    Verdict: Do edge padding in Photoshop instead.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    thats weird. i havent had xnormal paddings break in to a neighboring uv island.

    but yeah if you do dilation in photoshop with your normalmap layers combined in to one, it wont overlap either.
Sign In or Register to comment.