Jump to content

photo

Recommended Posts

Hello everyone,

I'm working on projects like.... creation of virtual sets using Unigine Editor.

But I'm looking for optimization methods to bring more FPS... 

Already studies "superposition benchmark" to get know how to optimize....

i got know that in S.positon's used LOD, OCCLUDER... but doesn't work in my project.           

Moreover,  (In "superposition benchmark")It's having lot of probs and high resolution textures but getting excellent FPS but HOW?HOW?HOW?HOW?. I'm wondering to know that...

 

Find attached snapshot of my small project..... with THIS TOPICS....

Please tell me... Guide me...... suggest me.... advice me......... 

 

Regards,

Mayur patel

 

 

low_fps_set.jpg

Link to comment

Hi,

I cant tell you exactly whats going on, as every scene is very different.

Just looking at your lightcount ... 17 lights in this scene?

This can have some impact.
Switch the lights on an doff and see what happens.
Shadows can have big impacts as well.

 

  • Like 1
Link to comment

On your Superposition screengrab and also on our own application, the Total time is very close to the sum of the Update and Render CPU times. In your scene it's almost twice that! So I'd say the first thing would be to figure out where all the rest of the Total time is going. It might not be the rendering that is the bottleneck.

  • Like 1
Link to comment

To :@werner.poetzelberger    @Greg.Mildenhall

I made it all lights hidden except one environment prob..... but still not getting good FPS...

I don't know how to figure out this problem... please tell me if you have any other ideas or methods to figure out...

To: @Greg.Mildenhall I don't know about bottleneck or something like that..please guide me about that...

 

to : @werner.poetzelberger    @Greg.Mildenhall

Thank you for your time to read this problem..

i hope to hear possible solutions  from you....

find attached screenshots...

 

low_fps_set_2.jpg

Link to comment

The update and the cpu render is pretty high.
The rendertime is low. Probably there is a lot happening, beside the rendering? Scripts?
Do you have enough memory on your gpu?

Which gpu u are utilizing?

Check the overall usage of your system with eg. MSI afterburner.
Run your project in releasemode not in editor, use the advanced (graph) mode of the profiler.

 

Edited by werner.poetzelberger
Link to comment
  • 2 weeks later...

Thank you for replying werner,

There is no scripting in the project, and the GPU we are using is ZOTAC GeForce® GTX 1080 AMP Edition(8 GB).

"Probably there is a lot happening, beside the rendering?" I did not understand this. Can you be more specific about which areas to look for.

Link to comment

Hmm.

So what else comes into my mind...

- If there are many objects in hirarchy it takes up some frametime. But I am talking about a lot of objects.

- A lot of different, none inherited materials can cause some more effort.

- Big Texture maps with none power of 2 and not .dds formats can cause some more effort.

Also dont forget, that you have a bottleneck, which brings down the framerate just one its own to lets say 65 fps, other elements do not cost so much any more. e.g. If each element costs a lot on its own, the sum of those may just reduce the framerate by a small percentage.

So you need to check each element alone.

Anyway, 60 fps is a good framerate and sufficient for every need (normally). Which framerate are you aming for?

best.

 

Edited by werner.poetzelberger
Link to comment
  • 11 months later...

Hi,

I have a bottleneck when loading a specific scene in our project.

It has very much different materials, meshes and textures (~6000).

What I can read from the profiler is, that the material count is very high (~20000).

Can this cause the impact on performance. GPU load is arround 85 % with gpu z

Regards,

Sebastian

 

performance_materials001.PNG

Link to comment

Hello Sebastian,

Yes, a huge amount of unique materials in the scene will impact performance. But I can't say what exactly is slowing down rendering based on this screenshot. You may notice that the majority of frame render time is in Render CPU. Probably, the issue is not in materials.

To give you better advice I'd like to see a microprofile capture. You can find these tutorials useful: https://developer.unigine.com/en/docs/2.7.3/videotutorials/essentials/microprofile

And could you please mention, which SDK version is this?

Thanks!

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

Link to comment

Hi,

I am using 2.7.2 right now with OpenGL.

Graphics card is a GTX 1070.

performance_materials002.thumb.PNG.eb72e4970f1de1957c1cccb751406b26.PNG

Regards,

Sebastian

Edited by sebastian.vesenmayer
Link to comment

According to this screenshot, there's a lot of heavy content in the scene, basically, everything is lagging.

Have you tried isolating nodes in the editor to find what's exactly consuming all resources? This could be unoptimized LODs, shadows from high-poly meshes or something else.

Without a scene, I could only guess which object(s) is the most expensive. I suggest investigating world hierarchy to find the guilty ones.

By the way, shadows are consuming 48ms here. To make your work smoother you can disable all shadows with console command "render_shadows 0". Speaking of them, in 2.8 we're bringing a major optimization with static shadows for any light source. Should help in a lot of cases.

Thanks.

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

Link to comment

I did some iterations and found out that when I set the TRANSPARENT_ALPHA_TEST on materials as default, the shadow pass takes really long which makes sense.

But I cannot reduce the amount of meshes, I have over 6000 different materials and each has an own mesh, they are all displayed in a worst case view.

Any ideas how I can optimize this?

Regards Sebastian

Link to comment

With this info I can suggest the following:

  1. You have almost 60 millions of triangles. That's a lot (really, a lot). This is the first problem that should be solved with LODs and content optimization
  2. 6000 of unique meshes and materials also contributing to the issue. Have you considered clusterization? The best practice is using MeshClusters but they work with identical objects only. The other way - is WorldCluster. The second one could help with unique meshes, but not that much.
  3. Is there any way to occlude part of geometry? If yes, please, consider using Occluders.
  4. You also mentioned that GPU is not fully loaded. If so, we're dealing with CPU bottleneck as well. This could be caused by complicated node hierarchy (hundreds or even thousands of child nodes) or by transforming a huge amount of nodes simultaneously. This was improved in 2.7.3 on the engine level.

Thanks.

 

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

Link to comment

Thank you for your ideas, I will have a closer look at the data.

At the moment  it looks like I am mostly cpu bound, I just tested it again with gpuz and now I have a GPU load of  aroound 50%  for arround 100 M tris/s

Link to comment

Hello,

maybe I am missing something, but I dont see any reason, why such scene should have 60m triangles. What I see should be possible with 1-5m (surfaces seems simple..). If you have some heavy meshes there, try decimation (simplygon is now for free - https://www.simplygon.com/) and create several LODs. It also allows you to make texture atlases, so you can easily decrease number of materials. You can also make decimated mesh and by projection from high poly to low poly mesh create good normal/height map for low poly mesh and difference will be minimal. Also if you manually tune normals on meshes, you will eliminate sharp edges without adding geometry, etc...You should also create low poly shadowcasters (just use some decimated LOD).

6000 unique meshes is really a lot, you should merge them into some groups to not loose advantage of frustum culling and create texture atlases for such clusters.

In this case could be also interesting some fullscene baking tool like: https://www.texturebaking.com/, you can decrease number of materials by two decimals (so it will tremendously decrease CPU load).

Edited by demostenes
  • Like 1
Link to comment

Thanks for your input @demostenes :)

I am glad that I don't have 60 million triangles per Frame, it is only about 6 million, half of it are shadows, so it is arround 3 million.

It is as big as the oil ref demo which also has arround 6 Mio per frame and runs on a GTX1070 with 400 - 500 million triangles per second with > 60 fps

So I guess triangle count should be ok for the scene but Node/Object/Material count is not.

You are right @ulf.schroeter , state change does really matter, but maybe Unigine takes advantage of bindless technologies of graphics apis and provide a high level solution for it without restruction of our model.

Link to comment

@sebastian.vesenmayer,

60m triangles - my mistake, sorry.

I wanted to mention two other option that could be helpful on the import stage:

  • Merging static meshes
  • Merging similar materials

And recently we worked on a project where tens of objects with complex hierarchy (planes with all related details) were moving around a control tower. The solution was to make "hierarchy LODs". We're disabling a part of nodes when the plane is far away. Just thought it could be useful for your case.

Thanks!

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

Link to comment
  • 2 weeks later...

Hi, just want to ask if it is possible to render only shadows for an object, so I can batch shadow data different from drawing data?

Edit: Video memory for geometry does not matter.

Edited by sebastian.vesenmayer
Link to comment
24 minutes ago, sebastian.vesenmayer said:

Hi, just want to ask if it is possible to render only shadows for an object, so I can batch shadow data different from drawing data?

Edit: Video memory for geometry does not matter.

Not sure what do you mean, but you can disable camera viewport  via bitmasking for any surface, so surface will be not visible and shadow will remain. This is trick how to do low poly shadow caster for meshes.

Link to comment

Hi,

thanks demostenes, that is what i am looking for.

I have another question regarding performance.

We are using alpha blended materials and auxiliary buffer (for outlining) writes for many unique objects, which can change their appearance individually (3 possible materials).

These objects are placed slightly over the ground and need alpha blending to not fully occlude the underlying graphics.

When I am enabling alpha blending or auxiliary write the material count rises to the number of objects and the framerate drops significantly with 2000 visible objects.

Activating show_profiler shows a lot of time spend in Render CPU (about 10 ms).

We are using opengl, unigine version 2.7.2, in the attachement is a little reproducer.

Any ideas how I can make this faster with Unigine?

Thanks,

Sebastian

 

 

material_count.zip

Link to comment
1 hour ago, sebastian.vesenmayer said:

Any ideas how I can make this faster with Unigine?

Everything was already told. Did you try it? Especially mesh and material merge (to lower number of objects and surfaces)? There is no magic solution to this, you MUST optimize your assets/scene. Everybody does it. If you lower number of unique objects (and for such small scene there is no reason to have 2000 unique objects), everything will be faster.

Edited by demostenes
Link to comment

Is it faster to recalculate clustermeshes every time a instance in it will change its material, so I need to collect/sort 2000 matrices and push them into 3 different clustermeshes?

Edit:

Ok I tried it in a short example and it performs way better by pushing new matrices in a cluster mesh every frame. I will try this approach.

Edited by sebastian.vesenmayer
Link to comment
×
×
  • Create New...