Home Unreal Engine

Lightmap (Patchy/Bleeding)

polycounter lvl 5
Offline / Send Message
Yuke polycounter lvl 5
Hi all!

I've started a new project where I'm creating a street scene inside UDK, I've never done an environment before and also never really used Lightmass.

So I read up on the layout of the UVs, looking at the 3DMotive Tuts and such but I'm still confused when it comes to the padding of the UVs (1px, 2px, 4px?) and why I'm still getting bad shadows and obvious bleeding.

Here's an example of the first UV Sheet I used and the errors inside UDK:

30s9f8m.jpg

2zt8uxe.jpg


I then tried to add more padding in order to stop the bleeding but got just as bad results:

2mmea6h.jpg

jjsjnk.jpg


I'm quite confused as I've looked at various different assets from inside UDK and even on the UDK site where they talk about Lightmaps and their UVs seem to be much more tightly packed and receive much much better results.

I'd really appreciate any feedback on this because it's been driving me mad for a couple of days now, I seem to even be getting errors with some even more basic shapes. Thanks :)

Replies

  • alifarsangi
    Options
    Offline / Send Message
    alifarsangi polycounter lvl 9
    from what i can see, u have too many uv islands on ur lightmap channel which cuase some unexpexted result ! perhaps reducing uv islands can help to fix the problem.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Yuke wrote: »

    I'm quite confused as I've looked at various different assets from inside UDK and even on the UDK site where they talk about Lightmaps and their UVs seem to be much more tightly packed and receive much much better results.


    It's your modeling that's wrong. Not your unwrapping.

    As it says on UDN it's better to model your meshes as a contiguous mesh with no open edges so you can lightmap them with fewer UV islands and not have to worry about bleeding. You should be able to model your window so it's a single UV island.

    http://udn.epicgames.com/Three/LightMapUnwrapping.html
  • Yuke
    Options
    Offline / Send Message
    Yuke polycounter lvl 5
    The window is a contiguous mesh, it's all 1 element, started as a plane with cuts and extruded.

    I think you're right though and I've been going about this the wrong way, I should be able to unwrap the window into a flat single island, I'll try it now and post the results, thanks :)
  • JonathanLambert
    Options
    Offline / Send Message
    JonathanLambert polycounter lvl 6
    Remeber to stretch your uvs to cover as much uv space as possible, a bit of distortion on your light map uvs is ok.
  • Yuke
    Options
    Offline / Send Message
    Yuke polycounter lvl 5
    Sorry I've been at work, but I had a quick play with the UVs to see if I could get it closer to that which is used on the majority of the static wall meshes in UDK (from what I can tell)

    This is what I came away with, can anyone see any immediate problems?:

    2visavq.jpg

    2zfmj41.jpg


    It's still on perfect but seems to be better, I'm guessing if I work on the unwrap a bit more and space out the sections a bit better I will come away with a better look in UDK, thanks for the help :)
  • WarrenM
    Options
    Offline / Send Message
    Try creating a checker board texture at the same res as the lightmap you want to use. Load that into the UV window and line up the islands so they fit nicely inside the texels. You'll get better results that way since you can see exactly where lighting information will be coming from.
  • Yuke
    Options
    Offline / Send Message
    Yuke polycounter lvl 5
    I set the grid spacing to 0.0078125 ( 1/128 ) in 3ds Max and then turned on vertex snapping to align the island a bit better, I snapped each vertex to a grid point and it's given ever so slightly better results in UDK.

    Am I right in making the grid spacing that size, as in UDK 2px is removed to create a buffer for the bleeding around the edges?

    2upqn0w.jpg

    25a3st0.jpg
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Yuke wrote: »
    Am I right in making the grid spacing that size, as in UDK 2px is removed to create a buffer for the bleeding around the edges?

    don't allow space around the edges for bleeding. UDK adds padding to the edges so any extra space you add is just wasted pixels.
Sign In or Register to comment.