For your average AAA videogame, how many dynamic shadow casting lights are there per frame and how many are point lights / spotlight?
>>513121There are many different ways lighting is calculated in games, but usually even if there are scores of lightsources in a scene only a smallsubset of them are set to cast dynamic shadows at any one time. The engine dynamically prioritize when a light becomes shadow casting and when not.Typically just by range to the light source and a light priority value so more important key lights gets prioritized in the render que.Non shadow casting lights are themselves cheap to calculate so you can have scores of those doting a scene without any problems if your mesh handling is any good.
>>513125for example i played the game Mortal Kombat X and there seems to be only 1 dynamic shadow caster light in the scene...is this how my game should be built if I want 60fps?
>>513127>is this how my game should be built if I want 60fps?Nah, It depends on your hardware and engine. Games like Mortal Kombat that takes place inside a small fixed arena and move along a fixed axisis quite different from open world games where you move around inside a vast environment. Like say driving around in GTA V.Like at night there are streetlights everywhere so you need many shadow casters, but each light only acts within it's given radius so if the distance to that lightis to far it wont clutter up calculations. Basically the more complex your scene is the smarter you have to be about how you light it.Since you probably isn't gonna code your own engine you need to get familiar with the capabilities of the tech you're using and learn how to optimize the scene.Depending how things are organized the same scene can render at 100hz or 20hz. You usually find zones like these even in AAA games where the frame rate unexplainably drops to a crawl. That is usually because of poorly thought out mesh sorting causing heavy Z-fighting with the engine trying to decide what is infront of what and in what order to render it.Just take your time reading the documentation of whatever you are using and become a bit shrewed about how you build your scenes,it's very possible on current generation hardware to create surprising frame-rates even in very vast rich scenes.It's also very possible to make something that looks worse than a 10 year old game and have it crawl if you set it up all wrong.