Download

Extreme Lag with Point Lights?

Hello Guys.
Whenever I put multiple Point Lights into my Level I am creating, it eventually starts to lag at an extreme rate where I cannot control my player or anything else in the engine.
I am using movable point lights because I want realistic shadows and I am also using movable actors and If I use static lighting, the movable actors are black and I do not get any shadows.
Whenever I preview the level in unlit mode, it runs completely smooth at 60fps and I do not understand when in lit, it runs at like 3fps?

My PC Specs are:
Nvidia GeForce GTX 1050 Ti
AMD Ryzen 5 1500X Quad Core Processor
16GB Memory RAM
Gigabyte Motherboard
Samsung U28D590D 3840x2160 60hz

Any help would be appreciated.
Thanks.

For static lighting, you’re seeing black on the meshes because you need to build lighting so that the lighting can use the volumetric lightmap. Also, make sure to include a reflection probe.

If the lights are set to movable, then check their influence radii.

I have used lightmaps and that did not work and I have set the radius from 1000 to 500 and performance is a bit better but still lagging but the downside to that is my scene is now too dark.

Any other suggestions?

You need to learn how to set up lighting properly. Static lighting is there for a reason, it’s a way to get realistic lighting with high performance, learn to use it.

I will have a look on the tutorials on Youtube and see what happens.

I would use static lighting if I could get shadows but light just passes through my movable objects and does not create shadows and that is why I use movable lights.

Any Other Suggestions if there is any?
If not, then I might considering upgrading my CPU.

You could switch to CryEngine…Not only does the lighting look better, but you can fill your scene with dynamic lighting and it won’t tank your PC. Oops did I say that :eek:

But yea seriously, with UE4 you get more community support and simplicity. While CE is more optimized, it’s a harder beast to tackle. It’s an option though if down the road UE4 doesn’t meet your lighting requirements.

I have already created a project in UE4 so I believe I need a new processor with more cores and threads.
This is not only happening with UE4, It is also happening with Star Citizen aswell.

Its ok to use only movable light :slight_smile: You could adjust shadow resolution, i did that and it gives performance back!

I tried Adjusting the shadow resolution and that had no effect and I tried enabling the shadow caching and that had very little effect.
How can I ever get this to run better?

Edit: I have been running the stat ShadowRendering and depending on which direction I am facing, It can go up and can go down. Facing the direction where there is Movable lights means I am at 75-80 ms while facing away means I am down at 8ms so it is definitely the point lights.

Is there any other settings I can play around with or is there nothing else I can do?

How much meshes with how much Vertices, materials you have in your Scene rendered? Each movable mesh, lamp, and shadow multiply exponentially. Create visual axes and culling possibilities

How many lights are you using?

The cost of movable lights is directly tied to how many pixels each light affects in a given frame.
So if you have 1000 lights affecting all the pixels in a frame, it will be slow.

Some options:
-Design your scene so there are fewer lights affecting the pixels at any given time.
-Use a combination of movable and static lights. Key shadow casting lights can be dynamic while incidental fill lighting can be static.

You can use several of the built in tools to determine what is costing performance . eg. Stat Shadowrendering

This. Also profile the GPU specifically to see the total light and shadow depth/projection cost. You’re more likely to hit a bottleneck with shadows before reaching one with just overlapping lights, but both can contribute to poor performance significantly. And how expensive are your shadow casting meshes, triangle-wise?

I ran stat Shadowrendering beforehand and my InclusiveAvg was running at about 23.00ms when I last run it.
My model does not have any triangle meshes as it is all Walls and doors and 2 Fully Operational Lifts that have to be movers in order for them to work.
I do have alot of movable point lights in my scene so I will try to cut down the number of Movable Lights and see what effect that will have.

UPDATE: I have no lag now when using Static Lighting but the lighting is passing through Doors when I do not want it to.
How can I prevent light passing through?

re watch the setting in the Unreal tutorial.

Are the doors movable? If you have movable objects they will only be affected by Movable or Stationary lights.

A point light with fully dynamic shadows is about the most expensive kind of light in any game engine, full stop. A point light dynamic shadow cost the same as of 6 spot light shadows, because the scene around the light has to be rendered 6 times to produce the 360-degree shadows.

If you pay attention to pretty much every AAA game you’ll notice they very rarely use dynamically shadowed point lights. When point lights are used they are often un-shadowed and have a limited radius to reduce them passing through objects. You can combine a shadow-casting spot light with a small radius point light acting as a “fill light”, for example, and achieve reasonable results.