- Home /
Very strange geometry issue, causing huge drops in frame rate
Hi folks!
I have quite a strange problem to solve and was wondering what you guys think about this.
I am working on a fairly huge polygonal object (very detailed architecture). I split it down to multiple sub-meshes to get it under the 65k barrier. What I am observing now is that, in a naked Unity scene with nothing else in it despite a camera and these objects with their standard shader assigned, some of the objects are killing frame rate quite seriously. When I switch them off, the statistics window reports a frame rate of 550 fps (rendering 1.0M Tris, 1.5M Verts, 213 Draw Calls on a 1920x1064 resolution), which is great. But when I turn these objects back on again, I am running at 3.3fps (now rendering 1.8M Tris, 2.7M Verts, 239 Draw Calls on the same resolution), which is, of course, catastrophically bad. Especially considering that I have only very few (26) additional draw calls to render, with a combined triangle and vertex count difference (+800K and +1.2M respectively) that should be no problem for a ATI HD 4870. When I switch on only one of these problematic geometries, the frame rate drops from 550 down to 75 in an instant. Switching on a second problematic object cuts these remaining 75 fps in half. And so does every additional one.
These problematic geometries seem to differ in no way from the other 213, that are drawing just fine.
So what I want to know from you guys is: Have you ever encountered a similar problem, and if yes, were you able to put a finger on the problem? I'd appreciate every hint that helps me to get this resolved. Thanks in advance!
Answer by Edy · Aug 29, 2010 at 09:48 AM
I'd take one of those objects apart together with a good-working one, load them into the 3D editor, and look for any differences in the geometry. Maybe the problematic object has single triangles instead of triangle-strips, or overlapping geometry, or something like that. If you cannot find anything relevant, I'd try subdividing that object into smaller ones until finding the exact portion of the geometry causing the issue. This should make easier to find the cause of the problem.
I did what you said. I dissected it for hours now and was not able to find any differences or errors of any kind with these objects. No single triangles (that I am aware of), no overlapping geometry, no nothing. I then did the other thing you wrote, subdividing the object into smaller parts to find out which one is at fault. This lead me to a few quite strange observations: - There are in fact some parts of the geometry that slow things down, but they are in no way different to the other ones. [to be continued...]
Repeating this splitting into smaller objects with the same original object results in other parts being slow that were perfectly fine before. - - - So judging by this behavior I guess that the problem lies with the FBX exporter, especially since $$anonymous$$aya's OpenGL viewport renders all objects at the same speed, no matter if problematic ones or good ones. - - - The solution now is that I need to fiddle around with every one of the 26 broken objects until all of them work. I give you the credit for this answer even though it's not exactly correct, but it pointed me into a good direction. Thanks!
Thanks! Another thing to try is using Unity's special editor views (upper left status bar at the Scene panel). Normally is set as RGB, but I'd also try Overdraw and $$anonymous$$ipmaps to see if something wrong arises there.
Answer by jtbentley · Aug 29, 2010 at 04:51 AM
Do any of these objects have colliders?
As I said: It's a naked scene, only the geometries and a camera. No physics, no colliders, no nothing.
Answer by runonthespot · Jan 19, 2011 at 12:48 PM
Can I suggest you make sure that all objects transforms are scaled to 1 (e.g. don't use the transforms on the objects in the scene to resize objects). If objects are the wrong size in relation to each other, fix it by setting the scale at fbx import stage.
This was an issue that I had when certain meshes killed the framerate.
Your answer
Follow this Question
Related Questions
Animation of terrain causes drastic performance drop (fps) 0 Answers
Opening profiler increases FPS 1 Answer
unity cant run my movement code smoothly 0 Answers
Total memory allocated increases indefinately from .80GB untill crash 3 Answers
Frame Rate jumps between 20 to 8000 ( in thousands) continuos and periodically. 0 Answers