Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 3 4 ] Page 2 of 4 |
|
|||||
|
okeoke you right as always, and that's what I'm talking about, coppercube is great engine, but for some ideas better use something else. |
||||
|
Yeah the facts say optimization can't be improved, right? Behold 100 idling Slender dudes... 54 FPS... It's still not there yet... I need 6 FPS... |
||||
|
So what behaving they use? It's enemy AI or basic NPC AI, how many things they can do? |
||||
|
Walking around smacking into each other like morons at a convention right now... |
||||
|
Could you share what optimizations you've done? Can you share the video? From the screenshot it looks like these are static meshes that just sit there. edit 1 Also what is your PC configuration? edit 2 Also can you share the ccb file? |
||||
|
I'll share it all when I am done with it. There's still more optimizations with the code I can do (it's also sloppy af). I need to know what Sam means by behaviors? What do they need to do to be *legit* NPCs? I didn't feel like messing with Mixamo last night, so I just downloaded this model and ran with it. It's doing some breathing idle. Here's the link: https://sketchfab.com/3d-models/... |
||||
|
First of all as NPC they should be able to find way to something and interact with something, off course they have to interact with player... All basic NPC behaviour, nothing special. |
||||
|
Guest wrote: I'll share it all when I am done with it. There's still more optimizations with the code I can do (it's also sloppy af). I need to know what Sam means by behaviors? What do they need to do to be *legit* NPCs? I didn't feel like messing with Mixamo last night, so I just downloaded this model and ran with it. It's doing some breathing idle. Here's the link: https://sketchfab.com/3d-models/... Well ok. Can you say what exactly have you done - no What have you done to optimize it - ignored Can you share what you've done - no Can you share the ccb, so we can see what you've done - no What configuration you have - ignored Thank you for your valuable input. |
||||
|
No optimization has been made to the models, Coppercube did it on by default. I just created this test project with the provided model by the Guest, and I am getting 63 FPS with the default AI behavior applied to it. I created 100 clones of the animated models during runtime and is not getting a single frame drop. but as soon as I go above 100 animated models framerate starts to drop quite quickly. So @guest didn't made any optimizations on the model or anything itself. here is the project file if you wanna try it out. https://drive.google.com/file/d/... The reason why the animated models cause frame drops is that they don't have automatic culling. Automatic Culling for animated meshes is disabled by default in Coppercube, So even when the animated meshes are not in the camera view. Unlike static meshes or static animated meshes, they always have box as the automatic culling method. Changing this parameter in irrlicht/irredit properties in the editor doesn't affect it in the real game. So yeah you are limited with the use of animated models in your scene for now, but maybe in a future version, @niko will fix it so that animated meshes will get culled automatically and we can use more amount of animated models, or if I ever decided to touch the C++ part again, then I will fix it myself in future. Edit:- Just to clear out more confusion, AI behaviors or any other movement or other task-related behavior. I don't think they will affect the performance in any ways, except if they are dealing with Collision in any way. So if you have Collision or something else Like collide when moved behavior then yeah, there will be performance issues but not with something like basic NPC AI, that does nothing but chase the enemy, or move from one position to another or switch animation. It's better to not get confused that AI behavior will affect the performance of animated models. Hope that clears out the confusion about why animated models are performance-intensive. |
||||
|
You know what they say about making assumptions, moderator? @okeoke I told you I'd share the file when I am done. |
||||
|
Here's yours: Look at the frame rate from my other post. |
||||
|
My assumptions are based on observation I am not blaming you as accused of something, I answered my response on the basis of observation, above is the framerate that I am getting with the file I shared. So if I am getting 63+ FPS with almost the same amount of models that you used and I didn't do optimization on my side. There are ways that you can optimize your game and the easiest simplest way is to hide the nodes, that is cull them that are not in the camera view or are occluded by other geometry. you can do that with JavaScript as well, it will boost up the performance. Or use a lower polycount for the models. simply create a proximity radius with the camera, either a box or sphere, and Hide every other animated object that is outside that radius or proximity. That's the simplest and basic way of optimizing the scene with animated models. To hide or unhide them when they are in radius with current active camera. While you never mentioned how you are optimizing or dealing with the models, and as others are doubting that you did any optimizations, I am getting almost the same FPS as your screenshot. I think I made a fair assumption based on my observation. You can call it whatever you think, but based on just a screenshot showcasing the FPS, I have no other thing to observe from your post, and my assumption is true. If we look at the above screenshot with 100 Animated default models, that haven't been optimized or altered I am getting 63 FPS. I didn't accused you, I was talking about with reference to the result I was getting. So don't take it as a negative response to yourself. What else do you want me to assume with just a screenshot and nothing else? |
||||
|
There is zero point in having 100 models in a scene if I have to hide half of them... lol... Think what you want, JIC. You're still A-OK in my book. |
||||
|
I don't have any issues with what I am in your book, here is a video showcasing the basic optimization of having animated models hidden, there are times when you want to cull them as I mentioned, that is why the term culling and occlusion culling is present in-game. That is for the same reason when you have 100+ models in your scene and you want to hide or unhide them to save performance. and if you don't like hiding them, then you can also delete them, but then if you're using an FPS game or any other game, and instead of hiding them if you delete them, then you have to respawn a fresh model then, and have to manually alter their properties if they have custom properties like health and other resources. You simply don't render the object and you are good and rendering them when they are supposed to be rendered. And to do that I found hiding and unhiding them as the best option to disable the rendering of animated objects. here is a small video showcasing the basic optimization, trick where you have so many animated models placed in your scene and you don't want them to be created during runtime but still don't want them to affect the performance. you can use something similar that I proposed or we can go with your method whenever you send the file. watch the video here, which showcases the FPS boost with hiding and unhiding objects and the performance is dependent on the polycounts of the model as well. https://youtu.be/PP9RTjEGjww I used 400 models and was getting 40+ fps when they were not visible. The actual framerate is a bit high but my recording software eats up some frames. here is the updated project file in case anybody needs it. https://drive.google.com/file/d/... it might not make any point in having the objects hidden or not, but it does make sense to me when you are creating an open-world game, or a game with so many models that you are not generating or instancing during runtime. It differs from dev to dev. Would like to see your optimization method as well, don't forget to share it when you are done with it. Edit:- YouTube is still processing the HD version of the video. |
||||
|
So, I just tried to do the culling for the animated meshes in the editor itself and I was able to do it, I will try to reproduce it and will check if I am able to turn it on again. Edit:- I should take my words back, so it seems that the culling is working just fine for the animated models, it is just my project that was having culling disabled for the inbuilt models. I tried creating a fresh project and imported the same model again and culling was working for it, I am not sure why the culling was disabled in the project that I shared, and for the inbuilt models. But still hiding and unhiding the animated object does give a boost to the performance. It doesn't make sense to let the animated models stay visible if they eat performance, that are far away from your camera, and not in front of your camera, and is affecting the performance, it is just better to hide them, it is still a good optimization technique. It will also disable all the behaviors that are attached to the animated objects, that is if collide when moved is attached or any other behavior that you guys think is responsible for affecting the performance, that is fewer calls to the script and other stuff if the animated object is not visible, only show those object that is in the camera field of view... So its a ++, for optimization. |
[ 1 2 3 4 ] Page 2 of 4 |
|