reepblue Posted August 2, 2016 Share Posted August 2, 2016 Hey all, I'm working on a map and I'm running into some slow down with my map. I did the following from past topics to get the framerate back up. I only have 3 spotlights Static+Dynamic+Buffered and anything with mass (minus debris which don't cast a shadow) have their shadows set to Dynamic. Everything else ether doesn't cast a shadow or is static. Everything in the map has the view range of ether medium or near. I also did the automated AABB system as a test, no luck. Killing the lights with my fullbright command shoots the framerate back up. Which is why I think it's a shadow issue. I left any Occlusion Culling modes to their default settings. No volumetics. It's not my resolution as windowed mode has the same results. There is only a fog post process shader. One thing I think might be causing an expense is that I have some lamps hanging from a point by a ball joint. Batches seem to go up around to 230 in that room so I guess I can remove that. These are my settings: <?xml version="1.0"?> <settings> <display screenwidth="1024" screenheight="768" fullscreen="1" center="1" forcenativeres="1" vr="0" /> <graphics lightquality="1" multisample="1" terrainquality="1" tessellation="1" vsync="0" fov="70" /> <controls show_console="0" /> </settings> If there is anything else I can try, let me know. I'll be uploading the project after I temp fix the player input. As the new input system Matt made seems to be a bit busted. I also will have to use my mobile data so if there is any ideas, I'd like to try before I upload it. Thanks, I'll get right to uploading the project... Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
reepblue Posted August 2, 2016 Author Share Posted August 2, 2016 Here it is, sorry for the delay. https://dl.dropboxusercontent.com/u/16218991/Requests/framerateissue.7z Instructions: 1. Extract the project to anywhere on your Harddrive. 2. Run "run.bat". This will launch the game (Release) in fullscreen, and devmode. (you can edit this if you want.) 3. It tilde to open the console, and enter "map den01" and press enter. 4. Once in the map, open the console again, and type in "stats 2" to show stats. 5. Waik around, and look at numbers. (The door to the hallway opens with "e".) You can also open the project in the editor. Thanks, I hope something can be found. I'm working on something that might help with this, or at least test my hypothesis, Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
gamecreator Posted August 2, 2016 Share Posted August 2, 2016 As often as this comes up, there really should be an official tutorial from Josh on this with every optimization under the sun, including editor and code settings. Right now there are just a bunch of threads with individual suggestions, some more helpful than others. 8 Quote Link to comment Share on other sites More sharing options...
thehankinator Posted August 2, 2016 Share Posted August 2, 2016 As often as this comes up, there really should be an official tutorial from Josh on this with every optimization under the sun, including editor and code settings. Right now there are just a bunch of threads with individual suggestions, some more helpful than others. God yes, I've been struggling to get my (simple)game to run well on my laptop's 7670m. Quote Link to comment Share on other sites More sharing options...
shadmar Posted August 3, 2016 Share Posted August 3, 2016 Nothing happens when you type map dem01 in console Also on my norwegian keyboard Ø seems to start a console not ~ Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
reepblue Posted August 3, 2016 Author Share Posted August 3, 2016 Sorry, it's map den01. I was really tired when I made it, Also, that's interesting. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 3, 2016 Share Posted August 3, 2016 I have started working on preparing a video tutorial for optimizing your game. Right now I am setting up the scene with deliberate mistakes in order to show users how to tackle performance problems. In this wiki topic I have severall articles listed which take care of a lot of the common problems. If you see any thing missing, please send me pm. http://leadwerks.wikidot.com/wiki:optimize-your-map 6 Quote Link to comment Share on other sites More sharing options...
reepblue Posted August 3, 2016 Author Share Posted August 3, 2016 Ok, great. Keep in mind that I do have some things in check on my application side of things. For example, anything that has mass, automatically get's it's shadow mode set to Dynamic. From your list, I can agree I have a lot of modular bits, so I guess I can take a look at that. Can't wait for the video too. I've also just got done with my portal volume system. It basically acts like a manual area portal that collects all entities in it's volume then hides/shows them. on command. I've gain about 20fps after implementing it. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
DooMAGE Posted August 3, 2016 Share Posted August 3, 2016 Tried to run the demo and I only get a black screen :/ Quote My Leadwerks games! https://ragingmages.itch.io/ Link to comment Share on other sites More sharing options...
DooMAGE Posted August 3, 2016 Share Posted August 3, 2016 Since I have some problems with FPS too in my game (is not even that kind of AAA gfx game) I noticed something related to the multisample When I use self.camera:SetMultisampleMode((System:GetProperty("multisample","0"))) I get 40 FPS And when I set the multisample to 16 I get 60 FPS I think the engine let our GFX cards on underclock when we are not usign higher multisample? Can someone try this too? My card is a R9 390 EDIT Did some more tests Multisample values - FPS get 0 = 40 FPS 2 = 40 FPS 4 = 40 FPS 8 = 60 FPS 16 = 60 FPS Multisample = 0 Multisample = 16 Notice the memory clocks Quote My Leadwerks games! https://ragingmages.itch.io/ Link to comment Share on other sites More sharing options...
nick.ace Posted August 3, 2016 Share Posted August 3, 2016 I agree with gamecreator. If there aren't going to be profiling tools (which there really should be), then there needs to be an extensive documentation for this. The only one who knows how the engine is designed in Josh, so he's the only person who can definitely say where the engine performs well and where it doesn't. I really shouldn't be expected to upload a project every time I encounter a performance issue. 3 Quote Link to comment Share on other sites More sharing options...
DooMAGE Posted August 4, 2016 Share Posted August 4, 2016 I agree with gamecreator. If there aren't going to be profiling tools (which there really should be), then there needs to be an extensive documentation for this. The only one who knows how the engine is designed in Josh, so he's the only person who can definitely say where the engine performs well and where it doesn't. I really shouldn't be expected to upload a project every time I encounter a performance issue. Looks like your concerns is the same as mine, and I think the community share the same concerns. Just take a look on the increasing number of threads about performance. Sometimes is really hard to tell what is going now, even with drawstats(). Please keep this thread alive so Josh can see that we are all worried about the current performance of Leadwerks. Quote My Leadwerks games! https://ragingmages.itch.io/ Link to comment Share on other sites More sharing options...
reepblue Posted August 4, 2016 Author Share Posted August 4, 2016 I've spent the last 2 days working on this map. I've gotten the map to run atleast 60fps. I first implemented my Portal Volume. This is a class I've coded that turns a Brush into a volume that detects entities within it's bounds. That helped me find the main drain of the map by section as I could manually hide everything in a room if I wanted too. Next up, I merged some models, and set more stuff to use no shadows. I only saw little improvement when after doing this. My batches went down a bit, but I was still seeing 60 frames tops in that last room. I also disabled shadows on the second spotlight. I went to the other spotlight, and turns out that it's shadows being redrawn each time, regardless that all other lights are ether not being drawn, or have their shadow mode set to none. It's weird, because I thought the engine could handle a spotlight casting on a rotating fan and be fine, but it turns out that's too expensive. So I went back and re-lit the room. It's not what I intended, but I get 80-90fps in this room now. I also have a bit of volume effects on point lights to make the fan holes pop out more, but I see no performance dip having them on or off. To make up for not having a dynamic shadow, I'll take the volume effect. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted August 4, 2016 Share Posted August 4, 2016 Your biggest bottleneck is probably the giant spotlights. Their AABBs probably enclose the entire map. In fact, all your spotlights have a very wide cone which makes them very big, which means at any given time you have a lot of lights being drawn onscreen. I would be looking carefully at the shadow polys. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
DooMAGE Posted August 4, 2016 Share Posted August 4, 2016 Cool, what about the multisampling issue I showed? Quote My Leadwerks games! https://ragingmages.itch.io/ Link to comment Share on other sites More sharing options...
thehankinator Posted August 4, 2016 Share Posted August 4, 2016 Your biggest bottleneck is probably the giant spotlights. Their AABBs probably enclose the entire map. In fact, all your spotlights have a very wide cone which makes them very big, which means at any given time you have a lot of lights being drawn onscreen. I would be looking carefully at the shadow polys. Can you tell us what size spotlight (and other light types if applicable) is reasonable or what size is in danger of significantly impacting performance? 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted August 4, 2016 Share Posted August 4, 2016 There is no hard and fast rule. It's all relative. Cool, what about the multisampling issue I showed? I think your computer was performing another task in the background that interfered with your measurements. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.