Home Unreal Engine

Dynamic-only lighting questions

When I add only a single point light to my scene, and set it to 0 brightness, the scene seems to be lit by a default directional coming from above. Where is this lighting controlled? If I disable the point light, I get no lighting at all (fullbright).

Is there a world ambient color setting somewhere? It looks like I can set a hue in the post process chain in World Properties. But is there an ambient setting anywhere else?

I'm learning about how lighting works in UDK, and would like to attempt a dynamic-only approach, no Lightmass. Partly because I hate waiting for bakes, but also because it seems UDK has enough controls to get a good dynamic result. And I've had good dynamic results in a custom engine that had much less user-adjustable controls.

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    If you set the brightness of your pontlight to 0, then there will be totaly darkness.try the skylight actor.probably this is what you are looking for.it controls the "ambient color".For the best using of this skylight actor, is to place that first, and then your other lights.
  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    If you use one of the preset morning/day/night scenes then there is atmosphere lighting set up that comes from the level itself (not an actor). Found in World Properties - Lightmass - EnvironmentColor/Intensity.

    Note there is other stuff set up in the default preset scenes as well. For that reason I usually start with a 100% empty scene.

    There is also a flag in World Properties Lightmass - bForceNoPrecomputedLighting if you want to go full dynamic. This removes any rebuild lighting message and so on.

    Note that Unreal is a forward renderer and Dynamic Lighting is heavy to render in the engine.

    Also you will need to turn on dynamic shadows on your dynamic lights. On a dynamic point or spotlight, set LightShadowMode LightShadow_Normal, and turn on CastDynamicShadows.
  • Eric Chadwick
    Options
    Offline / Send Message
    There's no total darkness. It seems like the LightEnvironment is the one that is affecting my scene, but it seems there aren't any user-adjustable controls for this (brightness, hue, etc.).

    All three lights enabled. (SkyLight, DominantDirectionalLight, PointLight)
    udklighting_1-all-enabled.jpg

    All three disabled. This makes sense. I would expect either everything to be black, or everything to be fullbright.
    udklighting_2-all-disabled.jpg

    DominantDirectionalLight enabled, brightness set to zero. There's a hemisphere light on everything, which I guess is the LightEnvironment?
    udklighting_3-dominant-zero-brightness.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    Ah yes, it's Lightmass in the World Properties.

    Thanks for the help both!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    when you turn off all the lights, viewport mode turns to Unlit.
  • System
    Options
    Offline / Send Message
    System admin
    hemisphere light is from the skylight, if youre using dynamic lighting i would suggest avoiding skylight its a little useless as it just fills things out pretty drastically. its nice when baking because it allows to control the shadowed areas much easier.

    i dont think that the light environment should be affecting your environment unless you are using dynamic meshes. obscura is also correct the middle image is in unlit mode.

    Im personally not a huge fan of dynamic lighting in unreal. it looks very shiny and not diffused. try adjusting the light source size and its falloff, you can fake some bouncing to a degree

    but vertex baked lightmass actually turns some really nice results and vertices bake a lot faster than lightmaps as its the reimport thats pretty slow.

    my 3c
  • Eric Chadwick
    Options
    Offline / Send Message
    Thanks for the input! How do I set it to bake to vertices instead of maps?
  • Eric Chadwick
    Options
    Offline / Send Message
    Ah, I found the notes about the preview skylight, which is the source of this "extra" unbuilt lighting...

    http://udn.epicgames.com/Three/ContentBlogArchive.html#Changes%20to%20previewing%20unbuilt%20lighting
  • maxivz
    Options
    Offline / Send Message
    maxivz interpolator
    as far as i know unreal dynamic lights are very far from optimized so i would love to see how you work the fps issues with this :) i also noticed that when you use dynamic lighting you get way better material detail in normal maps
  • Parkar
    Options
    Offline / Send Message
    Parkar polycounter lvl 18
    Working on a full dynamic project as well. Targeting the dx11 mode to take advantage of the deferred rendering.

    Got the stuff in this thread figured out and working ok since week or so ago.

    Also got the shadow bias adjusted so there is less artifacts at steep angles. (This one is hidden in the ini files for anyone trying to solve this).

    The last thing I noticed while doing some tests was that the specular power didn't seem to do anything. Seems no matter how high or low I put it it always looks to be really high on anything in the level although it looks correct in the material editor. Haven't had time to really dig into it though so not sure exactly what is going on. If anyone has noticed this and knows of a fix that would be great. According to the UDK documentation the deferred lighting should support specular power bu i suspect it might still be a dx11 issue since I haven't noticed this before.

    I'll come back with some more once I get a chance to investigate this further.
  • lpcstr
    Options
    Offline / Send Message
    Parkar wrote: »
    Working on a full dynamic project as well. Targeting the dx11 mode to take advantage of the deferred rendering.

    Got the stuff in this thread figured out and working ok since week or so ago.

    Also got the shadow bias adjusted so there is less artifacts at steep angles. (This one is hidden in the ini files for anyone trying to solve this).

    The last thing I noticed while doing some tests was that the specular power didn't seem to do anything. Seems no matter how high or low I put it it always looks to be really high on anything in the level although it looks correct in the material editor. Haven't had time to really dig into it though so not sure exactly what is going on. If anyone has noticed this and knows of a fix that would be great. According to the UDK documentation the deferred lighting should support specular power bu i suspect it might still be a dx11 issue since I haven't noticed this before.

    I'll come back with some more once I get a chance to investigate this further.

    If you are looking to get the most out of dynamic lighting then let me point you to a post I made in another thread recently about using physically based shading in UDK. http://www.polycount.com/forum/showpost.php?p=1787202&postcount=10
  • Parkar
    Options
    Offline / Send Message
    Parkar polycounter lvl 18
    @Ipcstr, thanks.

    You are a bit limited if you want to take advantage of deferred lighting so anything but Phong shading will use forward rendering even in dx11. I was hoping to be able to get decent results with deferred lighting so I could use it for most of what is on screen and avoid some of the performance Issues with dynamic lights in UDK.

    My conclusions so far is that the problem is indeed with the deferred rendring since the problem only happens when all the conditions for deffered lighting is met. If I switch to dx9 the spec power starts working again, same if I use Ipcstr's custom lighting or switch the lighting model to mlm_shprt.

    I also notice now that the specular highlight has some quiet bad banding when you zoom in close. As you can see in the attached picture the dx11 renderer is also adding some artifacts at the edges when I use Ipcstr custom lighting.

    The banding on the Phong specular highlight got less noticable when I switch on High Quality G Buffers but the other problems remain. (Picture is without this enabled)

    I guess the question is if deferred rendering can't do better or if something is wrong on my end.

    If I can't resolve this I'll probaly go back to dx9 and lightmas with only key lights dynamic, although it would have been nice to ditch the light maps.
  • Eric Chadwick
    Options
    Offline / Send Message
    Thanks for sharing your ideas and results! I'll have a play with these and see what's usable in my case.
  • lpcstr
    Options
    Offline / Send Message
    I've had so many problems that are exclusive to the DX11 renderer that I simply don't use it at all.
  • Parkar
    Options
    Offline / Send Message
    Parkar polycounter lvl 18
    Yea, I just switched to dx9 and everything seems to work better. I could dial back all the shadow settings and still get decently looking shadows while in dx11 I was getting all kinds of issues. Also seems like dx9 performance is going to be OK for what I am doing, just need to make sure I don't go to crazy with the number of lights.
  • Santewi
    Options
    Offline / Send Message
    DX11 - crappy dynamic shadows and 80 fps

    or,

    DX9 - crappy dynamic shadows and 150 fps...


    Yeah so hard to choose :P But at least we are going to get proper dynamic lighting in UE4.
Sign In or Register to comment.