Announcement

Collapse
No announcement yet.

Help! Lots of lighting problems! (foliage, script)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help! Lots of lighting problems! (foliage, script)

    I'm having lots of trouble with lighting. I used the foliage editor and painted some grass meshes (from an UDK package) onto my landscape. When building lighting they are completely black and cast no shadow! It looks good when you haven't built lighting yet so I was wondering what are the settings for keeping the light that way?

    I have 4 pictures displaying my problem. In each picture the meshes on the right are made with the foliage editor, painted on a landscape, the brick-like walls/floor is BSP and the grass mesh and the stone-brick mesh in the BSP area is static meshes manually placed.

    My lightbuild settings are lightmass, preview quality.

    this is the scene with a dominant directional light, unbuilt lighting

    [shot]http://i.imgur.com/BSNTU.jpg[/shot]

    this is the same scene built. Notice how the foliage nor the static meshes doesn't cast shadows
    [shot]http://i.imgur.com/D8FVz.jpg[/shot]

    this is the scene with a normal point light, unbuilt lighting
    [shot]http://i.imgur.com/EQFaA.jpg[/shot]

    this is the same scene built. Now the foliage isn't even lit and the static meshes doesn't cast shadow (have tried set the light to dynamic with no success)
    [shot]http://i.imgur.com/3kd80.jpg[/shot]

    I'm no lighting expert but I believe the problems lies in which channel is being applied, and the lightmap res, but correct me if I'm wrong. Also, the grass meshes have overlapping UVs (warnings after build).

    Also, as an extra problem not really in this category, but does anybody know why the following code crashes the editor? The idea is to have an class extending pointlight, and applying a skeletal mesh to it. The skeletal mesh is because I will later implement so you can pick the torch up, and walk around with it. The code that crashes it is the lightenvironment for the skeletal mesh. Without it, it is unlit (black). Also, extra extra help, why doesn't the particle effect show?
    Code:
    class Torch extends PointLight
        placeable;
    
    DefaultProperties
    {
        Begin Object Class=DynamicLightEnvironmentComponent Name=LightEnvironment0
            bSynthesizeSHLight=false
            bIsCharacterLightEnvironment=false
            bUseBooleanEnvironmentShadowing=true
        End Object
    
        Begin Object Class=SkeletalMeshComponent Name=SkeletalMeshComponent0
            SkeletalMesh=SkeletalMesh'MyMeshes.Skeletal.Torch'
            Scale=0.5
            LightEnvironment=LightEnvironment0
            bOnlyOwnerSee=false
            CastShadow=true
            bForceDirectLightMap=false
            bCastDynamicShadow=true
        End Object
    
        Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent0
            Template=ParticleSystem'MyEffects.Particles.Test'
            bAutoActivate=true
            bOnlyOwnerSee=false
        End Object
    
        begin object Name=PointLightComponent0
            LightColor=(R=255,G=150,B=100)
        end object
    
        Components.Remove(Sprite)
        //Components.Add(LightEnvironment0)
        Components.Add(ParticleSystemComponent0)
        Components.Add(SkeletalMeshComponent0)
        bHidden=false
        bHiddenEd=false
    }
    Thanks beforhands for all the help I can get .

    #2
    bump for help!

    Comment

    Working...
    X