cnr-isti-vclab / 3DHOP

3D Heritage Online Presenter
http://www.3dhop.net
GNU General Public License v3.0
154 stars 42 forks source link

Multires models examples ? #11

Closed wiztigers closed 5 years ago

wiztigers commented 5 years ago

Hello,

I'm currently working with the University of Strasbourg (unistra) on a Django based 3D file sharing web solution, and I'm testing 3DHop integration. I'd like to thank you for this initiative : it seems great, and we'd love to use it !

However, although everything is fine when displaying single res .ply files, I've got issues when trying to display multires .nxs/.nxz files. For example, let's consider 3DHOP_4.2/examples/HOWTO_2.0_models_loading.html (without any modification), with Firefox 63.0 :

When comparing to Chromium 70.0.3538.77 (same file: HOWTO_2.0_models_loading.html) :

For information, if I test it via my Django app, with scenes consisting only of one mesh and one model :

I've checked every .nxz files I use with nexus' nxsview tool, they don't seem to have any problem (ie. they display properly). I've tested with 3DHOP_4.2 downloaded version as long as with this repo's master latest version (d428e9), results are the same.

Should the example demos work out of the box on all browsers ? Should I setup / modify something before running them ?

If it's of any help, besides the browser versions I cited, I'm on a Dell Latitude 5490 running LinuxMint 19 (64-bit).

Thanks in advance for your directions ! Have a nice day ! :+1:

potenziani commented 5 years ago

Hi @wiztigers, let's try to clarify your doubts...

First of all: yes, 3DHOP has been designed to work on all the main browsers and on all the main OS (this includes also Linux, even if clearly is not possible for us testing all the Linux distro).

Moving to your issues, a good strategy to solve them consists in going step by step: firstly, to check if 3DHOP works in your system try to run whatever examples you can find in the 3DHOP official website (http://3dhop.net).

Once you are sure your system can run the 3DHOP examples online you can start using it. As you can read here (http://3dhop.net/documentation/3DHOP_Environment_Deployment.pdf), 3DHOP needs a web server to works: you can upload the distribution package on a proper server (if you have it at hand), or you can install a local web server on your pc (we usually use Apache HTTP Server). Without a web server installed the browser is unable to handle external files due to the CORS (Cross Origin Resource Sharing) policy (some browsers can, but in general this is not true). Because of this, if you try to open an HTML file that includes the 3DHOP viewer in a browser without the web server support, you just will get an empty CANVAS (no chances to visualize a Nexus file). The "--allow-file-access-from-files" workaround works very well in Windows Chrome, but it is browser and OS dependent (also, remember to close all the Chrome instances and then start again the browser to be sure this workaround works), so we strongly advice to rely on a web server.

Now, if you are able to run all the 3DHOP examples on your web server, you are ready for embedding 3DHOP in your Django application (but this should be just the last step).

Hope this can help you. If you instead still need help, please contact us using the technical support account: info@3dhop.net.

Thanks for using 3DHOP, and have a nice day you, too!

wiztigers commented 5 years ago

Hi @potenziani , and thanks a lot for your quick answer. My system is indeed able to run 3DHOP examples : after your directions, I installed Apache and, once I copied 3DHOP examples in it, everything worked flawlessly. So, according to your directions, it seems the problem may lie in the handling of external files : python's SimpleHTTPServer does not support that, but Apache default install does seem to.

Anyway, the problem lies in my configuration of Django, not in 3DHOP. That's good news ! I now have to fiddle around with Django's default config to sort out where the problem lies. ᕦ(ò_óˇ)ᕤ

Thanks once more ! Do you want us to keep in touch as my project progresses further ?

potenziani commented 5 years ago

Hi @wiztigers, happy to see that you are doing progress with your 3DHOP implementation! And sure, I would be glad to know about the future developments... so yes, keep me posted if you want! 👍