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

onFinished function's timing on texture loading #100

Closed
nikita-fuchs opened this issue Jul 21, 2021 · 12 comments
Closed

onFinished function's timing on texture loading #100

nikita-fuchs opened this issue Jul 21, 2021 · 12 comments
Labels

Comments

@nikita-fuchs
Copy link

Hey, on obj files with lots of huge textures, the "loading" dialog disappears before all the textures are loaded entirely. (I'm asking for a public file I can hand you for repro right now). What essentially happens right now is that the 3d model almost freezes until all textures are loaded, which takes a while on my macbook pro late 2017. Here is a screenshot of the files, just as a hint for now:

image

@kovacsv
Copy link
Owner

kovacsv commented Jul 21, 2021

It works like this by design, so you can work with the model while textures are loading in the background. I think it's possible to wait for all textures to load before showing a model, but currently I don't plan to implement this behavior.

@kovacsv kovacsv added the viewer label Jul 21, 2021
@nikita-fuchs
Copy link
Author

nikita-fuchs commented Jul 22, 2021

This behaviour is okay, in practice though our testing model freezes entirely and the view cannot be moved until almost all textures are loaded, so therefore I would need some sort of function to at least display some indicator, till everything is loaded and usable.

@kovacsv
Copy link
Owner

kovacsv commented Jul 23, 2021

An example file set would help a lot to reproduce the issue.

@nikita-fuchs
Copy link
Author

Hey, are you able to reproduce with this example ? https://mega.nz/file/QAsAUBLa#nG53MUU1VnT8cloYV0aZF2ufvAhIM-8R_eGDT7E-AbQ

@kovacsv
Copy link
Owner

kovacsv commented Jul 28, 2021

Yes, I can reproduce the issue now.

There are a few things that you can do to prevent lagging:

  • Reduce texture size (it doesn't make sense to use such a huge textures for web visualization).
  • Make texture size (width and height) power of two. For visualization this is needed to make everything work properly. If you have textures with non power of two sides, than the viewer will automatically resize them, and it takes a lot of time.

Maybe it's possible to remove this power of two resizing from the viewer, but I have to investigate if it breaks anything.

@kovacsv
Copy link
Owner

kovacsv commented Jul 28, 2021

Created an issue (#105) for the investigation.

@kovacsv
Copy link
Owner

kovacsv commented Jul 29, 2021

With the fix of #105 the performance is much better, but it can be further optimized by decreasing the size of the textures.

@nikita-fuchs
Copy link
Author

thank you ! Yes, we have a lot of optimisation happening in the backend of course, but unfortunately that kind of stuff is what out target audience is coming around with in the first place, so we need to deal with that unfortunately.

@nikita-fuchs
Copy link
Author

hey, I'm still experiencing quite some heavy loading time on the repro in the latest release, am I doing something wrong or is this the best optimisation possible for now ? (no bad blood, just checking 😜 ) could this theoretically be improved somehow in the future? with additional help of someone or something ?

@kovacsv
Copy link
Owner

kovacsv commented Aug 9, 2021

One way is to lower the size of the textures. Another way could be to show progress dialog while all textures are loaded (this needs some programming, of course).

@nikita-fuchs
Copy link
Author

By lowering the texture size you mean doing it on the creator's side, right ? This is something those poor guys and girls can't do with their programs yet...

A load indicator would greatly help improving the user experience, people with high quality exports can't tell whether it's not their browser that simply froze ;)

Will you be available for some reasoning about access to state and event functions some time later or so?

@kovacsv
Copy link
Owner

kovacsv commented Aug 9, 2021

I've created this issue to handle the situation:
Hide progress dialog only when all textures are loaded #108

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

No branches or pull requests

2 participants