Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched from 0.10 package to latest code, FPS dropped from 25 to 0.5 - filament? #2157

Closed
keithahern opened this issue Aug 10, 2020 · 7 comments · Fixed by #2523
Closed
Assignees
Labels

Comments

@keithahern
Copy link

I needed access to the new GUI api and so I checked out the latest code and built it with RealSense support on OSX. Now the FPS has dropped from around 25 (rendering 2 x 640x480 point clouds) to 0.5 in my application. I noticed "Filament library loaded. is output when I run the app, is Open3D now defaulting to a high quality (but slower) renderer? How can I control this and restore a faster FPS.

I have reproduced this with the simplest of code, just load and render a point cloud in the visualiser.

I expected performance to be closer to the pre-filament rendered in the 0.10 public build, any help much appreciated, thank you.

  • Operating system: OSX 10.15
  • Python 3.7
  • Open3D check out from 7 August 2020
  • Run locally
  • Open 3D from source
  • Clang from Xcode
@keithahern
Copy link
Author

confirming its the change from open3d-0.10.0.0 to open3d-0.10.0.1 (checkout from 7 August 2020) that causes big drop in performance.

@yxlao
Copy link
Collaborator

yxlao commented Aug 12, 2020

Is Open3D now defaulting to a high quality (but slower) renderer?

No. Filament is only used for the gui app for now.

How can I control this and restore a faster FPS.

Try compiling with -DBUILD_GUI=OFF, which will disable Filament completely. If you still see the performance drop, could try to do some profiling and figure out which part of the code has become slower?

(Also @prewettg )

@yxlao yxlao added the question label Aug 12, 2020
@Zumbalamambo
Copy link

+1

@JeremyBYU
Copy link

I am also facing this same issue with a significant drop in fps for 0.10.0 compared to 0.9.0. I am providing a reproducible examples for both the meshes and code below.
Here is a zip file of 75 (small) meshes which will be loaded by the below script (455 KB): o3d_slow_down.zip

Here is the script to load meshes. Simply interact with the visualizer (rotate). Please also press 'w' to turn on wireframe. This causes an even larger slowdown.

"""Demo of Open3D 0.10.0 Slowdown
Please modify DIRECTORY to point to the folder of meshes attached to this issue reply
"""
import os
import open3d as o3d
DIRECTORY = 'o3d_slow_down'
def main():
    all_meshes = []
    all_files = sorted(list(os.listdir(DIRECTORY)))
    for filename in all_files:
        print(filename)
        mesh = o3d.io.read_triangle_mesh(os.path.join(DIRECTORY, filename))
        all_meshes.append(mesh)
    o3d.visualization.draw_geometries(all_meshes)

if __name__ == "__main__":
    main()

To switch back and forth between opend3d==0.10.0 and open3d==0.9.0 please perform the following in a python virtual environment:

pip install --upgrade open3d==0.9.0 - To go to 0.9.0 or
pip install --upgrade open3d==0.10.0 - To go to 0.10.0

I have notices this issue on Windows and Ubuntu 18.04. Here are more details:

OS: Windows 10 and Ubuntu 18.04
CPU: AMD 3900X, X64
GPU: NVIDIA 2070 Super
Open3D: 0.9.0 (fast) and 0.10.0 (slow)

Quantification

On Winows 10 I could provide hard numbers quantifying the fps drop because I can use MSI afterburner to display fps overlay on OpenGL screens. However on linux I can not figure out how to do this with an open source program. I think the issue is my closed source nvidia driver I am using. If you want the fps drop number let me know and I will reboot back into windows 10 and provide that data.

@prewettg
Copy link
Contributor

prewettg commented Oct 20, 2020

Can you try the prewettg/fix_n2_draw_geometries branch (or master if #2523 is merged)? It looks like a very unfortunate and incorrect merge conflict resolution in May left us adding n^2 geometries, which would be fairly catastrophic in your 75 mesh example.

@JeremyBYU
Copy link

Hey @prewettg thanks for suggesting this fix. I am almost positive that this is my issue as well. I will try and test this out sometime this week, but will have to compile from scratch and will probably only test on Ubuntu 18.04.

Note that I am not sure if this is the same issue that @keithahern is facing.

@JeremyBYU
Copy link

So I have pulled from master with PR #2523. I have installed on a Windows 10 Machine X64.

Here are the results for the script above:

  1. o3d 0.10.0 - 9 Seconds to load meshes (time to being user interaction), 1 FPS (with draw edges enabled 'w')
  2. o3d 0.11.0+f1d478c4 - 0.5 seconds to load meshes, 45-60 FPS (with draw edges)

So it looks the PR has successfully handled my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants