Product Chat / Performance Optimisation

Author
Message
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 2nd Jul 2016 18:05
I have been trying to improve performance of my level. As you can see by the attached screenshot, I haven't succeeded. I got most of my characters to spawn only when the player gets reasonably close to them but this doesn't seem to have had any positive effect on the frame rate. Does any know why?

Seems like polygons and draw calls are the main culprits. They are almost maxed out despite this scene being in a small enclosed room with no terrain visible. What exactly are these gauges?

If someone could please suggest a way to fix this I'd be grateful.
Julian

Attachments

Login to view attachments
PM
PartTimeCoder
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location:
Posted: 2nd Jul 2016 18:13 Edited at: 2nd Jul 2016 18:14
have you turned the terrain and water off with "goindoors.lua"?

EDIT:

and turn your terrain and entity shaders down, this will fix it instantly!
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 2nd Jul 2016 18:29 Edited at: 2nd Jul 2016 18:29
Turn off shadows and SSAO, that should boost things a bit. What graphics card do you have, and your PC Specs.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 2nd Jul 2016 20:49
try turning occlusion on, draw calls are basically 1 for each object in the level, you have over 2000 objects being rendered so occlusion should help hide the ones you can't see. (it's not great but will help if you don't want to reduce the settings)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 4th Jul 2016 00:19
There's much you can do by the looks. Some have been covered already.

I'd recommend lowest terrain if it is all indoors for one, as you won't see it.
Lower you view distance as low as you can get away with (again good for indoor only generally, unless you design it well). Getting to less than 10 will seriously boost fps more than any other tweak.
Turn off motion blur and depth of field unless you really want them. A lot of people don't like the effect, so unless you feel it adds to the game turn them off.
Again if indoor only, the grass shader might as well be on lowest.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 4th Jul 2016 16:46
The best thing you can do is get a real graphics card.
The coffee is lovely dark and deep,and I have code to write before I sleep.
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 4th Jul 2016 19:11
Thanks everyone. I am working through your suggestions.
Julian
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 15th Jul 2016 09:20
If I have lots of instances of the same entity albeit with different properties, scaling, rotation, etc. will it just be loaded once? Therefore reducing the level loading time?

The thing is, my level takes about 5 minutes just to load!
Julian
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Jul 2016 09:34
No, even if you have the same model without changes it will still load them all individually.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 15th Jul 2016 13:19
Quote: "The thing is, my level takes about 5 minutes just to load!"


I've had this and seen this as well. Long loading times can drive you nuts, especially when you have to test something several times (which normally you are doing). Is this in a standalone or in editor? I have found that some objects take longer to sort out than others. For instance, the Apocalypse map I did awhile back took 25 mins or more to TEST as soon as I changed anything. Run it with no changes after and that drops to 30 seconds. I removed some buildings I had in that were only scenery, replaced with a billboard to improve in-game FPS and also in the hope it would fix the loading issue. It did and the game then took 30 seconds every time it ran. So, odd things can cause slow loading times here. I'm guessing some of the City pack buildings have something that makes them take forever to sort out physics for some reason.

Of course, I have seen other games take 5 minutes to load or more. Morning Mountain Stroll was one. When it finally loaded it ran at about 10 FPS so a bit of a disappointment at the time. That game is pretty packed with trees and scenery though, so that may be normal, although I've seen games with a lot more, load a lot faster in honesty (non GG ones). That is also getting on a bit now and some optimisation of loading has been adopted since.

If you have found your level suddenly taking ages to load, when it didn't before I would check the newest objects you have used. It could be a similar issue, although 5 mins is practically joyful compared to the 25+ min wait I was suffering for some time with my map. If your map simply had thousands and thousands of objects, then you will have to live with it for now.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 15th Jul 2016 17:24
I've noticed lately, GG using about 60% cpu.
Also notice GG dropping fps a lot, when player closest to the walls; it should be because GG taking care about collision, (calculating the collision).

I'm closest to get my desktop, so I'll see how it change, and make comparisons.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 15th Jul 2016 21:02
Thanks, guys. It takes ages in both Test Mode and Standalone. I think it is mostly after I added entities from a "military" construction pack to make a prison. Today I spent several hours deleting non-vital entities (though not any from said pack) and replacing many others by reusing entities.

There has been no difference in loading time. Very odd.
Julian
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 15th Jul 2016 21:06
Quote: "No, even if you have the same model without changes it will still load them all individually."


So, there are no gains to be had from reusing entities (apart from disc storage, I guess)?
Julian
PM
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 15th Jul 2016 21:13
You could combine identical entities into a single entity. This may or may not be practical depending on how they are located with regards to each other. I also don't know how that would affect lightmapping as I tried this some time ago as a proof of concept to myself, well before the lightmapper was introduced.
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 10/64, GeForce GTX 1080 (Passmark 12735); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 10/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 15th Jul 2016 21:13
This is unacceptable. I really hope TGC will make another thorough pass through performance overhaul. Maybe they might also vet incoming entities from artists for performance too. I can't see a gamer being willing to wait 5 minutes for a level to load. I mean, I used to wait longer than that for a game to load on my BBC micro back in the '80s but it is a very different world now!

The alternative is we must make our levels rather samey and boring.
Julian
PM
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 15th Jul 2016 21:16
Jerry, interesting idea. I'm guessing this would be done in a 3D modelling program...?
Julian
PM
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 16th Jul 2016 01:27 Edited at: 16th Jul 2016 03:48
Quote: " I'm guessing this would be done in a 3D modelling program...?"


Yeah, I use Blender, because if I can get it into Blender I can get it into GG (converted first to .fbx in Ultimate Unwrap, but you could use Fragmotion to convert; heck you could do the whole process in Fragmotion if you're familiar with it) and of course this would only work with static objects. I used barrels, 1000 actually, but it could be used on crates or whatever you would have lots of in an area. Group and orient the objects as you'd like to a point where you don't exceed the polygon limit (I didn't realize it at the time but I understand it better now, 22000 with bones, and 65,000 (I think) without bones; mine at the time must have been exporting with bones) and export. Import into GG in whatever way you normally would. My case was an extreme with 1000 barrels, but it proved the point. Performance was greatly improved with way fewer draw calls. I don't know about loading times, though, because all my levels load pretty fast. I theorized at the time this would also work with different objects and a texture atlas, but was too lazy to fiddle with UV maps. Say you have several objects with 512 X 512 textures. You could combine 4 of them into as many combinations as you'd like (like the barrels) and as many as you can get away with and just map all the textures into a 1024 X 1024 atlas. Or 16 of them in a 2048 X 2048 atlas. Or 64 in a 4096 atlas! I think somewhere in there there is a tradeoff in performance gains vs. texture size, though. Experimentation would apply there.



EDIT: I decided to try my little experiment again. 480 barrels one at a time vs. 960 in groups of 12:


Kinda hard to see but the shot with 480 barrels has roughly the same frame rate as the 960 barrels but has 1012 draw calls vs. 214. HUGE difference! Polygon count on 480 barrels = 426,284 vs 2,578,796 on the 960 barrels.
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 10/64, GeForce GTX 1080 (Passmark 12735); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 10/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
wizard of id
3D Media Maker
18
Years of Service
User Offline
Joined: 16th Jan 2006
Playing: CSGO
Posted: 16th Jul 2016 07:40
Quote: " Maybe they might also vet incoming entities from artists for performance too. I can't see a gamer being willing to wait 5 minutes for a level to load. I mean, I used to wait longer than that for a game to load on my BBC micro back in the '80s but it is a very different world now!"


So to get a clear understanding what you said because of a few select users with insufficient system specs, the rest must fall inline to accommodate the few ? Is that correct ? Polygons isn't a issue just between you and me, the amount of draw calls will kill performance far quicker then polygons even remotely can.


But lets address the issues from the screenshots.You expect the engine just to simply run things without having put in any effort to reduce the amount draw calls.

2332 odd draw calls, that will pretty much kill any system.

I don't have a massively fast or new system, should change the sig at some point, the 660GTX died and actually working on my old 570GTX again.

Simply no effort here from my part to get better performance. 2.7 million polygons and 1380 draw calls still 26 odd frames isn't half bad considering how much it is rendering and it ain't even visible to the player, what a waste.I should add I am using lots of animated objects and dynamic lights in this level.



Max effort, draw calls down to 466 at highest point with 700K polygons.




So you have done no effort to reduce draw calls, or polygon count, turned off occlusion, terrain render size is at 90%, is 90% of your terrain visible ?
What about terrain LOD do you really need it that high?
What about camera rendering distance ? I can't even see half my level why should it be rendering and using draw calls for some thing I can't see.

I am shaking my head, as this is the most common problem I notice, cry foul without any sort of user intervention, while you consider it rude, but I have mentioned this time and time again, user intervention is required NO engine is going to automatically do the performance optimizations for you.It annoys me when you start placing blame on me the store artist and others.

So the questions is
What effort have you done to reduce the amount of draw calls. ?
Have you made your level in such a way that it is a flat piece of ground for miles on end. ?
Do you spawn AI only when it's needed, including large stuff which might not be visible right away ?
Have you attempted any means what so ever to improve the level ?

The screenshot in your first post pretty much tells me what I need to know.I would have left this thread well alone, but you effectively blaming me and other artists for your own issues, I would like to know what your system specs is as I suspect this is another issue.
Win7 pro, Intel 2500K @3.7ghz 660GTX 8gig ram 16tb HDD
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Jul 2016 09:18
"A bad workman always blames his tools" or at least that what my dad would say. Take that how you will. Anyway using my own terrain and using goindoor.lua script and turning everything down to lowest got me over 300 odd FPS and it's usually 40fps. Well it's a starting point....



Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen). Wanting a new PC at some point.
Interests: Drumming, Saxophone, Art, Theatre, Music.

Attachments

Login to view attachments
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Jul 2016 16:52
Quote: "So to get a clear understanding what you said because of a few select users with insufficient system specs, the rest must fall inline to accommodate the few ? Is that correct ?"


To be honest you can have a gaming beast and still grind GG to a halt fairly easily. If GG's strategy is to take so long to finish any PC can run it, that's a bad one. FPSC actually went this route to some degree GG is slow, no doubt about it, no argument. I have given up trying anything big now and pretty much just play about with different ideas rather than attempting to make a game.

I have been shouting for performance since forever. At the moment GG seems slower than ever to me. I can cripple a scene with just a few trees. My PC Spec is not as bad as that. I have no issues running anything else. I'm pretty sure the specs listed to run GG are not an I7 and a 1080 video card. Yet even with that you will get rubbish performance compared to any other game or engine out there.

Yes, Lordjulian made virtually no efforts to optimise what can be optimised. That is why he asked the question in this thread I imagine. Most things that can be done have been mentioned. His last point though was loading times, not in game performance. None of the above will help with that, apart from the issue I mentioned, where certain models (TGC City Pack) caused a game I started to take 25 mins to load. I don't know which model caused it in the City pack, as I deleted all of them in one go. My level then changed from 25 mins plus to 30 odd seconds. So without doubt something in the City pack causes big time issues with the AI physics obstacle creation. He is only suffering 5 minute load times, which can be normal for a heavily populated scene, so there is probably no issue with any of the models. Worth checking though, some models do slow things badly, I have found several in the past that Lee has then fixed for later updates.

On the other hand, mentioning vetting artists more is a bit much. None of the media I have found to cause any of these issues has ever been directly from a game store artist. It has always been default or TGC stuff. I would say store artists spend more time making sure their stuff works well in GG than TGC do, as they most likely use it themselves. TGC stuff is commissioned work. The artists commissioned may or may not be GG users and so more likely to have GG issues than say, someone who uses GG regularly. Not because they are bad artists, but because they just don't do much testing in GG itself. I imagine Lee has to do most of that and as mentioned many times, he can't spend as much time to test these things as he or we would like.

The point of the thread was asking about performance optimisation. No point having a go at him about it. You have every right to defend artists work on the store of course! I think he made a bit of a jump there from my suggestion an object or objects MAY be causing the issue.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
wizard of id
3D Media Maker
18
Years of Service
User Offline
Joined: 16th Jan 2006
Playing: CSGO
Posted: 16th Jul 2016 17:25
Lol there is a stupidly simple fix for the long loading times.

Change the FPE setting for collision from polygon to box collision, instant boost ( I often forget to change to box collision )

His issue is draw calls, not ideal level layout, no optimization and most likely system specs.

You have to understand this performance specific complaint comes up time and time again, every time it is the same, no effort on the part of the user, so excuse me if I get slightly agitated if other people start getting the blame, for performance issues.
Win7 pro, Intel 2500K @3.7ghz 660GTX 8gig ram 16tb HDD
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 16th Jul 2016 17:27
In the tgc city pack there were some pavement blocks that were set to dynamic by default. I dont know if that has been fixed and i am not home to verify. It may not have even been the city pack but it was definitely a tgc asset. Put several of them down, though and 70 fps goes to 15!
MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 10/64, GeForce GTX 1080 (Passmark 12735); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 10/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
wizard of id
3D Media Maker
18
Years of Service
User Offline
Joined: 16th Jan 2006
Playing: CSGO
Posted: 16th Jul 2016 17:39
collisionmode = 0 that is all you need to change in some instances to reduce the loading time, I might have an old version of the TGC citypack, I don't do store updates that often, but I checked on my version polygon collision is still active on the buildings.
Win7 pro, Intel 2500K @3.7ghz 660GTX 8gig ram 16tb HDD
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 16th Jul 2016 18:10 Edited at: 16th Jul 2016 18:36
WOI. Steady on there. My attitude detector is detecting something here. I've been doing my best, you know. Sorry I don't understand all these technical terms. That's one reason why I chose GG. It is also one reason why I asked for advice (see my original question at the top).

I admit I am not that clued up about all the sliders etc. Forgive my ignorance.

Also, I'm not suggesting we should favour low spec systems. I just think that a low-spec machine is a good way to measure whether a level is performing optimally. Running an inefficient level on a high-spec beast probably won't be so informative.

WOI, I am not blaming you personally. There is no need to take it personally. It's not even a question of blame. I was merely suggesting that all assets should be optimised. There may well be a few assets in the store that need some adjustments but I have never suggested they are yours. I haven't even been able to identify any problematic assets. Do you not agree that everything should be optimised at every stage of the process right down the line?

Honestly, I was just trying to get a bit of advice. We have both got each others backs up and that was never my intention. I think you have jumped the gun and been a bit harsh. BTW, I have purchased a good number of your assets.

OK, I have edited this post about 3 times now simply because I cannot adequately express how irritated your comments have made me. I have very limited technical knowledge, OK, it might come as second nature to you but I am figuring most things out by trial and error. I do stand by my suggestion that assets should be vetted, not just for optimal performance but for all aspects of quality. I am not the one who made this personal.

Having said all that, I will acknowledge that you, WOI, did impart some useful advice along with the attitude so thank you.
Julian
PM
wizard of id
3D Media Maker
18
Years of Service
User Offline
Joined: 16th Jan 2006
Playing: CSGO
Posted: 16th Jul 2016 18:40 Edited at: 16th Jul 2016 18:43
@lordjulian

Yet you never took the time to test what each slider does.That doesn't compute, simply doesn't make any reasonable sense ANY reasonable person using the software would have checked out the sliders and what each one does, doesn't require a genius to figure out that changing the terrain LOD reduce the draw calls or polygon count. Attitude given isn't unreasonable, most would actually understand why I am annoyed with you

However with regards to system requirements, there is a limit, what is playable with the card, it doesn't mean you are going to get stellar performance regardless. Unity support pixel shader 2 card as min requirement but it also states that system requirements will change based on the complexity of the project you are working on. So you really throwing every thing at the editor, beyond the means of your system to render it. Then complain when it performs badly.This also means that any game I developed with my system would be the min requirement for other users, I think I will start adding disclaimers and system requirements on content from now on, so that there is no excuses.

It is recommended that you develop within your systems resources, that is all.
Win7 pro, Intel 2500K @3.7ghz 660GTX 8gig ram 16tb HDD
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 16th Jul 2016 18:47
OK, you are infuriating. I have already explained that I have been trying to figure out the sliders and a lot of other stuff by trial and error.

Up until this point your comments have been just about OK but now you have:

1 Inferred that I am not a reasonable person;
2 Inferred (by using the word 'genius' in a sarcastic manner) that I am stupid.

If you wouldn't mind apologising for those personal attacks I would be grateful.

Thanks..
Julian
PM
Scene Commander
Support Manager
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 18th Jul 2016 08:16
Hi all,

Please keep this civil. We will not tolerate insults, flaming, personal attacks or any statements likely to incite.

Any further breaches will have consequences.

Thanks,

SC
i7-4770s 3.10ghz - Geforce GTX 650ti

Login to post a reply

Server time is: 2024-11-25 00:36:24
Your offset time is: 2024-11-25 00:36:24