Closed luishcq closed 9 years ago
Just another pic where misalignments are evident
As you're not the first to try to convert generate.py
to Python 2 and have issues, I just added Python 2.7 support to it. There are gaps in your panorama because none of the non-square tiles were generated. I ran into the same problem converting the script. It turns out Python 3 does more implicit conversions between integers and floats than Python 2, which I think is also why explicit integer casts are needed. Python 3 will output a float when two integers don't divide evenly, e.g. 3 / 2 = 1.5
, while Python 2 does integer division, effectively flooring the result, e.g. 3 / 2 = 1
. Therefore, some float casts needed to be added in; otherwise, the input to the ceiling function was floored first, so the ceiling function did nothing. If you grab the latest copy of generate.py
, it should work properly in Python 2.
Thank you very very much! It's working now, flawlessly! I'll proceed using/learning Pannellum - and perhaps Python too - and I think it could help me. I couldn't find any wishlist in Amazon, but I'm really grateful. Regards!
Hi Matthew,
I'm experimenting with pannellum, and, despite the multiresolution example worked as it should, I can't manage to have my own multiresolution pano going OK. I modified generate.py in order to work with Python 2.7.9 (Debian testing "jessie"), but the issues here were about errors when trying to save files in directories already existing and math.ceil returning a float instead of int.
The problem with the panorama is: the cube faces do not join - sometimes some faces do join, but - I can see that the faces are not properly aligned.
I have pannellum 2.0.1.
Also I noticed that the config.json is always created with "extension": "jpg" ;)
thanks!
PS: Attached file shows the left (right side in picture), back (left in pic), top and bottom faces