VeTaL Posted August 13, 2011 Share Posted August 13, 2011 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. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
f13rce Posted September 3, 2011 Author Share Posted September 3, 2011 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 Quote 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 More sharing options...
Josh Posted September 4, 2011 Share Posted September 4, 2011 It doesn't have thousands of bones, or something like that does it? You should post the model in question. 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...
f13rce Posted September 4, 2011 Author Share Posted September 4, 2011 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. Quote 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 More sharing options...
franck22000 Posted September 4, 2011 Share Posted September 4, 2011 Can you show us the look of the UV map ? Quote You guys are going to be the death of me. Josh Link to comment Share on other sites More sharing options...
f13rce Posted September 4, 2011 Author Share Posted September 4, 2011 (edited) Can you show us the look of the UV map ? Sure: 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. 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 September 4, 2011 by Evayr Quote 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 More sharing options...
Mumbles Posted September 4, 2011 Share Posted September 4, 2011 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? Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
f13rce Posted September 4, 2011 Author Share Posted September 4, 2011 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. Quote 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 More sharing options...
Josh Posted September 5, 2011 Share Posted September 5, 2011 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. 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...
f13rce Posted September 5, 2011 Author Share Posted September 5, 2011 Found it in post #9, nothing has been changed since then: Download Have you by the way found anything special on the viewmodels? Quote 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 More sharing options...
Josh Posted September 5, 2011 Share Posted September 5, 2011 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: 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/ 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...
f13rce Posted September 5, 2011 Author Share Posted September 5, 2011 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. Quote 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 More sharing options...
paramecij Posted September 5, 2011 Share Posted September 5, 2011 If you are using arbuz 3dmax exporter, you have to be careful with export material id's option.. this can lead to unnecessary surfaces (check the manual) as Josh pointed out Quote Link to comment Share on other sites More sharing options...
f13rce Posted September 5, 2011 Author Share Posted September 5, 2011 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. Quote 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 More sharing options...
Canardia Posted September 5, 2011 Share Posted September 5, 2011 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? Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Josh Posted September 5, 2011 Share Posted September 5, 2011 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. 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.