snow_zhangy Posted July 24, 2013 Share Posted July 24, 2013 Today I try to export a room model with several furnitures from max to a node. When i reference the node in the a empty world and look around, i noticed that the fps drops unusually fast when i look at some direction. If i look at the whole mesh from distance , fps could be 40 or more. So I open the profiler and the update process take more than 5kms sometimes when fps drop. Other processes looks all good. I looked at the document, it says update is the total time ofworld update script and the number of objects,particles. But i have only a empty level so the world script should be fine. Also i have no particles and around 1000 objects in the level. It looks maybe some mesh is not optimized, but I already checked the "optimize vertex" option when export. Anyone met similar issue before? any suggestion to dig this out? thanks Yang Link to comment
snow_zhangy Posted July 26, 2013 Author Share Posted July 26, 2013 I attach an image which show a different model but have the same issue. there are a 187 meshes in the level. the update now drop dramatically when look at some part of the mesh and freeze at last. it's is a block issue for me, hope someone could help. thanks Yang Link to comment
ulf.schroeter Posted July 26, 2013 Share Posted July 26, 2013 your model is most probably simply far too complex ( 5 million triangles, 600+ surfaces, 700+ mb textures). Do you have surface LOD's so some heavy-weight surfaces are automatically deactivate in the distance (as an explanation for the fact that the model shows good performance in the distance) ? Could you provide a screenshot with performance data for that case to see the differences ? Also in the past we encountered some update performance drops caused by collision detection when models were more complex. You could check this guessing by deactivating collision testing on ALL model surfaces. Link to comment
snow_zhangy Posted July 26, 2013 Author Share Posted July 26, 2013 hi Ulf: thanks for you feedback. I attached the distance view. The update only take 1ms. I also tried to disable collider, but not help. Only thing i noticed from the profiler when look closer is that "Allocation" change from 3 to more than 1000. Yang Link to comment
ulf.schroeter Posted July 27, 2013 Share Posted July 27, 2013 Strange. Next idea would be to run your world with debug version main_x86/64d.exe and use engine_-/world_analyze to dump timing statistics (deactivate multi-threading to get accurate timings). Maybe this will give an indication were the frame time is 'burned' when zoomed in. https://developer.unigine.com/en/docs/1.0/getting_started/console/performance_analyzer Link to comment
nat.harrold Posted July 28, 2013 Share Posted July 28, 2013 Strange Indeed. Interesting problem. Unfortunately nothing to add. Thinking.. Link to comment
nat.harrold Posted July 29, 2013 Share Posted July 29, 2013 Hi Yang & Ulf, I loaded up one of our big ones, to mimic the kind of high poly, high texture memory worlds. I thought I had seen these spikes in update before... see attached. A drop in present, spike in update, though for us, perhaps our gpu has just enough muscle to not be caught on the spike and recover very quickly (GTX770). This means there is just a small glitch or a few milliseconds freeze. The spike (for us), happens when surfaces &/or meshes are loaded, when panning or moving toward (which might suggest hard drive speed bottleneck) I wasn't able to hit the screenprint button fast enough to capture the stats at the spike, though I could see allocations increase quite significantly, only to recover very quickly. Maybe the pipes just get full with crazy amount of data, though, perhaps it is also a combination of a stall loading from the hard drive. Thoughts..? Perhaps (after trying Ulf's suggestion), running textures on medium quality to free up some gpu memory and see if the issue persists as an easy test. N. Link to comment
snow_zhangy Posted July 29, 2013 Author Share Posted July 29, 2013 hi Ulf and Nat: I attached the model hope you could reproduce my problem. I removed all the textures and reduced most of the meshes down to 4. I still meet the update issue even with those 4 meshes. The allocations grows fast to almost 1k. simply change the .node reference meshes path and ref into your level. I think it's an mesh optimized issue but I don't know how to optimize it, and it should not be that slow. Edit: I tried engine_analyze, it show world::update_single() use alot of the cpu time total self total self ms/frame ms/frame calls ms/call ms/call name 52.308 52.300 2109 52.3085 52.3004 World::update_single() 1.896 1.605 2109 1.8961 1.6046 RenderRenderer::render_world(const char*,int) 53.038 0.722 2109 53.0377 0.7219 World::update() 0.545 0.392 2109 0.5453 0.3915 RenderPost::renderOcclusionAmbient(RenderDeferred*,Texture*&,Texture*&) 0.521 0.365 99123 0.0111 0.0078 RenderPost::renderPostMaterial2D(Material*,const RenderPostTexture*) 0.350 0.238 2109 0.3504 0.2383 RenderScene::getIntersection(BoundFrustum&,Occluder&,const Vector<Node*>&) 0.137 0.129 2109 0.1370 0.1292 WorldSpatial::getIntersection(const BoundFrustum&,const Mat4&,Vector<Node*>&) 0.121 0.100 2109 0.1213 0.0997 RenderLights::get_light_world_shadow_surfaces(LightWorld*,const Vector<Node*>&) 0.131 0.079 101232 0.0027 0.0017 RenderRenderer::setShader(int,Shader*) 0.335 0.072 2109 0.3350 0.0724 RenderPost::renderHDR(Light*,RenderDeferred*,RenderScreen *screen,Texture*,Texture*&,Texture*&,Texture*&) 0.058 0.055 2109 0.0584 0.0554 WorldSpatial::update_intersection(const WorldBoundFrustum&,Vector<Node*>&) 0.054 0.054 107559 0.0011 0.0011 RenderState::setMaterial(int,Material*) 0.134 0.048 32325 0.0087 0.0031 ObjectMesh::render(int,ObjectSurface*) 0.097 0.048 4218 0.0486 0.0238 RenderPost::render_hdr_average(Texture*,Texture*&) 0.086 0.037 32325 0.0056 0.0024 RenderRenderer::setObjectSurface(int,ObjectSurface*,Shader*,Material*) 0.148 0.037 2109 0.1483 0.0373 World::getIntersection(const BoundFrustum&,const Mat4&,Vector<Node*>&) 0.036 0.036 112467 0.0007 0.0007 RenderRenderer::setShaderMaterialParameters(int) 0.031 0.031 112467 0.0006 0.0006 RenderRenderer::setShaderParameters() 0.117 0.022 2109 0.1171 0.0217 RenderPost::renderDOF(RenderDeferred*,RenderScreen*,Texture*&) 0.021 0.021 2109 0.0206 0.0206 WorldSpatial::getIntersection(const WorldBoundFrustum&,const Vec3&,float,Vector<Object*>&) 0.018 0.018 7017 0.0053 0.0053 SortSurfaceShader(Vector<ObjectSurface*>&,int) 0.037 0.017 2109 0.0369 0.0173 RenderLights::render_shadow_world(LightWorld*,Vector<ObjectSurface*>*) 0.043 0.016 2109 0.0434 0.0165 RenderPost::renderComposite(RenderDeferred*,RenderScreen *screen,Texture*,Texture*,Texture*,Texture*,Texture*,Texture*,Texture*,Texture*,Texture*) 0.038 0.014 2109 0.0377 0.0139 RenderRenderer::render_visualizer(RenderScene*) 0.039 0.013 2109 0.0394 0.0132 D3D11RenderPost::renderScattering(Light*,RenderDeferred*) 0.017 0.013 2109 0.0166 0.0129 RenderRenderer::render_deferred_queries(RenderScene*) 0.011 0.011 8436 0.0028 0.0028 RenderLights::set_light_world_parameters(LightWorld*) 0.176 0.011 2109 0.1757 0.0106 RenderLights::renderShadows(RenderScene*,const Vector<Node*>&) 0.011 0.010 2109 0.0106 0.0105 World::update_intersection(const BoundFrustum&,const Mat4&,Vector<Node*>&) 0.010 0.010 2109 0.0098 0.0098 RenderManager::update() 0.009 0.009 15453 0.0012 0.0012 MakeSurfaceChain(Vector<ObjectSurface*>&,int) 0.008 0.008 34132 0.0005 0.0005 WorldSpatial::getCollision(const WorldBoundBox&,Vector<Object*>&) 0.045 0.007 2109 0.0454 0.0070 RenderLights::render_light_world_surfaces(LightWorld*,const Vector<ObjectSurface*>&,int) 0.029 0.007 2109 0.0285 0.0068 RenderRenderer::render_ambient_surfaces(Vector<ObjectSurface*>&,LightWorld*) 0.029 0.005 99123 0.0006 0.0001 RenderRenderer::setMaterial(int,Material*) 0.005 0.005 4218 0.0023 0.0023 WorldSpatial::updatePosition(WorldPosition*) 0.059 0.003 2109 0.0590 0.0035 RenderRenderer::render_deferred_surfaces(Vector<ObjectSurface*>&) 0.084 0.003 2109 0.0838 0.0034 RenderRenderer::render_scene_opacity(RenderScene*,RenderDeferred*) 0.674 0.003 2109 0.6737 0.0031 RenderRenderer::render_scene(RenderScene*,RenderDeferred*,RenderScreen *screen,Texture*&,Texture*) 0.004 0.003 2109 0.0043 0.0030 WorldSpatial::update() 0.048 0.002 2109 0.0481 0.0024 RenderPost::render_hdr_cross(Material*,Texture*) 0.003 0.002 895 0.0071 0.0054 Editor::getIntersection(const Vec3&,const Vec3&,const Vector<Node*>&,Vec3&,vec3&,int&) 0.165 0.002 2109 0.1646 0.0021 RenderLights::render_light_world_shadow(LightWorld*,const Vector<Node*>&) 0.002 0.002 6327 0.0007 0.0007 SortLight(Vector<Light*>&) 0.002 0.002 12654 0.0003 0.0003 UpdateSurfaces(Vector<ObjectSurface*>&,const Vec3&) 0.002 0.002 4908 0.0008 0.0008 RenderLights::setShaderLightParameters(int) 0.019 0.002 2799 0.0147 0.0012 RenderLights::render_shadow_opacity_surfaces(Light*,Vector<ObjectSurface*>&) 0.036 0.002 2109 0.0358 0.0016 RenderLights::render_light_receive_surfaces(Light*,Vector<ObjectSurface*>&,int) 0.001 0.001 2109 0.0013 0.0013 WorldManager::update() 0.024 0.001 4218 0.0119 0.0006 RenderRenderer::render_wireframe_surfaces(Vector<ObjectSurface*>&) 0.042 0.001 2109 0.0417 0.0012 RenderRenderer::render_scene_transparent(RenderScene*,RenderDeferred*,int) 0.001 0.001 8436 0.0003 0.0003 RenderRenderer::render_transparent(RenderScene*,RenderDeferred*,int,int) 0.001 0.001 2109 0.0009 0.0009 RenderScene::hasVelocity() 0.001 0.001 2109 0.0009 0.0009 WorldSpatial::add_positions() 0.001 0.001 2109 0.0009 0.0009 RenderScene::update_intersection() 0.047 0.001 2109 0.0468 0.0008 RenderLights::renderOpacitySurfaces(RenderScene*,const Vector<ObjectSurface*>&,int group) 0.001 0.001 2109 0.0008 0.0008 RenderScene::hasAuxiliary() 0.001 0.001 2109 0.0008 0.0008 RenderRenderer::setShaderMaterialAmbientParameters(int) 0.001 0.001 2109 0.0007 0.0007 WorldSpatial::getIntersection(const WorldBoundSphere&,Vector<LightWorld*>&) 0.001 0.001 895 0.0017 0.0017 WorldSpatial::getIntersection(const Vec3&,const Vec3&,Vector<Object*>&) 0.001 0.001 2109 0.0007 0.0007 RenderLights::render_light_prob_surfaces(const Vector<ObjectSurface*>&,int) 0.001 0.001 7273 0.0003 0.0002 WorldSpatial::flush() 0.001 0.001 2109 0.0006 0.0006 Physics::flush() 0.001 0.001 2109 0.0006 0.0006 RenderRenderer::render_reflections(RenderScene*) 0.001 0.001 2109 0.0006 0.0006 RenderLights::setShaderMaterialLightParameters(int) 0.001 0.001 2109 0.0005 0.0005 RenderScene::linearize() 0.001 0.001 2109 0.0005 0.0005 RenderScene::hasEmission() 0.000 0.000 2109 0.0005 0.0005 SortSurfaceDistance(Vector<ObjectSurface*>&,const vec3&) 0.000 0.000 8436 0.0001 0.0001 WorldSpatial::getIntersection(const WorldBoundBox&,int,Vector<Node*>&) 0.000 0.000 2109 0.0003 0.0003 RenderPost::renderFade() 0.001 0.000 7273 0.0002 0.0001 PhysicsScene::restoreContacts() 0.000 0.000 2109 0.0003 0.0003 SoundManager::update() 0.000 0.000 2109 0.0002 0.0002 RenderRenderer::render_procedurals(const Vector<Material*>&) 0.000 0.000 2109 0.0002 0.0002 RenderRenderer::render_ambient_object_decals(Vector<ObjectDecal*>&,LightWorld *light) 0.000 0.000 2109 0.0002 0.0002 RenderRenderer::render_deferred_decal_renders(Vector<DecalRender*>&) 0.000 0.000 2109 0.0002 0.0002 RenderLights::renderObjectDecals(RenderScene*,const Vector<ObjectDecal*>&) 0.000 0.000 2109 0.0002 0.0002 RenderRenderer::render_deferred_object_decals(Vector<ObjectDecal*>&) 0.000 0.000 2109 0.0002 0.0002 RenderRenderer::render_ambient_decal_renders(Vector<DecalRender*>&,LightWorld *light) 0.000 0.000 2109 0.0001 0.0001 RenderLights::renderDecalRenders(RenderScene*,const Vector<DecalRender*>&) 0.000 0.000 2109 0.0001 0.0001 RenderRenderer::render_deferred_surfaces(Vector<ObjectSurface*>&,int) 0.004 -0.002 7273 0.0011 -0.0005 Physics::simulation_multiple(float) 0.001 -0.002 6327 0.0004 -0.0006 WorldSpatial::getIntersection(const WorldBoundSphere&,int,Vector<Node*>&) 0.000 -0.007 6327 0.0001 -0.0022 WorldSpatial::getIntersection(const WorldBoundFrustum&,int,Vector<Node*>&) 0.004 -0.008 152544 0.0001 -0.0001 RenderState::setMaterial(Material*) 0.086 -0.029 7273 0.0248 -0.0083 WorldSpatial::getCollision(const WorldBoundSphere&,Vector<Object*>&) 0.019 -0.047 7273 0.0055 -0.0135 World::flush() 0.123 -0.094 7273 0.0356 -0.0273 PhysicsScene::getIntersection(const BoundSphere&) 0.001 -0.180 2109 0.0014 -0.1802 PathFind::update() 0.152 -1.290 2109 0.1523 -1.2898 Physics::update() thanks EDIT: update the new meshes file Yang ExpTest2.rar Link to comment
nat.harrold Posted July 29, 2013 Share Posted July 29, 2013 Hi Yang, you included in the test files: /meshes/Muscular_Infraspinatus.mesh node calls for: <mesh>/meshes/Muscular_Interspinales.mesh</mesh> no update problems with the other 3 meshes. * edit - or 4th one you included. Link to comment
snow_zhangy Posted July 29, 2013 Author Share Posted July 29, 2013 hi Nat: sorry, i included the wrong file. Just download it again , I already put it back. Strange , i still could reproduce it even with 2 meshes. you need very close and even go half though the mesh. Yang Link to comment
nat.harrold Posted July 29, 2013 Share Posted July 29, 2013 Hi Yang, I downloaded again, unfortunately I could not replicate any change in update, no matter how I viewed your meshes (whether 2 or all of them). Hope you get to the bottom of the problem. Have you got another computer you could test this on? Cheers, N. Link to comment
snow_zhangy Posted July 29, 2013 Author Share Posted July 29, 2013 hi Nat: I think I messed up the engine somewhere. Anyway, after I did a clean install, everything looks back to normal. sorry about that. Will do more test before I post Yang Link to comment
Recommended Posts