Home Technical Talk

I'm having some UDK shader issues

polycounter lvl 7
Offline / Send Message
JFinn_UK polycounter lvl 7
Okay so I am a noob when it comes to the UDK to be honest. And I've been having some trouble with shaders in general for a while now, they always look dodgy. This simple brick wall I created shows my problem, basically I get this darkness creeping in, the back face away from the light is just black too.

udkproblem.jpg
[I just placed it in the sandstorm level and rebuilt the lighting for it]

What might be causing this? Any help is greatly appreciated.

Replies

  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    did you build lighting using lightmass? what kind of UVs does it have for the lightmap?
  • McGreed
    Offline / Send Message
    McGreed polycounter lvl 15
    Yeah that look like a typical pr vertex shadow mapping. Remember to have unique UVs for lightmapping, no overlapping UVs. And just to make sure, you have tried testing the shader without the multiply?
  • r0xmys0x
    Offline / Send Message
    r0xmys0x polycounter lvl 10
    You have multiplied your normal map with a number greater than 1 so you'll be pushing the values to the channels past the 0 - 1 range. Put a constant clamp between the multiply and the normal node.
  • bgoodsell
    On top of everything that was said, you also don't have a specular power in your material. Set that value to something greater than 1 to control the shine of the bricks (even though their color is little goofed at the moment).
  • JFinn_UK
    Offline / Send Message
    JFinn_UK polycounter lvl 7
    Hey thanks for all the replies. I have a separate UV channel which I am using for lightmass so its not that. Also I tried using a constant clamp, I tried not using the normal map, and only using the texture sample. Nothing I tried worked :( I did get some weird shadowing when I didn't use a normal map, but it didn't look right, the shadowing itself looked better though, not noisy and creeping in
    bgoodsell wrote: »
    On top of everything that was said, you also don't have a specular power in your material. Set that value to something greater than 1 to control the shine of the bricks (even though their color is little goofed at the moment).

    I did have a specular power node but I found that it just made it look shiny when I added it so I took it away


    EDIT: I've found also that the preview is weird, when I rotate the object the shadowing doesn't move across the surfaces as it should
  • kdm3d
    maybe a smoothing group issue, the normal kinda looks like its trying to bend wierd. check your smoothing groups.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Did you set your normalmap properties as ... normalmap ?
  • Xendance
    Offline / Send Message
    Xendance polycounter lvl 7
    Mind posting a screen with the lighting only viewmode?
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 20
    what pior said.
    The normal map doesn't look like UDK unpacked it on import. It looks like a regular texture which will give you wrong info.

    And yeah, remove the normal map multiply.

    when you import the normal map with actual normal map settings UDK unpacks the data to a -1 to +1 range which it expects for it shader system. You can tell its right because the blue channel will be super saturated in the areas that are flat rather than that mid blue we're all used to seeing.

    Your specular color map is all grey, thats not bad, but you may get punchier results if you add in some color to it. Perhaps a little of the brick color or a color you expect in your environment.

    A node or map going into spec power will make your object shiny if its a high number. If the default shinyness works for you then great, but again, materials can look a lot better with some artfully controlled differences in shinyness.

    Anyway the big, and I dare say THE problem is your normal map.

    right now the values only point up and to the left. ie 0-1 x and 0-1 y. Reimport the map with normal map compression settings and I bet this particular trouble will go away.

    or change the multiply node to a ConstantBiasScale with bias of -0.5 and scale of 2. Then see how it looks.
    if its good, then just re-import your normal map like as above. ;)
  • JFinn_UK
    Offline / Send Message
    JFinn_UK polycounter lvl 7
    Thanks so much for all these replies!
    kdm3d wrote: »
    maybe a smoothing group issue, the normal kinda looks like its trying to bend wierd. check your smoothing groups.

    Blender doesn't have that system, you just set a surfaces shading to smooth or solid *shrug*
    pior wrote: »
    Did you set your normalmap properties as ... normalmap ?

    I don't remember anything like that
    Xendance wrote: »
    Mind posting a screen with the lighting only viewmode?

    Sure, I'll get on that now. And yeah that reminds me, someone else tried my mesh out and they had no problems, I suspect it may be lighting issues now which is weird to me
    Vailias wrote: »
    what pior said.
    The normal map doesn't look like UDK unpacked it on import. It looks like a regular texture which will give you wrong info.

    And yeah, remove the normal map multiply.

    when you import the normal map with actual normal map settings UDK unpacks the data to a -1 to +1 range which it expects for it shader system. You can tell its right because the blue channel will be super saturated in the areas that are flat rather than that mid blue we're all used to seeing.

    Your specular color map is all grey, thats not bad, but you may get punchier results if you add in some color to it. Perhaps a little of the brick color or a color you expect in your environment.

    A node or map going into spec power will make your object shiny if its a high number. If the default shinyness works for you then great, but again, materials can look a lot better with some artfully controlled differences in shinyness.

    Anyway the big, and I dare say THE problem is your normal map.

    right now the values only point up and to the left. ie 0-1 x and 0-1 y. Reimport the map with normal map compression settings and I bet this particular trouble will go away.

    or change the multiply node to a ConstantBiasScale with bias of -0.5 and scale of 2. Then see how it looks.
    if its good, then just re-import your normal map like as above. ;)

    I changed the settings for the normal map. Also I have recently started using specular colour maps, I guess I should do that for my past meshes I wanna import now.

    Also okay I'll try reimporting it now



    EDIT:
    The normal map compression just seemed to make it all black *shrug*

    Also there was something in taking this picture, I acidentally clicked on lighting only mode and noticed some weirdness, I'm wondering if it is the lighting. Although in posting about my problem my shader awareness has improved alot.

    Untitled1124353546.jpg
  • kdm3d
    yeah, I know different programs call them different things... I guess I should have said make sure your normals are splt there, or verts are welded etc... looks like a normal issue to me... but I could be wrong:)
  • JFinn_UK
    Offline / Send Message
    JFinn_UK polycounter lvl 7
    Yeah and blender is a bit weird too. Also I tried taking away the normal map all together and I think I got some weirdness, I think I also took away the specular map and tried lighting it but it may not have worked. I just don't know the UDK to be honest. I know only very basic stuff. I'll have to try it out again tomorrow.

    Thanks for the reply


    EDIT: Well it looks like it was the lighting after all (I think). Thanks for all this advice, I learned a good bit more about using the UDK that the beginners guides don't teach you so much heh heh
Sign In or Register to comment.