Home Technical Talk

Serious lighting issue in UDK (lightmaps)

Ok so I'm just going to start by saying that I do not have a good understanding of lighting or displaying my work in UDK. I have modelled and UV'ed the major assets of my scene (I use maya), and created a very quick and dirty light map for the asset you see here which is the first one I am addressing the major lighting issues with. The only light in this scene right now is a point light.

OuXxLAg.jpg

Here is my UV unwrap, as you can see there are several repeated/duplicated elements of this asset that share the same UV islands, so they are overlapped for the sake of efficient texturing.

gtn9hi6.jpg

The light map on the other hand, I understand must isolate each island as to allow its own individual lighting. This layout and distribution here is a result of copying my initial UV set for the texture maps into a new one, and then using Maya's UV editor "select faces to be moved into UV space" button.

JL8YU6j.jpg

I am assuming the state of my light map has something to do with the way this asset is being lit in UDK... which looks like TOTAL shit. The face normals of this asset are facing the proper directions, smoothing groups are done, there are no mesh errors, and everything has been modelled and UV'ed in a clean manner. The pod is comprised of several seperate mesh elements that are combined into one mesh, before export as .FBX for UDK.

lY0LaVu.jpg

Any help here would be appreciated...

Replies

  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    Baked lightmap shadows don't look good on their own. Once you have a diffuse on there, the lightmaps lack of resolution isn't so apparent.

    With that said, your lightmap UV's islands need to have a TON of padding in between them, or else you get shadowbleed and nastiness.

    uvs_padding.jpg
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    you need more padding between UV shells in your 2nd uvset, also when creating your UV map, use snap to pixels, that way you dont get UV edges going halfway between a pixel, which can be a big problem with low res lightmaps
  • Artaekos_inactive
    Ok thanks, that's a start. So is there a quick and efficient way of doing this in Maya where the lightmap islands can be automatically arranged a reasonable distance from eachother while snapped, or is it a manual process?
  • repete
    Offline / Send Message
    repete polycounter lvl 6
    You need to match the UDK light map resolution to the UV grid in your 3D app and make sure you have at least 2 pixels padding around your UV islands.
    So in your case: 1 ÷ 256 (light map res) = 0.00390625 (grid lines every: 0.00390625 units)

    Personally I will be happy when lightmaps disappear off the face of the earth :thumbup:

    [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]
  • Artaekos_inactive
    Ok repete, well that's exactly what I have done now and it still looks like shit in UDK... so I'm right there with you when you say you'll be happy when lightmaps disappear off the face of the earth.
  • Artaekos_inactive
    New lightmap, minimum 3 pixel spacing between all islands. All straight edged/right angled islands snapped to grid.

    4kz1OXs.jpg

    Now, just look at that new and improved goodness! Mmmmm!

    o1bYq0E.jpg

    And the best part is I upped the lightmap resolution to 1024 before building all this time!
  • ZacD
    Offline / Send Message
    ZacD ngon master
    Can you post your obj file, I'd like to try some things with the UVs.
  • Jet_Pilot
    Offline / Send Message
    Jet_Pilot polycounter lvl 10
    Can you go with just straight dynamic lighting?
  • repete
    Offline / Send Message
    repete polycounter lvl 6
    Your new lightmap looks spot on and 1024 is not necessary, 256 should be more than enough. This means there is another problem:

    Goto world properties/lightmass and uncheck UseAmbientOcclusion and see if there is a change.

    I am with you bro on UDK's light maps :poly127: and your last light map looks good imo so I think something (what) is messing with your scene. Would do no harm to post your obj with uvs as ZacD has suggested as I would like take a look at this myself.
  • Artaekos_inactive
    Hey, so I thought of a crazy and seemingly irrelevant idea as one last attempt to resolve the issue earlier today, and I got noticeable results. It was two things I did though, and I'm not sure which one improved it.

    When I UV'd the asset, I used Headus UV Layout, so when I exported the UV'd .OBJ back into Maya, I didn't use the new one because it eliminates your soft/hard edge display. Therefore, I used transfer attributes to send the new UV's to my original mesh I had exported for UV Layout. My suspicion is that because I didn't turn color sets off when I did this, that perhaps somehow it had an effect on my FBX exports to UDK...

    So what I did this time was I exported my mesh that I had transferred the UVs to back out of Maya an an .OBJ, and then imported them back then, which in the process might have eliminated any extra unnecessary information from the mesh. It also got rid of my light maps though, so I had to resend those from my old mesh back to the new one, this time with color sets off.

    I also exported using FBX 2013 this time, rather than 2014, which our version of UDK in the college labs doesn't support apparently. Anyways, doing these two things while also using a 1024 resolution light map made for an 85% improvement over how it was displaying before... really weird.

    I'm reading what you guys have said after my last post, and will take them into account and try out a few more things.
  • Artaekos_inactive
    Also, what is the best way to post an .OBJ?
  • ZacD
    Offline / Send Message
    ZacD ngon master
    Dropbox or Google drive work well.
  • Artaekos_inactive
    I messaged you guys the .OBJ
  • repete
    Offline / Send Message
    repete polycounter lvl 6
    Hi Artaekos

    I honestly do not see a problem with that obj you sent (apart from an overlapping uvs complaint from UDK)

    I exported your file from modo to FBX 2006.11 and converted it to FBX2013. The light map res is 256 and this is my result:

    1_zps9f5ea033.png

    3_zps265b4bff.png


    2_zps4c4ad1c1.png


    I would be happy with this and as Quack! said once the diffuse is on there it looks a lot better :) Drop the lightmap res down to 64 with a diffuse on and you will see what I mean.

    Good luck
  • repete
    Offline / Send Message
    repete polycounter lvl 6
    PS don't forget your smoothing group before you export, I had it set in modo at 60 degrees.
Sign In or Register to comment.