Download

Lighting and Optimization (URGENT)

Hey guys,
After a year of work we came upon a horrible problem and I need your advice about lighting and optimization in order to solve it.

Our game is currently running on 30 - 40 FPS on Epic settings, but we’re having around 1500 - 1800 drawcalls and according to the ProfilerGPU, EBasePassDrawListType=0 and 1 are too much.

  1. What are EBasePassDrawListType=0 and EBasePassDrawListType=1 ?

  2. Is 1500 - 2000 drawcalls too much? (We’re working on a PC game with photorealistic content, semi-open world)

  3. Does Indirect lighting bounce increases number of drawcalls?

  4. Can Lightmaps and lightmap resolution affect FPS and drawcalls?

  5. We’re using indirect lighting with bouncing cards to illuminate our interiors (with stationary lights). Is this a good method for lighting games?

I would gladly appreciate any advice. Any answer to any of the questions would be of much help, thank you.

Lists of objects with Opaque and Masked materials respectively.

Should be viewed in the context, but generally, it is fine.

No.

Yes.

If it works-it works.

You did’nt specified any details, on what hardware it runs those 30 - 40 fps ?
What is your target hardware ?
2k batches is not that bad on PC - there are probably other factors that affect your FPS, for example unoptimized materials, overdraw, to much textures in pool, gameplay thread tick time, etc, etc.

huge textures. huge lightmaps. many stationary dynamic lights with huge radius, etc etc. - affect performance :slight_smile:
1500-2000k it`s not bad, but it depends on how they utilized.
some screens would be good. scenes and materials. also light sources details.

and yes, also bad code.
Do you use third party soft for profiling? intel gpa, nvidia nsight /another stuff?

Dyanmic lights with large radius can really affect performance. Why are you using multiple lights with such large radius?

emmm… pls - pay attention to who you answer and who is OP :smiley:

Thank you very much for your responses!!
A question: Does a lightmap need to be green for all the models in our scene or should we lower it down on some models (make it blue), perhaps it would improve performance?

We’re viewing our game on EPIC quality on these configuration requirements (we have 30 - 40 FPS):

Processor: I7 - 4770 3.40 GHz
RAM: 16 GB HyperX
Graphic Card: AMD Radeon HD 7800 with 2400 VRAM
Motherboard: ASUS Gryphon Z87

And we’re aiming for MINIMUM Requirements:

  • OS: Windows 7, Windows 8.1, Windows 10 (64-bit versions only)

  • CPU:: Intel Core i3-550. | AMD Phenom II X4 955 or equivalent.

  • GPU: Nvidia GeForce GTX660/GTX750ti/GTX950/GTX1050 with 2 GB VRAM or more. | AMD Radeon HD6970/HD7870/R9 270/R9 370/RX460 with 2 GB VRAM or more.

  • RAM: 4GB.

    However, at the moment, we do not have any LOD or HLOD or anything like that. I hope using LOD and HLOD for textures would improve performance.

As far as lightmap resolution, you set it to the lowest level you find acceptable, it depends on how complex the object is and how detailed the shadows need to be, so for example something like a floor can usually use a small lightmap since it’s simple and uses the lightmap space very efficiently, but it might need a higher resolution if it’s receiving a lot of detailed shadows. A more complex mesh would need a higher resolution lightmap since it will have more underutilized space.

In the picture the lights are not built… but in an environment with dynamic lighting mixed with stationary light there is some considerable cost. Is there a lightmass volume defined for that space?

Im wondering thou that for photorealistic style as you mentioned in the 1st post, those textures might be what 2k or 4k? Which is the resolution you are playing the scene HD or Full HD? If so, maybe you consideration for minimum hardware is not correct for photorealistic style.

As it is hard to tell by the picture, since is quite dark, can you at least tell a game which your style looks similar?

Considering the GPU you are using with 2.4GB RAM against RX 460 4GB, the last one is like 132% faster average, so in average you would get 81 FPS with the last one… so that would not be bad at all and tells you are in the right direction. I would suggest for you to experiment with realistic market hardware as soon as you can, even consider grabbing a RX460 4GB as reference performance, it is not bad at all, or even GTX 1050TI or 1060. Raise the memory requirement for 4GB, because you also need to consider at which resolution your solution will run, Full HD really press hard on memory requirements.

While developing a game you have two considerations playign constantly:

  • develop under a good hardware to speed up workflow, but also test on lesser hardware to see if you are not passing that threshold you want to set.
  • develop with your title release date in mind considering more and more people might get better hardware and that more and more powerfull hardware will be released till there

NilsonLima thank you for your response!
About the lights we deleted them thinking its the lights that cause drawcall problem. We had four stationary lights with bounce cards which illuminated the whole first floor. The drawcalls were around 1600, 200 drawcalls more than without light.
About LightmassImportance Volume, we placed one yes.

What I’m most happy about is your answer that we’re in the right direction.

The textures are varying, from 512 x 512 for smallest unimportant objects to 2K. We avoid using 4k.
We tested it on Epic quality, Full HD on the system mentioned in previous post.

About similarity, I would say our game is something between Allison Road, Visage, Resident Evil 7 style of graphics, although gameplay is quite different.

Yes, I was just trying to identify the visual similarity, because which person has different thoughts about what photorealistic is. The size of your textures are great for the scene then. The only thing you really need to care is to plan in the future (near or ahead) to test your game at a diversity of hardware to be sure you are under the scope. A major concern regarding hardware is that if you will make use of Sequencer later for your game’s cinematics, you will have a budget on your time spent on each frame to be able at least to have a film with 30FPS, meaning you must target a budget where you can at least have 41 FPS minimum, or the sequence will gag (forgot another word for it, but you got the point).

Also, something very few know about, you can start thinking on XBox testing! You will need to have a paid (not expensive) account with Microsoft as UWP developer (at my country is like $12 or so) and you can plug a real XBox Console for the testing! You will need to contact Epic proving you have the means (UWP acc and the console) and you will sign a document with Epic so they will release a dev kit for you to Package for XBox. Great right?

Cool! Thank you a lot. We plan to look into consoles sometime in the future since currently we’re focused on PC.
I got too alerted when I saw the FPS and number of drawcalls I guess.
Thanks to you and the wonderful Unreal Forums community, my hopes are up again. I would consider all your opinions during the optimization. You’ve been helpful a lot through our 1 year of work on our project. And we thank you for it!

and if you want to know - which mesh exactly eats performance, or light (oops… lights can be seen into built in profiler iirc) - use third party software :slight_smile:

eeh… i wish i can use many dynamic lights and other stuff XD