Home Technical Talk

Unreal3 Skylight not baking?

Hey guys, me again with another U3 lighting conundrum.

Basically i just tried putting a skylight into a scene for the first time, oddly enough when i try to build the lighting, the skylight's contribution disappears.

Every other kind of light is building just fine but for some reason not the skylight. This is using the default skylight settings too.

Any ideas? Thanks!

Replies

  • Mark Dygert
    Are you baking shadows or lighting? If shadows make sure the skylight has shadows enabled, it defaults to off.
  • Art-Machine
    From what i read the skylight has no shadows at all. It's just meant as a global ambient fill light. That's what I'm trying to use it for, to fill shadow pools with ambient light across the board. It's the skylight lighting that isn't showing up once i build lighting.

    It shows up fine in the dynamic preview but once i build, the skylight just doesn't seem to compute.

    Actually i should clarify that when i say bake i mean Build. Gonna edit my post to clarify this.
  • Ben Apuna
    There are a few things you can check to make sure the skylight is set up ok. Open up the properties for the Skylight and make sure under Light -> LightComponent that bCanAffectDynamicPrimitives, bCastCompositeShadow, bEnabled, CastDynamicShadows, and CastStaticShadows, are checked.

    Then under LightingChannels make sure BSP, CompositeDynamic, Dynamic, and Static are also checked. If you've changed the lighting channels that your objects are using to something other than the defaults make sure they are also checked.

    Hope that helps :)
  • whats_true
    Offline / Send Message
    whats_true polycounter lvl 15
    Turn all of your lights off and see if its still not contributing. Also, are you in additive or subtractive mode for the level?
  • Art-Machine
    There are a few things you can check to make sure the skylight is set up ok. Open up the properties for the Skylight and make sure under Light -> LightComponent that bCanAffectDynamicPrimitives, bCastCompositeShadow, bEnabled, CastDynamicShadows, and CastStaticShadows, are checked.

    Then under LightingChannels make sure BSP, CompositeDynamic, Dynamic, and Static are also checked. If you've changed the lighting channels that your objects are using to something other than the defaults make sure they are also checked.

    Hope that helps :)
    Tried this just now and nope, skylight still vanishes on build. So annoying.
    Turn all of your lights off and see if its still not contributing. Also, are you in additive or subtractive mode for the level?
    It's an additive level. Initially the skylight was the only light in the scene, when i built and everything turned black, I added other lights to make sure they work, and they did. For some reason only the skylight's lighting vanishes when i bluild, I also tried jacking up itsi ntensity to 10, still no build effect.

    Edit : I also made a quick subtractive level and threw in a fresh skylight, again goes black when built. What the hell, seriously. Should i start assuming my engine is busted? If you guys make a basic room and throw in just a skylight and buld all, does the room go black for you too?

    I'm using the editor that came with Gears Of War PC by the way. Gonna try grabbing UnrealTournament3 ans see if that editor does any better. I'm really sick of turning my clock back to 2007 to use the buggy GearsOfWar one anyway.
  • Art-Machine
    So get this :
    I'm downloading UnrealTournament3 from steam right now to try that version out.
    While I'm waiting i open another new scene in GoW engine, when I'm lighting it i throw in a skylight and build for the hell of it. This time it stays...

    This is despite having tried the skylight with new maps both additive and subtractive without success just this morning...

    So either steam is modifying some shared engine files some magical way, or this is a random bug that may or may not strike again \(-_-)/

    Edit : Created a new map in UT3 Editor, stick a skylight in, build. Pitch black. Can any of you guys test this on your side?
  • Ben Apuna
    Hmm... seems to be working fine over here with the Steam build of UT3. I've heard that the Gears build is buggy but I have no experience with it. I also don't think any of the different builds of Unreal will interact with each other in any way.

    When you say "build" are you hitting "Build Lighting" or "Build All"?. In the past I've had some issues with just using "Build Lighting", now I just use "Build All".

    What kind of geometry are you using BSP?, Static Meshes?, Dynamic Meshes? all 3?
  • Art-Machine
    Ive been using build all. So far the skylight has only worked for me once across both engines. I have no idea what was different the one time it worked. So lame.

    Its a combination of BSP and static meshes for the scene i was starting to work on. But my testing has been with something as simple as making a new map, making a square BSP room, and sticking in the skylight to test. I don't understand what would cause only the skylight not to build and only on my PC it would seem....
  • Ben Apuna
    Man that sucks :( I've tested both additive and subtractive levels both with BSP alone and BSP and Static Meshes with only 1 default Skylight and I can't duplicate your problem.

    The only time I can get things to go "black" is if I right click a BSP and under Surface Properties uncheck Accepts Lights. Or for Static Meshes unchecking bAcceptsLights under the Lighting tab.

    staticmesh_acceptlights.jpg

    bsp_acceptlights.jpg

    If I remember correctly the only other way something like this can happen is if you've got a big static mesh sky dome set to cast shadows, but I believe that's a directional light problem so it's completely opposite...

    What kind of graphics card are you using? any strange drivers or settings?
  • Art-Machine
    I use an Nvidia 8800gtx. Updated drivers fairly recently. As for settings, the only thing i ever tinkered with is forced AA.

    And like it's hard to think of a reason for this problem when it ended up working one time. If it was a graphics card problem i assume it would have been consistently broken. Also I don't think accept lights is my problem seeing as other types of lights always work.

    Just for some reason the darn skylight seems busted on build on both editors.
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    UE3 uses 100% baked world lighting so why would you ever want to use ambient light? O_o
  • Art-Machine
    Assuming I'm understanding your comment : I was trying to use the skylight to fill in the shadow areas without placing individual lights all over the place. The skylight is for baking just like any other light, I was using it as a global way to fill in the shadows in a not-too-flattening way. That is what it's recommended use is anyway.. I was starting an outdoor scene and wanted to get an outdoor lighting.

    Unless there's some better system for that rough GI effect that you were referring to.
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    The skylight is just an ambient light. It doesnt do any sort of AO that i know of so it will flatten out your lighting and look like shit. You can use many point lights without performance hit and you will get a good result. You should never use ambient light unless your lighting is all real time and you dont have a choice.

    For outdoor stuff you can add multiple "sun" lights to fill in shadows, then use point lights for fill where those dont hit. That way you can control the lighting and fake ambient occlusion and radiosity and get the exactly what you want.
  • Art-Machine
    I guess that'll have to be my compromise but its just annoying that something that should work doesn't in case i would like to use it for whatever reason.
  • crazyfingers
    Offline / Send Message
    crazyfingers polycounter lvl 10
    Sometimes it can be the assets in the scene. Are they dynamic assets, just a terrain? You might want to check your objects lighting channels, they may be set to only take dynamic lighting.

    If it's only happening during the bake i would suspect it's more the object properties rather than the lighting property.
  • Art-Machine
    As i said this has happened from scenes as simple as making a new map and creating just a cube room, to the scene i was working on which was just a rough BSP brainstorm of a scene with one static mesh duplicated around here and there.

    I'm really just giving up now, seems it's just something weird on my pc causing this. I'll just create my ambient lighting some other way.
  • |*BILLY$CLINT*|
    Offline / Send Message
    |*BILLY$CLINT*| polycounter lvl 11
    The skylight is just an ambient light. It doesnt do any sort of AO that i know of so it will flatten out your lighting and look like shit. You can use many point lights without performance hit and you will get a good result. You should never use ambient light unless your lighting is all real time and you dont have a choice.

    For outdoor stuff you can add multiple "sun" lights to fill in shadows, then use point lights for fill where those dont hit. That way you can control the lighting and fake ambient occlusion and radiosity and get the exactly what you want.


    Err that's not 100% correct you can in fact use the skylight as your ambient light for the scene whether it be indoors or out doors but it is not cast static shadows like a point/spot light would. In fact the whole reason it was added was to allow you to do just that(Note that in later version of Unreal 3.0 the sky light does bake but I don't think a version of that editor is available to the public).

    You also want to stay away from using multiple lights to brighten shadows as much as you can. Unreal does take a performance hit for every actor that you have in your level and I think the hard limit for light actors is 300 per level. So don't go crazy adding light's all over the place as you will begin to see a huge hit in build times as well as when you go to test your level.
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    My point is that you should NEVER use ambient light because its lazy and will always look like crap. If your going to be lazy with lighting then why bother making an environment at all.

    That would be crazy... Im sure they average lighting brightness/normals per 'object' for specular and stuff so you can add 1000 lights and get the same performance as 4. If they didnt do this the programmers needs a slap. Build times are a small cost to pay for a good result.
  • |*BILLY$CLINT*|
    Offline / Send Message
    |*BILLY$CLINT*| polycounter lvl 11
    My point is that you should NEVER use ambient light because its lazy and will always look like crap. If your going to be lazy with lighting then why bother making an environment at all.

    That would be crazy... Im sure they average lighting brightness/normals per 'object' for specular and stuff so you can add 1000 lights and get the same performance as 4. If they didnt do this the programmers needs a slap. Build times are a small cost to pay for a good result.

    LOL well EPIC must be crazy as their documentation states that you should never ever ever use more than 300 lights in a level. To be honest with you if you are using a 1,000 lights to light your level chances are you are not using your lights their maximum and again every actor that you place into your level is going to take something away from performance and I don't think you could even get 1,000 lights to bake in 64-bit dev environement let alone a 32-bit one as you would run out of memory really fast.

    Also ambient lighting is just another tool you should use to get what you want and using it is not lazy or bad. I agree with you that if done in hast or just out of plan laziness it would look bad but open any UT3, GOW, Mirros Edge, or any other UE3.0 powered game and you will find a skylight used as a ambient fill light for the level. I know that on my studios games we have skylights in all of our levels to help bring out some of the objects that are lost in the shadows.

    But this is all about to change with the unvalving of Unreal's new way of handlinLightmass.
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    Invisible actors shouldnt affect performance, and real time lighting calculations (specular and normal maps in this case) in modern game engines are almost always limited to 4 lights per 'object'. I really dont think you will find a skylight actor in stock levels for those games. If you do they will have a brightness of like 0.02 and there will still be point lights in the shadows (except in mirrors edge because they used a 3rd party lightmap baker).
  • |*BILLY$CLINT*|
    Offline / Send Message
    |*BILLY$CLINT*| polycounter lvl 11
    Invisible actors shouldnt affect performance, and real time lighting calculations (specular and normal maps in this case) in modern game engines are almost always limited to 4 lights per 'object'. I really dont think you will find a skylight actor in stock levels for those games. If you do they will have a brightness of like 0.02 and there will still be point lights in the shadows (except in mirrors edge because they used a 3rd party lightmap baker).

    Anything that you place inside of your level is considered an actor. From a light to a static mesh to a player start, they are all considered to be level actors. The more actors you have in the scene the bigger of a memory foot print the level is going to have making the loading and build times increases drastically.

    As for your comment about most modern game engines limited to only 4 lights per "object", Are you talking about dynamic objects or static ones or both and are they being light by dynamic or static light. If you are talking about dynamic objects Unreal can have many more than just 4 dynamic lights hitting any one actor and this is thanks to UE3.0 light environment option. Any dynamic mesh(Movers,Player,Weapons)

    Finally please check your facts before you make very broad statement about what an engine can and can't do. For example when you said, "like you probably will not find skylights in any of the levels and if you do it will have a brightness of like 0.02." This is completely wrong as DM-Sanctuary uses a sky light that is set to a brightness of 1.0 and DM-Deck also has a sky light that is set to a brightness of .25 and I am sure that there are many many more that use skylights as well.
Sign In or Register to comment.