>>513121 There are many different ways lighting is calculated in games, but usually even if there are scores of lightsources in a scene only a small subset 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.
>>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 axis is 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 light is 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.
Thread replies: 4 Thread images: 1
Thread DB ID: 556914
All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.