Home Unreal Engine

UDK Noob - Dynamic lighting problems :( Please help

polycounter lvl 12
Offline / Send Message
Arthur Ramazanov polycounter lvl 12
Hello, please bare with me as I am a noob at UDK.

I was under the impression that you don't need a light map in order to have dynamic shadows.

When I select the light - I see a shadow but when Unselect it I lose the shadow -

When I build lights the shadow gets less dark and yet only visible if I have the light selected

I have - Cast Shadows - Cast Dynamic Shadows - Cast static Shadows - Cast Composite shadows - enabled

1.JPG

Selected


2.JPG

Deselected

3.JPG

build lighting - and selected

This is confusing me - please help :)

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Use Moveable or Toggleable lights to always display the shadows.

    Also, do the standard lights 'break' in the Editor or even after you compiled the scene? UDK had a bug (it should be fixed by now) where normal lights didn't work in the Editor, but did in the final scene.
  • Kon Artist
    Options
    Offline / Send Message
    Kon Artist polycounter lvl 8
    The dark shadows is what it looks like when you have broken lighting. If you want hard dark shadows like that in the final build you need to change your light mass setting under world properties.

    Default light mass settings has 3 bounces. If you turn it off it will look like that... but it will not bounce through translucent surfaces(if I remember right)... putting 'NUM indirect lighting bounces' at zero does the trick.

    Also, if you go into your static mesh editor, you can change the light map resolution to something like 256+(default is 32), if you find that your shadows are becoming blurry and washout after building all.
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    Thank you both - I'll give that a try
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    Still didn't seem to stick - It is strange -

    I tried it on the Default scene that UDK opens and I threw a light in - and hit Build light and the shadows worked - but not in my scene...

    I may have to specify that I do not have a separate UV channel for Light maps - because I didn't think I needed it if I use a dynamic light...
  • kite212
    Options
    Offline / Send Message
    kite212 polycounter lvl 15
    It's been a while since I've been in UDK, been doing Source lately, but did you set the lighting channel to Dynamic in the static mesh properties. Select mesh In the viewport hit f4, static mesh component, lighting, light channels, set this to dynamic. In the content browser in your static mesh set the lightmap channel index to 0 , and the resolution to 0, you will get a warning for not being a production build if its anything lower, but that should make the mesh completely reliant on the dynamic light
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    Hey kite212 - Thank you for your advice - I just tried it out in my scene and on the default scene with my assets -

    1.JPG

    2.JPG

    3.JPG

    This is what I ended up getting...

    it seems like what you suggested should work - I don't know what I'm doing wrong here - but it's frustrating to see all the tutorials not addressing whether you have to have a light map to cast or receive a shadow...because they use mostly assets that are found in engine.
  • Jacky
    Options
    Offline / Send Message
    Jacky polycounter lvl 6
    Try enabling "Force No Precomputed Lighting" in World properties if you are aiming for only dynamic lighting in your project, then rebuild the lighting and see how it works out for you.

    Btw, you dont have Cast Dynamic Shadows enabled in your last test. Not sure if its related to the issue but you might want to turn it on and give it another go.
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    hmm - that might be because I'm stupid lol...lemme retest that
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    Aha - force no precomputed lighting seems to have worked - but now the shadow doesn't appear in the "play in viewport" just in the editor...
  • kite212
    Options
    Offline / Send Message
    kite212 polycounter lvl 15
    wow so small fail boat on my part, the new pics better tell me what you are doing. I did not realize that you had arrows pointing to the light fixture in the original post did not see it on my iPad. So based on that pretty much ignore most of my last post. you will need to have a lightmap to have cast shadows like that. As far as i am aware you can only achieve the dynamic shadow casting such as that on skeletal meshes. To show you what i mean take that sample scene you have, with out built lighting so you have the cast shadow, in the light properties toggle and un-toggle static shadows, as you will see from this the cast shadow is coming from the static light channel. In your static mesh properties you can note in the LODinfo there is a check box for enable shadow casting. Sorry i did not realize what you were trying to do, but as far as i am aware you can not accomplish this without a lightmap in UDK, but maybe some one will chime in and prove me wrong.
  • Jacky
    Options
    Offline / Send Message
    Jacky polycounter lvl 6
    Just rechecked your first screenshots and it looked like an LOD issue with interp actors where shadows start to fade away and disappear after a certain distance. Are you having this as you get furhter away from the object or do shadows disappear when you are near them as well?
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    hehe Its quite alright Kite212 - I may not have been clear on my intentions. But apparently I was able to achieve a cast shadow with dynamic lights...to stick without a Light map UV channel. But it looks...not great...Some of the tiling assets are different shades-

    What apparently happened was I was supposed to bring in the meshes into the scene as Interp actors - which I didn't really know...
    I checked on one of the videos on eat 3D - the free one - turntable character.
    It sort of helped me a long.


    but**** If I do have to make a lightmap UV channel - do I do 1 per asset? or do I place them all in UDK - export into Maya or Max and then do 1 large UV channel for the whole area - as I have tiling assets - would it affect instanced of the same asset - if I have tiling ones - do I have to make just 1 light map per instance or can I just make 1 light map channel for the single asset?

    Sorry if I am confusing anyone - I really appreciate all the help


    1.JPG

    All I normally do is bring characters into Marmoset and go from there. Building a scene in UDK is way more complicated than I thought.
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    Also - no I don't even have LOD's set up - it was just a mip mapping issue
  • Kon Artist
    Options
    Offline / Send Message
    Kon Artist polycounter lvl 8
    Interp actors are a type of actor that you can animate Matinee. You can have static meshes take dynamic lights as well. Interp actor must be within the radius of a dynamic light or they will look black.

    If you have a mesh with non- unique UVs... when light hits it, you will get duplicating shadows where the UVs repeat. You can export your mesh from Max or Maya with multiple UV channels or add one later in the mesh editor in UDK.

    Creating the 2 UV channel in UDK is like a simple auto map, nothing will be overlapping. I think all you do is press a button:)
  • Arthur Ramazanov
    Options
    Offline / Send Message
    Arthur Ramazanov polycounter lvl 12
    hmm - that makes more sense now.

    but if I have lets say a door that has mirrored UVs - I know I need to make a light map in which the UVS aren't mirrored...but do I need to make a separate light map for every instance of that door? or can I just make 1 Door with a light map UV channel instead of lets say 3 doors with a combined light map UV channel - which would give it a smaller resolution I guess
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    hmm - that makes more sense now.

    but if I have lets say a door that has mirrored UVs - I know I need to make a light map in which the UVS aren't mirrored...but do I need to make a separate light map for every instance of that door? or can I just make 1 Door with a light map UV channel instead of lets say 3 doors with a combined light map UV channel - which would give it a smaller resolution I guess

    You only need to make UVs for the lightmap once. UDK packs them into a single texture for you.
Sign In or Register to comment.