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

Importer Performance Issues #2101

Open
Xaldew opened this issue Jan 8, 2024 · 1 comment
Open

Importer Performance Issues #2101

Xaldew opened this issue Jan 8, 2024 · 1 comment

Comments

@Xaldew
Copy link

Xaldew commented Jan 8, 2024

Describe the bug

Hello!

Long story short: I've been working a bit on creating a converter of PBRT scene
files to glTF/glb files, and while it's far from complete, I have been able to
use it to find a number possible issues, mostly related to instancing.

I will split up each problem into individual issues to hopefully make it a bit
easier to discuss and or debug, and I'll try to link each of them were relevant.

First off: I noticed that the glTF import performance is relatively poor when
many instances are being used. As an example, the "Arcsphere" scene below
only contains 26 meshes, but also has more than 70 000 nodes, most of which
are instance nodes.

Loading this scene into Blender takes around 2 minutes on my machine, which all
things considered, is not bad, but is much slower than I'd like. The main
problem is that there seem to be some kind of scaling problem: Attempting to
load the "San Miguel" or "Landscape" scenes takes multiple hours.

Also, after the scene has been loaded, the viewport performance (and really,
all of Blender) is extremely slow (e.g., the "Arcsphere" scene runs at around 2
FPS on my machine). I guess that that is a Blender specific problem though,
which I "solved" by selectively hiding instances from the viewport, although see
issues (#2102 , #2103) for more on that.

(I believe there is a similar issue affecting export performance, but I'm still
investigating that.)

All things considered, I'm not sure if this is possible to fix or that this should be
expected for these kinds of scenes, but I couldn't find any other issue mentioning
this so I figured I should create this post.

To Reproduce
Steps to reproduce the behavior:

  1. Import included .glb file.
  2. Check import time using the builtin import timer.

Expected behavior
N/A
(A bit faster import perhaps?)

Screenshots
img
San-Miguel scene example render: https://www.pbrt.org/gallery/sanmiguel.jpg
Landscape scene example render: https://www.pbrt.org/gallery/view-1.jpg

.blend file/ .gltf (mandatory)
Zip includes a .blend file with the finished import (from Blender 4.0) and the initial .glb file.

arcsphere.zip

Version

  • OS: Linux
  • Blender Version(s) 3.6, 4.0
@julienduroure
Copy link
Collaborator

take 28s on my computer. I profiled it.
Not sure this is something related to glTF exporter, or related to Blender API that reprocess the depsgraph at each object added via API

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

No branches or pull requests

2 participants