Results 1 to 13 of 13
  1. #1
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default Lighting good in editor, vanished in game?

    Hi, this is driving me crazy!

    I have 4 pointlights, no shadows, that surround a city I'm making, and they have a low brightness value as they're just for ambient light so it doesn't go completely dark, and these work fine.

    My problem is I've added a spotlight (and tried directional) to work as a sun, and this needs to be dynamic.... but it doesn't show up in the game! I've edited it in Kismet and it works fine in the editor.

    I even added a SpotLightMoveable, and just left it sat there, not doing anything, but it still won't display in the game?

    My environment has a terrain, water, a skydome (also tested it without a skydome, no difference) and static meshes for buildings and roads, none of it lights up (except the skydome, which is unlit).

    Any ideas what's wrong?
    Thanks

  2. #2
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    244

    Default

    have you tried using a "skylight" to evenly light everything instead of using spot or directional lighting? it really is a great way to evenly light everything and it can always be turned way down if needed.
    How do you tell when you're out of invisible ink?

    DM-Tokay_Towers

    DM-TokaraForest ..........(--"Honarable Mention" in the "Make Something Unreal" contest!--)

  3. #3
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Quote Originally Posted by Neocane View Post
    have you tried using a "skylight" to evenly light everything instead of using spot or directional lighting? it really is a great way to evenly light everything and it can always be turned way down if needed.
    Thanks for that, that's a much better alternative to my 4 point lights that are surrounding the terrain. It also shows up in-game, unlike every other light that for some reason is just not working in game for me.

    The only thing is I need it to be directional, so I guess it wouldn't be suitable as a sun, but good as ambient light to prevent it from being totally black at night.

    I need shadows that are dynamic though, so I need to make the light move to simulate - I'm guessing the skylight wouldn't be suitable for that? When I tried to move it in a matinee, it told me off.

    The only lights that are showing in-game for me are skylights and pointlights, everything else just doesn't work.

  4. #4

    Default

    You'll need to go into each actor's properties (luckily you can select all static meshes etc by right-clicking one with it selected and have it select them all) and make them accept static lights and cast static shadows. Under the Lighting Channels, tick the Dynamic channel. Static objects do not accept dynamic lights or cast static shadows at all by default, that sounds like the issue.

    You may run into one issue though, so be forewarned. If you have too many dynamic objects in the map, framerates will plummet and can potentially make the map unplayable... Not saying that will happen, just that it could.

    Also, I have tried applying dynamic lights to terrain and it will not work. There may be a work-around for this, but if there is, I don't know it.

    One other thing: Did you make sure to build lighting? Sounds like a silly thing to ask, but I thought I ought to anyway.
    "He who dies with the most toys, still dies... and I steal their toys." ~SM

    Specs: Gigabyte S-Series GA-P35-DS3L, Intel Core 2 Quad Q6600 2.4 GHz, 4GB Crucial Ballistix Tracer 1066, EVGA Nvidia e-8800 GT 512 MB, X-Fi XGamer, 2x WD 500 GB SATA, Philips 20x DVD+-RW Dual Layer, SolyTech 1000W PS, Cooler Master CoolDrive 4, NZXT LEXA Blackline Case /w LED Temperature Display, Sylvania 22" Widescreen Flat Panel Monitor (1680x1050)

  5. #5
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Ah, it's working in game now, thanks! I changed a load of options, including making the lighting channels dynamic, I bet that was the thing that worked as you said.

    Added a directional light to act as the sun, and kept the skylight as ambient for when the sun goes out.

    Only thing now is, I've animated the light so the shadows move - but this only works in Matinee playback. The brightness change does work, so that would mean the objects are definitely set to receive dynamic lighting, right? I set the physics type to interpolating as well.

    EDIT: fixed this bit. [Also, the shadows are a bit blocky - they're good before I build the lighting, but afterwards they're just not good, I guess I need to increase the shadow resolution or something somewhere?]
    Last edited by Flux101; 08-13-2008 at 09:46 AM.

  6. #6

    Default

    I am not sure about the shadow resolution... Personally, I have done very little with dynamic lighting, using them only where absolutely necessary. So, sorry I can't really help much with that particular problem.

    Maybe go back into the properties and see if messing with either CompositeDynamic Lighting Channel or try toggling off the "bUsePrecomputedShadow" on static meshes helps at all.

    Sorry I can't help out more with that. Anyone else wanna have a go at that?
    "He who dies with the most toys, still dies... and I steal their toys." ~SM

    Specs: Gigabyte S-Series GA-P35-DS3L, Intel Core 2 Quad Q6600 2.4 GHz, 4GB Crucial Ballistix Tracer 1066, EVGA Nvidia e-8800 GT 512 MB, X-Fi XGamer, 2x WD 500 GB SATA, Philips 20x DVD+-RW Dual Layer, SolyTech 1000W PS, Cooler Master CoolDrive 4, NZXT LEXA Blackline Case /w LED Temperature Display, Sylvania 22" Widescreen Flat Panel Monitor (1680x1050)

  7. #7
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Ah I got the shadows sharper, it was an option in the generic browser on the mesh.

    I'm beginning to think that directional lights just aren't allowed to move in game. They move fine through Matinee, but anywhere else it just doesn't work. Weird.

    As soon as one problem is fixed, 5 more problems appear!

  8. #8
    MSgt. Shooter Person
    Join Date
    Aug 2006
    Location
    Dear Ole' Blighty.
    Posts
    281

    Default

    Quote Originally Posted by Flux101 View Post
    As soon as one problem is fixed, 5 more problems appear!
    Welcome to the world of Unreal Engine
    System Specs: Sinclair ZX80.
    --------------------------------
    Custom UT3 Ladder Volume HERE.

  9. #9
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Quote Originally Posted by ShadeMistress View Post
    Static objects do not accept dynamic lights or cast static shadows at all by default, that sounds like the issue.
    Just thinking about what you said here - do I need to add buildings as something other than static meshes in order for the shadows to move as the sun does?

    I just tried adding as an InterpActor but textures won't be applied to it, so not sure if I'm doing this right...?

  10. #10
    MSgt. Shooter Person
    Join Date
    May 2008
    Location
    Omicron Six
    Posts
    159

    Default

    You have the following classes:
    DirectionalLight
    DirectionalLightToggleable
    PointLight
    PointLightToggleable
    PointLightMoveable
    SkyLight
    SkyLightToggleable
    SpotLight
    SpotLightToggleable
    SpotLightMoveable

    If you want to change properties of your light (i.e. color, brightness) in Matinee, use the -Toggleable versions. If you want to move a light, my guess you need to use -Moveable.

    My guess is that you are trying to move other light actors, which will probably not work. Matinee should warn you about it when adding the track though...

  11. #11
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Quote Originally Posted by Lilium_Atratum View Post
    You have the following classes:
    DirectionalLight
    DirectionalLightToggleable
    PointLight
    PointLightToggleable
    PointLightMoveable
    SkyLight
    SkyLightToggleable
    SpotLight
    SpotLightToggleable
    SpotLightMoveable

    If you want to change properties of your light (i.e. color, brightness) in Matinee, use the -Toggleable versions. If you want to move a light, my guess you need to use -Moveable.

    My guess is that you are trying to move other light actors, which will probably not work. Matinee should warn you about it when adding the track though...
    I've tried DirectionalLightToggleable, SpotLightToggleable and SpotLightMoveable in Matinee, and they work fine - but only in Matinee, it just won't work in-game. (I did first try a non-moveable one, and it did give me an error as you say)

    The only thing that does work in-game is the brightness change (so at least I know the Matinee sequence is being triggered OK). It gets light and dark perfectly as I want it, but the light just won't move at all. Is it anything to do with the static meshes in the level that don't allow dynamic lights somewhere? In the lighting tab on a static mesh, I have these checked:

    bAcceptsDynamicLights
    bAcceptsLights
    bCastDynamicShadow
    bForceDirectLightMap
    bUsePrecomputerShadow
    CastShadow
    (and Dynamic checked in the lightingChannels)

    And on the directional light's LightComponent tab, these are checked:
    bCastCompositeShadow
    bEnabled
    CastDynamicShadows
    CastShadows
    CastStaticShadows

    I've tried loads of different combinations though, but maybe I'm looking in completely the wrong area.
    Last edited by Flux101; 08-13-2008 at 04:34 PM.

  12. #12
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Ah never mind, it's working now! For anyone else that stumbles across this problem, the (in my case) moveable spotlight needs to have bEnabled, CastDynamicShadows, CastShadows and CastStaticShadows.... and the important bit (for me anyway, I didn't do this!), on the static mesh, it needs bAcceptsDynamicLights, bAcceptLights, bCastDynamicShadow, CastShadow and Dynamic (in LightingChannels) all need to be ticked.

    I was trying to do everything in one go, rather than thinking about what was happening. I also only had one staticmesh that was set to these settings, so I couldn't see a shadow on the ground, because the ground didn't have those settings.

    So all sorted now I think (until my next problem that's bound to happen!), thanks everyone!
    Last edited by Flux101; 08-13-2008 at 05:13 PM.

  13. #13
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Posts
    31

    Default

    Argh! Just when I thought I had it sorted, now the shadows don't display in game. The light moves, but there just aren't any shadows at all... what could I have missed?


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.