Yes, I did use search to see if anything similar was posted. People have posted about dynamic lighting before, but I couldn't find anything like this. So here it is.
My map was lagging really bad so I used +showbudget to see the problem, it showed that "Dynamic Light Rendering" was being a large performance drain. So I looked into it on the Valve Developer Wiki and found that you can disable dynamic lighting with the shadow_control entity. So I put the option "All Shadows Disabled" to Yes on my shadow_control. I compiled the map and it was still showing in +budget that dynamic shadows were using a metric poop ton of performance however, props that I spawned no longer had shadows. Curious, I thought.
[IMG]https://s28.postimg.org/4wyvprlwt/wowowoweewwaa.jpg[/IMG]
Then I found the r_dynamiclighting 0 command and I used it. +showbudget reported that the "Dynamic Light Rendering" was no longer being rendered, and further more, entities, such as props and rag dolls and NPC's STILL had dynamic shadows(on the version of the map without the shadow_control). FPS spiked way up after that command was used. Now as any sane person, I wanted to know is if there is a way to do this in the map, I read on the developer wiki that shadow_control should do this, but for me it didn't, again, it disabled all dynamic lighting on props that I spawned but +budget still showed "Dynamic lighting rendering" was being rendered. I really had no clue what was going on, then I came to my friend, Grinchfox, told him about my problem and he bounced some ideas off me, he told me it could be this that and the third, finally, he mentioned stylized lighting. "What is that?" I asked. And he responded by telling me any named lights or lights with styles such as lights that give off a glow, may cause severe performance drain. Moral of the story, don't dynamic light and map kids.
[B]TL;DR[/B]
Here is an example of performance with a map with four fires that have a "Pulse" Appearance, and a map that has four lights with a "Normal" Appearance. Pay extra attention to the +showbudget window on the "With Stylized Lighting" video.
#1 Lights with "Pulse" Appearance or With Stylized Lighting
[video=youtube;YepizyYTs9U]https://www.youtube.com/watch?v=YepizyYTs9U&feature=youtu.be[/video]
#2. Lights with "Normal" Appearance or Without Stylized Lighting
[video=youtube;a3ZYKRenzpQ]https://www.youtube.com/watch?v=a3ZYKRenzpQ&feature=youtu.be[/video]
As you can see, just four, JUST FOUR lights with "Pulse" can drain performance by around 100-200-300%
[IMG]https://s23.postimg.org/5gstj12qj/the_earl_of_lemongrab_by_darthguyford-d5r9gts.jpg[/IMG]
All jokes aside, I highly recommend avoiding:
#1. Naming lights(Including light environment)
#2. Giving lights a special appearance such as "Pulse"
As someone who has been making a full sized map with literally 50 or so pulsing lights I've put in, but yet to even of compiled it yet.
Oh balls.
I just made a test map with 21 pulsing lights with names, a sky, a light_environment, and a shadow control next other to each other and still get 300fps. (Game TF2)
[QUOTE=Sreap;52237255]I just made a test map with 21 pulsing lights with names, a sky, a light_environment, and a shadow control next other to each other and still get 300fps. (Game TF2)[/QUOTE]
I'm assuming you have nothing much in the map, since it is a test map, hence why there is no lag. As you notice in the video, the map doesn't lag all the time in the "With stylized lighting" video. Since you probably don't have a large map, or many complex surfaces that are being lit, of-course you won't notice the lag. You will only really notice it when alot is going on in your map.
Lightmap resolution plays a huge role as well. Unless you're running on a supercomputer, then putting a single animated light near a wall with a resolution of 2 or 4 will make you kiss your framerate goodbye.
[QUOTE=h00dRat;52237332]I'm assuming you have nothing much in the map, since it is a test map, hence why there is no lag. As you notice in the video, the map doesn't lag all the time in the "With stylized lighting" video. Since you probably don't have a large map, or many complex surfaces that are being lit, of-course you won't notice the lag. You will only really notice it when alot is going on in your map.[/QUOTE]
The thing here is that any "stylized" light writes multiple lightmap pages, then blends between them. And if you have a lot it's constantly flipping between pages, which can get expensive.
[QUOTE=Stiffy360;52249268]The thing here is that any "stylized" light writes multiple lightmap pages, then blends between them. And if you have a lot it's constantly flipping between pages, which can get expensive.[/QUOTE]
Word.
Sorry, you need to Log In to post a reply to this thread.