Home Technical Talk

Can not get the right padding

Hi I've got some problems trying to pack the UVs for a lightmap.

When I try to pack with textools, the pack tool of max, and even with unwrella, I can't get the right padding.

The resolution is 2048x2048 and the padding I'm using 16, which means that between UV shells I should have a distance of 32 more or less, isn't it?

But when I check this in photoshop I see a distance of 10, 16, 20, but not 32..

Anyone knows what am I doing wrong?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I think 16 means the total width between the shells. And around 16 between shells should be more than enough for a 2048. It's not really an exact science anyhow. Test and see in your target hardware. Different games will filter the textures differently, so you may never see any problems.
  • styx
    Options
    Offline / Send Message
    Thank you Eric, it make sense to me what you say because moreover it would be a ton of wasted space with a distance of 32.
    But I'm quite confused because in textools for instance if I bake a blockout map using the same padding of 16, what I see then in photoshop is a distance of 32. But if I pack it's different result.


    Besides is not different what you say here than in the wiki?:


    "Minimum Padding

    Here are suggested amounts of edge padding to use for different size textures:
    • 128 = 2px
    • 256 = 2px
    • 512 = 4px
    • 1024 = 8px
    • 2048 = 16px
    It works best when the UV gutters are at least twice this width, and the padding is extended to fill all empty areas (or the empties are flood-filled with a similar background color).

    Note: These guidelines apply differently depending on the engine, filtering type, and mip map mode. With UDK for example you can create UVs with minimal shell distances because it uses anisotropic filtering. A 2048 texture would need a 4- to 8-pixel gutter instead of a 16-pixel one.


    Visual Packing Guide

    If you want a visual guide when creating your UVs, one easy way to see the spacing is to use a checker as the background image in your UV editor, with each checker square set to the padding width.
    For example to get a 4-pixel-wide checker on a 512x512 image, tile the checker image 64 times... if you calculate that the checker image has 2 checker squares across it, then the checkers bitmap should be 8 pixels across for a 512 image, and 8 pixels goes 64 times into 512, so that means it needs to be tiled 64 times across your UV square. Remember though, that if your UV space isn't square, then the checker tiling needs to be adjusted. "



    Am I missing something?
  • Eric Chadwick
    Options
    Offline / Send Message
    Have you run some tests in your game level? Reduce the padding until you see seams, then revert to the previous distance.
  • styx
    Options
    Offline / Send Message
    The thing is that I can not do too many tests as they are renders with GI and each one takes hours.
    I'm doing it entirely in 3ds max, it's for a test, supposedly I must do it following the standards.
  • Eric Chadwick
    Options
    Offline / Send Message
    Then the important thing is to look for seams in Max. If you don't see seams, then use less padding.

    Also, set up your test renders to go at low quality, so they go fast. This way you can tweak without going insane (and you can get it done in a reasonable amount of time). Only turn it up to high quality after you've verified all your settings with test renders.
  • styx
    Options
    Offline / Send Message
    Yeah thanks for the advice, I already was doing renders at low settings for the GI and lights as well, but even that takes hours in my old computer.
    Finally I've put one big area light for the tests so it can be faster in renders at the final resoution of 2048. No seams, that distance of 16 is indeed enough.
Sign In or Register to comment.