Home Unreal Engine

Specular problem after lightbake

Hi all,

I keep having this issue:
SpecProblem.jpg

Top image is before lightbake and bottom is after. There are 2 different materials on this mesh with different unwraps, but even if I change it to 1 material the problem persists. If I planar map the entire mesh in 3dsmax the problem goes away, but I guess I should be able to move/rotate/scale uv's without UDK messing up the reflection/spec. Think I tried everything I could come up with, re-exporting the mesh and make make sure all the normals are fine. Change textures (if I apply a simple gray material the problem still occurs) so I really hope someone can help me out here.
In exchange I can send you a pic of Peris' favorite mug. It has dino's on it.

Replies

  • nfrrtycmplx
    Options
    Offline / Send Message
    nfrrtycmplx polycounter lvl 18
    hrmm.. I'd be happy to look into this for you if you want to provide the mesh

    I have a few ideas that would be easier to look at rather than type out all the possible problems...

    dons@envartist.com if you're interested in the assist
  • blankslatejoe
    Options
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    Hm.. are you exporting as .ase? Try .fbx, and when you import check 'explicit vertex normals' or something like that. UDK sometimes does funny things to vert normals.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    It looks like you have bad lightmap UVs. What channel are you using as the unwrap for the lightmaps? UDK does tend to use channel 1 as the default.
  • nfrrtycmplx
    Options
    Offline / Send Message
    nfrrtycmplx polycounter lvl 18
    UVW-Lighting.jpg

    this is what i came up with... basically to solve this you'll need to re-uvwmap your object and not rotate any of your UVW clusters unless you rotate the lightmap uvw coordinates to be oriented the same way. You'll still have some lighting artifacts from the bleeding of pixels...

    what happens is you create a break in the tangent when you do that because the vertex normal and the uvw normal are no longer oriented the same relative to the lightmap uvw coordinates...

    I'm pretty sure if you broke the uvw coordinates of the lightmap in the same way and oriented them in the same way, they would be fine as well.

    that probably doesn't sound right...

    anyhow, the image will explain it better than my typing...

    To solve problems like this, i generally try to find a case that works... then try to break it again. This gives me a lot of info about how to break it, then I can start messin around with it to get the thing to not break but give me the results i want...

    The image is a slide show of that process.

    Hope this helps brohammer
  • _Erik
    Options
    Offline / Send Message
    Hey guys, had a chat with a friend of mine about this and he told me the following: UDK uses the unwrap to calculate it's specular, so if you start rotating and flipping parts of the uv's it goes nuts. This basiclay happens to all your meshes, but most of the time you don't see it because you're not using a real time reflection (mirror). The way to work around is quite simple though. Swap UV 0 and UV 1 in your modelling package. Specularity is based on the info in UV 0. Since your lightmap unwrap (UV 1) is in fact the data you want( because it's planar mapped and doesn't have rotated parts) you use that on UV 0. Your diffuse unwrap goes to UV 1. In your shader you set up that your diffuse makes use of UV1 with a texcoord node and there you go. Problem fixed.
  • blankslatejoe
    Options
    Offline / Send Message
    blankslatejoe polycounter lvl 18
    Wow..a bunch of pieces just fell into place in my mind! Thanks Erik and Nfrrty
Sign In or Register to comment.