FireAndIce22 Posted January 26, 2016 Share Posted January 26, 2016 I am using vegetation to generate a lot of trees, and I have noticed when collision is turned on for them, the framerate drops significantly (about 60 to 20 FPS), but only when actually colliding with a tree (like walking into one). It continues to stay low until I stop colliding with the tree. I'm assuming this is a bug and isn't just a limitation of the engine, since it should only processing one collision. There does seem to be some framerate drop when colliding with other objects in the world as well, so it may have to do with how much vegetation is being shown. It's strange that a single collision would drop the framerate from 60 to around 20 though. Link to comment Share on other sites More sharing options...
Josh Posted January 26, 2016 Share Posted January 26, 2016 Is the tree model one of ours, or something you added yourself? 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...
reepblue Posted January 26, 2016 Share Posted January 26, 2016 I just tested it with the stock assets, and for me, it's the shadows that lower my framerate. I've set my directional light to Static+Dynamic+Buffered is this correct for the swaying of the branches? 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...
Brutile Posted January 26, 2016 Share Posted January 26, 2016 I can confirm it's not just trees. I have a scene that runs at 100fps. When I shoot at the enemy I have, he stars chasing me. At that point, it drops to 30fps. When I kill him, it goes back to 100fps. When I collide with his dead body (just a cylinder) the fps drops back to 30. Edit: I believe it has to do with the dynamic shadows. When there is 1 light and something moves that casts shadows, the fps drops to 50. The same scene with 2 lights drops to 30. Edit: Making the lights Static only, the frame rate stays at 100. Link to comment Share on other sites More sharing options...
Josh Posted January 26, 2016 Share Posted January 26, 2016 It's meaningless to post a verbal description of performance. If you have a specific map you would like me to look at, please make the files available. 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...
Brutile Posted January 27, 2016 Share Posted January 27, 2016 Sorry Josh, I live in Australia. Uploading 300mb would literally take a whole day. Can someone else with the same problem upload theirs? I was trying to find out why this was happening, so I loaded up the example project. I matched everything the same, but for some reason, mine is being weird. Using the same settings, my rigidbody props would cast static shadows that would be baked into the scene and would stay there even when the prop moves. I will investigate further. The only thing different is the materials, so I'll have a look and see if I can find anything there. Link to comment Share on other sites More sharing options...
Brutile Posted January 27, 2016 Share Posted January 27, 2016 I think I might be onto something. I can't upload my game, but you can use the FPS template to recreate it. 1. Create a new project based on the FPS template. 2. Delete the camera and directional light. 3. Place the player. 4. Add either a point or spot light. 5. Give the cube some mass. 6. Load the game and move the cube. You should be able to see that the shadow doesn't move with the cube. Change the cube to dynamic shadows, then you will see the fps drop. While the directional light always has shadow polygons being rendered, with a point light, it is 0 until the object moves. It seems like its baking the entire scene when something moves. Link to comment Share on other sites More sharing options...
Josh Posted February 3, 2016 Share Posted February 3, 2016 This is being closed since the OP has not provided a file to test. 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