Home Technical Talk

Lightmaps in UDK woes. Let me know where i'm going wrong.

So, I started a new modular street scene in UDK.
I began making my assets and well, getting the lightmaps to behave is doing my head in... I've followed tutorials and read up on them the best I can, I just don't know where i'm going wrong.

Here's a pretty awful example:
WLEyN6r.jpg

The lightmap UVs (on the second UV channel) in max:
http://i.imgur.com/YHFRrn4.jpg

Every edge is aligned to a 32x32 grid in max, and there's 2 pixel padding between each island...I heard 2 pixel padding was fine, although I've tried giving each island 4 padding which gave the same horrible result.

In UDK, the lightmap res is at 32 - I've tried using a higher res but to no avail. Oh and nothing is overlapping or inverted either.

Where the hell am I going wrong? Thanks guys, it's driving me mad.

Replies

  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Can you post your wireframe?
  • supaclueless
    Options
    Offline / Send Message
    supaclueless polycounter lvl 13
    this might sound incredibly dumb and I could be wrong but you could try production baking if u were not. If you used production bake WITH say 64 lightmap res and it STILL looks the same, make sure that the swarm agent is actually working on your computer, heard some people had issues where the swarm agent was not allowed to run due to microsoft.

    Another thing to note is that in lightmap UV's, its fine to connect any islands even though there might be a hard edge, just make sure that EVERY open edge has some padding, I noticed on the main wall piece that you have some open edges w/o any padding and that could also be causing this problem

    showing us wireframe of the mesh along with the UV would help in nailing the reason
  • edwardsomatic
    Options
    Offline / Send Message
    ZacD wrote: »
    Can you post your wireframe?

    Certainly: PfUME8m.jpg

    And cheers, for the suggestions supaclueless, although I've tried production lighting and upping the lightmap res, no luck.
    In regards to padding, it's even happening with simple 128x128 walls (albeit not so much), the window was just a particularly bad example, so I don't think that's the problem.
    Thanks again.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Your low poly and UVs could be a bit more optimized for light maps, I'll remake the mesh later tonight and try to get a good bake.
  • edwardsomatic
    Options
    Offline / Send Message
    ZacD wrote: »
    Your low poly and UVs could be a bit more optimized for light maps, I'll remake the mesh later tonight and try to get a good bake.

    That would be awesome! Thanks for the help man. :)

    Edit: So is the consensus that those lightmap UV's shouldn't be producing those results in UDK? The UV's aren't perfect but they should do the job?
  • supaclueless
    Options
    Offline / Send Message
    supaclueless polycounter lvl 13
    UDK lightmaps are not perfect. I personally am not able to completely remove lightmap seams for say a tiling way section unless you chose to build it as one giant piece and made a planar map, but than u cant modulate that piece and will probably need to bump up the resolution of the lightmap.

    You could UV such that the wall edges are not connected to the visible plane so that there will be no bleeding. ZacD will probably show you how its done when he makes the mesh if you don't get what i mean :D
  • edwardsomatic
    Options
    Offline / Send Message
    UDK lightmaps are not perfect. I personally am not able to completely remove lightmap seams for say a tiling way section unless you chose to build it as one giant piece and made a planar map, but than u cant modulate that piece and will probably need to bump up the resolution of the lightmap.

    You could UV such that the wall edges are not connected to the visible plane so that there will be no bleeding. ZacD will probably show you how its done when he makes the mesh if you don't get what i mean :D

    I think I get you, so like this:
    g07Fx1f.jpg

    which did produce a better result:
    http://i.imgur.com/ySO8ZTo.jpg

    Although as you can see with other stuff like the curb, lightmaps are still giving me headaches with the simplest meshes. The curb is literally 3 polys, and the pavement / road is just a plane, yet issues still occur... all edges snap to pixel edges etc. Arghhhh.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    hHiRv0w.png

    QFsDfwZ.png



    If I'm not going to be using a unique normal map for a mesh, but instead will have tiling textures, I like to put hard edges on any hard angle, it may make the light require higher resolutions to look good, but it ends up looking clean.

    Also I like to see how shadows look to tell how the light map resolution is holding up.
  • edwardsomatic
    Options
    Offline / Send Message
    ZacD wrote: »

    If I'm not going to be using a unique normal map for a mesh, but instead will have tiling textures, I like to put hard edges on any hard angle, it may make the light require higher resolutions to look good, but it ends up looking clean.

    Also I like to see how shadows look to tell how the light map resolution is holding up.

    Damn dude that looks so much better than mine, looks really clean. I'll certainly give splitting the UV islands up a go like you did... i'll report back with the results. Thanks a bunch for your help.

    I'll be honest though, if this doesn't work i'm transitioning to Cryengine haha, it doesn't look like it has as nearly as much trouble with lighting compared to UDK.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    To be fair, the mesh you came up with has a lot of sharp angles and requires a bit of work getting a decent light map for it.

    Also here's a less aggressive lightmap that gets more resolution in the important areas.

    jcbKoWG.png
  • edwardsomatic
    Options
    Offline / Send Message
    ZacD wrote: »
    To be fair, the mesh you came up with has a lot of sharp angles and requires a bit of work getting a decent light map for it.

    Really appreciate all your help but i'm having no luck, same thing is happening by almost straight up copying your lightmap uv's.

    Screw it, i'm gonna learn Cryengine and give that a shot, looks prettier anyway ha.
  • kurt_hectic
    Options
    Offline / Send Message
    kurt_hectic polycounter lvl 10
    1) turn off checker in uv editor ;O it's painful to look at it
    2)If frames and glass of windows are welded weld it in UV editor. Generally: weld as much as you can. (that's how you reduce area for padding + it gives better results)
    3)render lightmaps with 'production' quality
    4)IMO your last result is very good. It's huge a mesh and it need some resolution! 128pix is really small texture. If you want to be really sure that's the best possible result just find this lightmap, export it as a file texture, assign it in 3d software and look for some errors. IMO 64 pix is just too small to give better results.
  • repete
    Options
    Offline / Send Message
    repete polycounter lvl 6
    Really appreciate all your help but i'm having no luck, same thing is happening by almost straight up copying your lightmap uv's.

    Screw it, i'm gonna learn Cryengine and give that a shot, looks prettier anyway ha.


    Yes give up and start with a new engine, that's probably the best option :poly122:

    I am not a fan of UDK light maps (I hate them) but to move to another engine over a problem like this means you will eventually run out of game engine options. Work on it and solve the problem even if it is infuriating.

    [ame="http://www.youtube.com/watch?v=FwUFTh1lAhA"]UDK: Lightmap UV Layout Techniques & How to Create Second UV Channel in Maya Part 2/4 [Tutorial #19] - YouTube[/ame]
Sign In or Register to comment.