mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.27k stars 723 forks source link

about create a multiresolution panorama #728

Closed hejustbrave closed 5 years ago

hejustbrave commented 5 years ago

I wanna know how to create a multires type of panorama?the way you said about running the generate.py file seems difficult to understand for me without knowledge of python and Hugin. I have download the Hugin and found the path of nona,and now I don't know what to do next ps: I do not good at English, and thank for your kindness of open-source with such a good thing.

mpetroff commented 5 years ago

You did not specify what operating system you're using. On Debian or Debian-derived distros such as Ubuntu, it's as simple as installing the required packages with sudo apt-get install hugin-tools python3-pil and then running python3 generate.py yourpanorama.jpg from the utils/multires directory. If you're using Windows or macOS, you're on your own for figuring out how to install Python, Pillow, and Hugin.

hejustbrave commented 5 years ago

I tried once and it seems work but I don't know where to find the result... C:\Users\he100>py D:\panellum\pannellum-master\utils\multires\generate.py -n "D:\panellum\Hugin\bin\nona.exe" D:\panellum\pannellum-master\aaa\data\multi\H110m.jpg Processing input image information... Assuming --haov 360.0 Assuming --vaov 180.0 Generating cube faces... Generating tiles... Generating fallback tiles... or I have not finished yet? ths for ur reply

hejustbrave commented 5 years ago

and when I put all the three things in the same place and run,it says already exist, Output directory "./output" already exists and I have no idea where are they...

hejustbrave commented 5 years ago

I use Windows 10

mpetroff commented 5 years ago

By default, the tiles are created in the output directory. That error message means that the output directory already exists.

hejustbrave commented 5 years ago

yeah,I know it said,but where the output folder is...couldn't find this folder...or is there has any way to save the result in folder defined?

hejustbrave commented 5 years ago

its first run seems run without define an output folder,and now still can't find it neither in the same folder..

mpetroff commented 5 years ago

The output directory is relative to the working directory where you ran the command. Based on the command you posted, that would be C:\Users\he100\output. The --output flag allows you to specify the output directory.

hejustbrave commented 5 years ago

oh I found it..thank you!!!

hejustbrave commented 5 years ago

Now I found the load event can't work with the multiRes type,and it makes me confused because I have something to do with this event and it works with equirectangular before. hope for your fervent help

hejustbrave commented 5 years ago

oh I found it! just close the autoLoad to able to use the load event with multiRes! And it would be nicer for using autoLoad with multiRes,hope for an update for this function

mpetroff commented 5 years ago

The load event is fired with multiresolution panoramas as well. However, it's fired immediately, so you won't get an event if you create a viewer with a multiRes panorama and autoLoad: true, since the event will be fired before you attach an event listener.

hejustbrave commented 5 years ago

emmm...is there any way to get the current scene's ID each time I change the scene even the first scene?,wait for help.

mpetroff commented 5 years ago

The getScene() method returns the current scene's ID.

hejustbrave commented 5 years ago

yeah I know...I mean if there's any other way like the load event's work each time changing the scene.I used to use getScene() in load and now it's useless with multiRes..

mpetroff commented 5 years ago

The load event works perfectly fine for multiRes configurations, as does getScene(). As I said previously, it will fire before you can attach an event listener for multiRes configurations with autoLoad: true. As this is the first scene, you know directly from your configuration which scene it is, so there's no need for an event listener to tell you this. I don't know how to make this any more clear.

mpetroff commented 5 years ago

Also, calling people's work "useless" isn't a good way to get people to help you.

hejustbrave commented 5 years ago

Also, calling people's work "useless" isn't a good way to get people to help you. I'm so sorry to let you misunderstand what I mean...as I used to say I'm not goot at English...thank you any way for answer me each time