Jump to content

[SOLVED] Low fps can't find bottleneck


photo

Recommended Posts

Testing the engine with a building obj, created from a BIM ifc file.

The obj does have 470k poly, my scene is rendering at 10fps. Only standard material applied, no ongoing compilation. 

Windows task manager state the CPU (Ryzen 2600X) is working at about 10%, the GPU (old AMD HD7950 Boost) at about 15% with 1GB VRAM used (over 3 available).

Disabling any of the rendering effects didn't make any difference, the performance profiler state 95% of the time is passed on CPU, how is this possible since appear not to be used?

image.thumb.png.f97f92e7ed09e4bc294d152de5c8d278.png

Edited by davide445
Link to comment

Hi,

Indeed, it looks strange. Let's check the following:

  1. There's only one object in the scene - this building, right?
  2. Try disabling Collider Object option for all meshes in this object. You can do it with multiselection.
  3. If this doesn't work, please, send us a microprofile dump: https://developer.unigine.com/en/docs/2.7.3/tools/profiling/microprofile/

If you want to know more about microprofiler this video might be helpful:  https://www.youtube.com/watch?v=FJGn7QYtEUg

And may I ask you to attach this obj file so we can check what's causing this performance drop?

Thanks.

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hi thanks for answering

1. Yes it's the only one

2. Disabled for the whole group of objects and didn't changed anything

3. Attached the dump

I can't attach the obj since it's a commercial project, I have sent it to you in PM.

There is for sure a problem with the generated mesh (seen some strange cylinder protruding from the building, I received the converted file from the company that worked on the project), but considering standard Win10 tools such as 3D Viewer can open and navigate it without problems I was curios to know why in Unigine is going so slow.

84c749c5177e9f4b36efde9dfab3524dc3765a67.csv

Edited by davide445
  • Like 1
Link to comment

Thanks,

The issue is the enormous number of created meshes and huge xml structure this file creates.

However, we have a couple of import stage optimization for such assets, try reimporting your obj with the following options:

  • merge static meshes
  • merge surfaces by materials
  • merge similar materials

This made the model much friendlier for real-time. You can find out more on our importer here: https://developer.unigine.com/en/docs/2.7.3/editor2/fbx/

Best regards

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Indeed merging the whole components jump the fps to 80-90. Merging only the materials seems to add about 20% performance but we are still at 12fps.

Since one of my goals is to produce a timelapse such as in this Oil Refinery demo

there is a way to achieve it without having the single components?

Edited by davide445
Link to comment

The proper way to do this is to adjust your model and make bigger meshes that can be turned on gradually. 

In any case, it will require changing model in 3rd party editor. Maybe the fastest way to do this is to change some parameter in the default materials. For instance, you can make the basement red, walls green, and the roof blue. Then just import your model to the UnigineEditor with all merging option enabled. As a result, you'll get 3 different surfaces in one mesh that can be turned on and off independently.

Thanks.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Unfortunately for my goal I can't do this, since I need to maintain separate every labeled asset in the original ifc file, from widows to walls. 

Is possible to use material maps on so many components, and play with alpha?

Or if I good remember is possible to dynamically load the various components in the simulation, so to only progressively slow down proceeding with the time lapse. 

Edited by davide445
Link to comment

It has over 9000 of meshes, do you need to keep all of them as single nodes?

Real-time processing of this model will require some optimisation. You've referenced to the Oil Refinery stages of construction mode, but in fact, it uses quite big parts and all of the typical meshes are baked into clusters: https://developer.unigine.com/en/docs/2.7.3/objects/objects/mesh_cluster/

Could you consider merging all similar objects? Or this is not an option?

Thanks.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Missed a couple of things in your previous message.

28 minutes ago, davide445 said:

Is possible to use material maps on so many components, and play with alpha?

Not sure what do you mean by material maps. May I ask you to explain a little bit more?

28 minutes ago, davide445 said:

Or if I good remember is possible to dynamically load the various components in the simulation, so to only progressively slow down proceeding with the time lapse. 

Well, in this case, you'll get 10fps in the end of the simulation. Or you need a video only, not the real-time rendering?

Could you tell us more about the desired result? How should it look like, how detailed the timelapse should be?

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

The time lapse need to follow a building daily and weekly project plan, that for sure can aggregate some things but as example not of the same kind (so not possible to use clusters from what I have read of them, different meshes involved). 

I was meaning material slot, sorry my mistake. 

The result will be a video, but with all possible angles, weather conditions, dirt, etc and also in parallel for different projects so rendering it at 10fps might be a disadvantage in term of time and needed resources, even if it's not blocking. 

In future plans will be needed an interactive usage so interested to explore optimization options. 

Edited by davide445
Link to comment
On 3/16/2019 at 8:29 PM, davide445 said:

The time lapse need to follow a building daily and weekly project plan, that for sure can aggregate some things but as example not of the same kind (so not possible to use clusters from what I have read of them, different meshes involved).

I'll describe you possible ways of achieving this and some problems that could appear.

Meshes in Unigine are composed of surfaces. Surfaces are the engine-specific term. When you import some 3d model all polygons with unique material (assigned in the 3rd party app) are imported as a surface. All materials, stored in the model are imported as well.

1. It is possible to simulate the building process with all details included in your model at a cost of performance. Not sure that HD 7950 will give you at least 25 frames per second, I have around 25 fps with GTX 1080 with shadows disabled. If you want to work with this content "as is" number of materials and their unreadable names also could be a problem. After all, you'll be able to get a pre-rendered frame sequence for the video.

2. You also can do this with merged geometry. As I noticed before, surfaces are created respectively to the unique materials assigned to some polys. In this case, you can enable/disable surfaces via API instead of meshes. This will be much faster. Just import your model with merge similar materials checkbox disabled to get such mesh. The number of materials and their names still will be a problem.

3. You can modify this building model according to your needs. By modifying I mean the manual merging of geometry, materials tweaking. I'd expect as a result single meshes for each construction phase with optimized materials number. The main issue here is the time that could be taken on this work :)

On 3/16/2019 at 8:29 PM, davide445 said:

In future plans will be needed an interactive usage so interested to explore optimization options. 

Real-time rendering will require noticeable editing of this model. In general, the less unique meshes and materials are rendered - the faster it will work.

I hope it'll help you.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hi davide,

we are also currently evaluating the import of medium and large sized BIM models without any "too complicated" import settings for the user. Using the raw BIM data can be really difficult but I can give you some hints what we are achieved.

 

  1. Get rid of the unique object IDs: Remove (either in your extern modeler or via code) the IDs with squared brackets. After that we group all of those objects with the same name (luckily the BIM objects have a unique name) and creating an object mesh cluster for that one. This looks quite promising for us.
  2. Create LODs by yourself: This step is really important because BIM objects can be easily unoptimized regarding their pure triangle and vertices count. You can create create LODs via an algorithm. Take a look at MeshLab (http://www.meshlab.net/mesh). This open source project have an library for generating LODs for you.
  3. Create an object atlas for render distance: Currently the hardest one, but we created an atlas for pipes, light switchers e.g. and storing their min/max render distance in it. During import state (where we also group our objects), we check our database and setting the proper distances. Not the most elegant form but worth a try.

 

Hope that helps a little bit.

Cheers!

  • Like 2
Link to comment

@christian.wolf2 thanks for the useful hints.

Working with a team using xBIM library to manage ifc assets, we are able to import and visualize them on the web, also doing time-lapse but on very simple shading model.

For the project I'm planning there are doubts a webGL engine will be able to produce realistic visuals, that's why I'm evaluating Unigine. 

Our main driver is doing all automatically without previous human intensive preparation, from what you wrote I understood you have many manual steps in your work flow? 

Link to comment

Actually not. For now, we are using only FBX models. Our workflow is exporting the complete project from Revit into 3ds max and export them again to fbx for UNIGINE compliance. For version 2.8 a direct BIM import was mentioned, so we started with dealing plain object data (no surface collapse, no optimization before) and manipulating them afterwards.

What we are trying to achieve is to let the enduser only select a BIM file (.ifc/FBX) and the program will did anything else. Therefor our first and foremost priority is to minimize the manual steps as much as possible. So, we are at the same position as you. :)

Edited by christian.wolf2
Link to comment

Christian I didn't know where are you located, maybe make sense to have a contact since I'm planning the project in question and we want to achieve the same goal. I have sent you a PM. 

Edited by davide445
Link to comment

@morbid about the low fps topic I did just have a test on Unreal Studio for comparison, trying to load all the >9000 meshes in the viewport.

I can't really complain about Unigine, in Unreal after 1 hour loading and 120GB of virtual memory (32GB of RAM filled) I finally give up, without being able to do anything.

So good for Unigine to be even able to achieve 12fps!

For sure this is a trivial way to work and there are optimizations helping, but interesting to feel what is Unigine capable of.

  • Like 1
Link to comment

I'm not developing, just exploring for feasibility and planning purpose. Right now Unigine appear to have an edge over Unreal, need to complete the evaluation on all the topics.

I'll probably ask on other different topics as soon I check them, thanks in the meantime!

Link to comment
  • morbid changed the title to [SOLVED] Low fps can't find bottleneck
×
×
  • Create New...