x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Problem with Area shadows (for stationary lights)

Hi there,

So I started using the new "Area shadow for stationary lights" feature in 4.9 and started seeing some weird behavior. I have a landscape in my scene that serves as a floor to the entire level and when I turned on the area shadows feature I noticed that some other light sources would not light the landscape any more. They would light other objects, just not the landscape.

Steps to reproduce: 1. Place an object in the scene to act as a floor. 2. Place three light sources (Direction, Point or Spot light doesn't matter) so that each light illuminates some part of the floor object. 3. Enable "Use area shadows for stationary light" on one of the lights. 4. Build the lighting.

When the lighting is finished, one or more of the lights will no longer illuminate the floor object. If you add more lights (that also illuminate the floor object), other lights will stop working as well. One workaround for now is to keep adding lights until all the original lights are still lit after building the lighting, and then setting the unwanted lights to not affect world.

Is there any way to get around this?

Product Version: UE 4.9
Tags:
more ▼

asked Oct 02 '15 at 09:31 AM in Bug Reports

avatar image

Hejden
131 6 11 20

avatar image Logan Bailey ♦♦ STAFF Oct 05 '15 at 03:14 PM

Hello Hejden,

Thank you for reporting this and the reproduction steps.

I followed your steps and I did not see any of the other lights no longer illuminate the floor.

This was what I see.

alt text

As you can see the middle light is set to Use Area Shadows for Stationary Light.

I have a couple of questions to try and see if this is project specific.

  1. Does this happen in a new clean project?

  2. Does this happen in 4.9.2 or .1?

  3. If you could link me your DxDiag I can try and see if there are any compatibility/performance issues there.

After I have this information I should be able to further narrow down what is causing this.

Logan

arealight.jpg (176.5 kB)
avatar image Hejden Oct 05 '15 at 03:43 PM

Hi Logan,

  1. I did not do this in a clean project, but a clean map using only starter content.

  2. I was using 4.9.2

  3. I'll see if I can figure out how to PM in this forum :)

I should add that I tried to reproduce the effect using the steps I outlined, and for some reason I didn't get the same result. But if I duplicated a few lights so that the total of lights were seven instead of three, one of the lights turned off. So I guess you could keep adding more lights and recompute the lighting to see if it's the same on your end.

Anders

avatar image Logan Bailey ♦♦ STAFF Oct 05 '15 at 03:59 PM

Hey Hejden,

You can go to our forums and go to the advanced tab. From there you can look for me in the looking for employee section. From there you can send me a private message.

Logan

avatar image Hejden Oct 05 '15 at 04:21 PM

Hi again,

I've sent you a PM with a link to my Dxdiag file now.

Anders

avatar image Logan Bailey ♦♦ STAFF Oct 05 '15 at 05:03 PM

Hey Anders,

Your Dxdiag and specs are well within the suggested for UE4.

I did not duplicate any lights, maybe that was the issue. You can right click when you have the light selected in your Modes > Lights > ( Whatever Light) and place actor.

I will see if that is what caused it.

Logan

avatar image Logan Bailey ♦♦ STAFF Oct 06 '15 at 02:23 PM

Hey Anders,

I have confirmed that duplicating the lights and changing one to " Use Area Shadows for Stationary Light " does turn other lights off. For now place actor or individually place your lights.

I will look into this further.

Logan

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Hey Anders,

I have entered a bug for this issue.

The bug number is UE-21835.

Thank you for reporting this issue and I will keep you up to date on this bugs progress.

Logan

more ▼

answered Oct 06 '15 at 02:46 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

We found a similar issue with area shadows, but it wasn't related to duplicating lights. The issue is that shadow map that use area shadows option have a coverage on every samples of the shadow map, instead of only on pixels that are influenced by the light. Then in the merging of shadow maps per channel, everything will be overiden by that area shadowed light, so other lights affected to this channel are invisible. In the sample shown above, the 3 lights are next to each other, so they are on separate channel and dont have the issue. Our temporary fix is to take the light with the highest influence instead of replacing only based on coverage. Here is the fix that worked for us : ShadowMap.cpp in FShadowMap2D::EncodeSingleTexture

 // DNE BEGIN - Fix Area shadows erasing every other lights in the same channel (AZA)
 FLightmassLightSettings LightMassSettings = ShadowMapPair.Key->GetLightmassSettings();
 // DNE END
 
 // Copy the raw data for this light-map into the raw texture data array.
 for (int32 Y = Allocation.MappedRect.Min.Y; Y < Allocation.MappedRect.Max.Y; ++Y)
 {
     for (int32 X = Allocation.MappedRect.Min.X; X < Allocation.MappedRect.Max.X; ++X)
     {
         int32 DestY = Y - Allocation.MappedRect.Min.Y + Allocation.OffsetY;
         int32 DestX = X - Allocation.MappedRect.Min.X + Allocation.OffsetX;
 
         FFourDistanceFieldSamples& DestSample = (*TopMipData)[DestY * TextureSizeX + DestX];
         const FQuantizedSignedDistanceFieldShadowSample& SourceSample = SourceSamples[Y * Allocation.TotalSizeX + X];
 
         if ( SourceSample.Coverage > 0 )
         {
             // Note: multiple lights can write to different parts of the destination due to channel assignment
             // DNE BEGIN - Fix Area shadows erasing every other lights in the same channel (AZA)
             if (LightMassSettings.bUseAreaShadowsForStationaryLight)
             {
                 // We only replace sample if it has more influence
                 if(DestSample.Samples[ChannelIndex].Distance<SourceSample.Distance)
                 {
                     DestSample.Samples[ChannelIndex] = SourceSample;
                 }
             }
             else
             {
                 DestSample.Samples[ChannelIndex] = SourceSample;
             }
             // DNE END
         }
 #if WITH_EDITOR
         if ( SourceSample.Coverage > 0 )
         {
             GNumShadowmapMappedTexels++;
         }
         else
         {
             GNumShadowmapUnmappedTexels++;
         }
 #endif
     }
 }
more ▼

answered May 11 '16 at 03:12 PM

avatar image

NuSan
6 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Thank you Logan!

It's really helpful to know the cause of it. I'll avoid duplicating lights for now then.

Anders

more ▼

answered Oct 06 '15 at 03:15 PM

avatar image

Hejden
131 6 11 20

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question