Jump to content

Low FPS


f13rce
 Share

Recommended Posts

What also bothered me a LOT is that the lighting and shadows take a LOT of FPS.

This is trouble forme too.

 

Working on the same thing: trying to optimize level to make fps higher.

http://www.leadwerks.com/werkspace/topic/3728-fentinor-build/

 

 

It would be nice if Josh and other experienced guys would write a collection of tips for modelling, ligtning and leveldesign.

Working on LeaFAQ :)

Link to comment
Share on other sites

  • 3 weeks later...

I've found the problem!

 

It has something to do with the viewmodel. Can't really tell exactly what. When I'm holding the viewmodel I'm having an FPS of solid 60 (vsync off)... but when I switch to my CreateCube() gun (without calling HideEntity on the first gun) I'm having an FPS of ~200 (remaining first gun on the same position and rotation in the view!). Without the M9 on the screen I get ~230.

 

I tried to resize the textures since they were pretty big (1024 and 2048) to 256 and 512, but that didn't affect the FPS a lot.

I neither think it's the polycount since all the viewmodels are beneath 5k poly including arms. Also the FPS gained with ~140 after I didn't hide my other gun.

It can't be the animation because some guns don't have animations yet but also take down the FPS.

 

The only things I'm doing with the weapon models are animating, positioning and rotating it; Nothing special. I do not have an extra buffer so they can get through walls.

 

Anyone got an idea what could cause this problem? And is there perhaps an alternative for HideEntity (maybe that will work)?

 

Thanks a LOT in regards,

 

Ivar / Evayr

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

I've posted two viewmodels, one is animated (the M4A1) and the other isn't (M9). I've also included my export settings.

 

And not at all, they don't have thousands of bones or so. If you want I could send you the .Max too.

 

ExportSettings.jpg

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

Can you show us the look of the UV map ? ;)

Sure:

UVM4.jpg

 

The UV on the other guns look about the same.

I know it isn't the way how a pro would, but at least this works. :o

 

Edit: It isn't the polycount either; I tried it with a more high poly rifle and it only costs 5 more fps at its max.

Edited by Evayr

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

On 2.2x the ssao shader seemed to hate being inside a model. I'm sure you've thought of this already, but if ssao is on, does the model cut through the camera?

Thanks for the reply. I haven't enabled SSAO since Frameworks doesn't like it for some reason. Instead I've tried to get the camera in the weapon after switching to the other one... but it didn't affect the FPS. Good call though. ;)

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

I helped Vetal with his problem. It's usually very easy for me to determine what's wrong, but I haven't seen your scene uploaded, unless I missed it. 315 entities is not a lot at all, but it's all just speculation until I take a look at your demo and the actual scene in the editor.

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

Found it in post #9, nothing has been changed since then: Download

 

Have you by the way found anything special on the viewmodels?

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

I can tell you right away what the problem is. It says about 3000 batches are being drawn! ;)

 

Just opening one model, we see extreme inefficiency here. Lots of unnecessary entities, and lots of unnecessary surfaces on each. This turns what would have been about four batches into about 40:

post-1-0-21776300-1315246249_thumb.jpg

 

I ran the gmfprocess tool and then the map had less than 500 batches, and the framerate more than doubled:

http://www.leadwerks.com/werkspace/files/file/140-gmf-optimizer/

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

Wow, how the...

Anyway, thanks a lot for the help Josh. Any idea how to optimize the animated viewmodels too? Then it would be perfect.

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

If you are using arbuz 3dmax exporter, you have to be careful with export material id's option.. this can lead to unnecessary surfaces as Josh pointed out

That must exactly have been the problem. Thanks.

Using Leadwerks Professional Edition (Beta), mainly using C++.

Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz

Previously known as Evayr.

Link to comment
Share on other sites

I noticed something wierd in LE 2.5 today: If I have an animated model, all the bones are created as seperate entities in the main world and called Joint<number>. What's up with that? Can I remove them?

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Wow, how the...

Anyway, thanks a lot for the help Josh. Any idea how to optimize the animated viewmodels too? Then it would be perfect.

You can't automatically optimize animated models, because there's no way to tell which limbs are wanted and which are not. Just make sure you aren't doing anything crazy in 3ds max and it will export whatever you have. If you aren't sure what's going on, check the GMF file out in the model viewer.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...