-
-
Notifications
You must be signed in to change notification settings - Fork 845
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
Bad performance in spheric mirror distortion mode #3535
Comments
I can reproduce this when I turn on spheric mirror distortion. Something works badly there. But I don't reproduce the slowdown. If you speed up time, does the animation look choppy, or is it only panning around that has this problem? |
Thanks for your reply. With my shows I don't do any panning around. I only speed up / slow down time. The more I speed up time, the more choppy the animation looks. If it may help, here is the Log file of my smooth Stellarium v19.3 on MacBook Pro (2019) with 2.8 GHz Quad-Core Intel Core i7 chip, 16 GB memory, running macOS 10.15.7 (Catalina) - also operating with spherical mirror distortion. |
Did you try v19.3 on the new machine? |
I haven't tried v19.3 on the new MacBook. I will do so now. Do you suggest I remove v23 - or can I keep both versions on the laptop? |
I have no idea about the macOS environment. To be on the safe side I'd remove the other version first. |
OK great, I'll do so this afternoon and report back soon |
You can keep both (or more) versions on the laptop - just change names of packages |
Actually, v19.3 won't open on the new MacBook - I think because it's an Apple M3 chip (not Intel)? |
Why not? Rosetta2 works ;) |
Won't it lead to a performance hit, especially if the problem is in some CPU-bound computation? |
I don't know - when I try and open v19.3 it crashes. You can see the crash log file here. Is it maybe crashing because v23.3 is also on the system - or because it's not an Intel chip? |
Don't know about the crash, but this line makes me wonder:
What if you run v23.3 with |
OK I'd love to try, but I have no idea how to launch Stellarium with command line options. If you could please explain how to do it step-by-step, I should be able to do it? |
Please delete file ~/Library/Application Support/Stellarium/data/ssystem_minor.ini before run v0.19.3 because newest version of file is not compatible with v0.19.3 |
No performance hit, at least I don’t see it (maybe 1-2%) |
OK cool, I deleted ssystem_minor.ini, and now v19.3 runs on the new MacBook - and daily motion is beautiful and smooth 😊✨ |
Please check v0.22.2 and v0.21.3 also - https://github.com/Stellarium/stellarium/tags |
@alex-w how do we run Stellarium with a command line option? |
In Terminal.app: |
Wow. OK, so this is the test result of daily motion on the new MacBook Pro M3:
|
Shall I run that command in the Terminal app? Do I need to do anything before / after I run it? |
Probably v1.0 will be smooth and v1.1 will be choppy |
Go to directory where Stellarium is located within Terminal.app |
OK, I ran the --opengl-compat command in Terminal from the directory where Stellarium v23.3 is located. Terminal executed a lot of commands, and then Stellarium v23.3 launched automatically. I tried daily motion - and it is still choppy 😐 |
I have now installed and tried more versions on the new M3 laptop. This is the result: SMOOTH
CHOPPY
|
My problem is that I have now created a script for v23.3. The script is long and complex, but it runs perfectly in v23.3. Unfortunately, the script does not run in v22.2 (the most recent version with smooth motion) 🫤 |
Where does it break? User Guide, Table 17.1 is crucial for compatibility between 0.22 and 1+ versions, but else? Maybe some functions were called slightly differently. The logfile or script GUI can help finding the unknown function. Or do you use some critical new addition? |
Please run v23.3 with |
OK I ran v23.3 with --opengl-compat. Daily motion is still choppy, and the log.txt is here |
Phew! With the 4 changes applied to master, it becomes definitely more responsive. Regular fullscreen 140fps, distorted 14fps. (Was 3fps without.) Seems you are on the right track, but in 0.22.2 it was 32fps regular/25fps distorted. Are there more places like this? |
OK, I've looked at the whole process of the distortion rendering, and it appears to be totally inefficient. First, there is a constant set of vertex, texcoord, color arrays, which get rewritten from RAM to VRAM on every frame inside The proper solution is to rewrite the distorter so that it maintains a custom VAO with this constant set of data and simply enables it to draw from in |
The old version rewrote VBO about 150×3 times per frame, which is very inefficient, especially given that the data written never change. This version writes these constant data once in the constructor of the distorter and uses them on rendering. Fixes #3535
@10110111's fix works great! Now, @ImmersiveTheatres could help the community by describing how to set up a projector system with a spherical mirror. What parameters to tweak in the config.ini, anything to take care when selecting a projector/lens/spherical mirror? One page in the User Guide should hopefully suffice. This was last described probably 20 years ago, but I have never seen these guides. |
The old version rewrote VBO about 150×3 times per frame, which is very inefficient, especially given that the data written never change. This version writes these constant data once in the constructor of the distorter and uses them on rendering. Fixes #3535
Wow, this sounds REALLY exciting. You guys have fixed the problem already? Amazing! Yes, thank you, I would love to create a page for the User Guide on spherical mirror projection. I'll keep the information short and compact, with links for users who wish to learn more. I'm busy over the next week, but will have time to compile this information next weekend (25-27 Oct) 👍🏻 |
Hello @ImmersiveTheatres! Please check the fresh version (development snapshot) of Stellarium: |
FABULOUS! Diurnal motion and meteors are now as SMOOTH as SILK! Well done and thank you SO much for fixing the issue. You guys are awesome! |
OK I've created a document called Stellarium and Spherical Mirror Projection. I've kept it as concise as possible, but it's two pages long. Yet it describes everything required to successfully create an inexpensive Stellarium-based planetarium. Please let me know if you think it needs shortening (and which parts you think should be removed). |
Interesting, now I realize why someone (was it you?) requested that atmosphere could be disabled leaving star twinkling on. Indeed, a planetarium is closer to where you'd want to see the scene in real brightness scale, rather than the tone-mapped one we are showing. But as I see, you have a workaround. I've noticed that your domes described in link 4 (which should be presented without a shortener, BTW) are actually faceted rather than smoothly curved. They may benefit from defining a custom distortion file, which is documented a bit here. Reading further comments there though, I'm not sure if the feature works as it should. |
Thank you! I have not looked inside yet, but I'd like to just put the documentation as section (6.3?) into the User Guide. Of course, you will be acknowledged as section author. Is that OK with you? |
You're welcome, thank you for inviting me to write this. Yes, no problem using my name if you wish. If possible I'd prefer just 'immersive-theatres.com' - but if you need a personal name, feel free to use Mario Di Maggio. |
Yes that was me
Actually that's not my website or my domes (mine are here: https://immersive-theatres.com/about-us/dome-photos ) - but it's a good reference to use describing spherical mirror projection options.
Wow - I didn't realise Stellarium can accept the custom distortion file! I have one for my system, so I will experiment and try it out, thanks. I didn't mention the Meshmapper configuration option (https://paulbourke.net/dome/meshmapper), because it's a little complicated and most small dome operators don't carry it out. Maybe I'll try it out first with my custom distortion file and we can add it in in the future. |
Gosh, yes, it's lost bits of info like this turning up here and there that need to go into the Guide! |
I've created a second version and included a short description of the Meshmapper configuration. Until we've tested that custom distortion files work correctly in Stellarium, perhaps it's best we don't give any more details for now. |
I added your text and a final note that points to this thread. When we find out more about how this works, we may continue. |
Just want to chime in: THANK YOU! The performance increase here is incredible with spheric mirror distortion. I can't believe how buttery-smooth it feels now. Thank you! I will also test my custom distortion files and report back. |
Do we know approx. when v24.4 will become publicly available? I want to share this brilliant improvement with the small planetarium community, but I'd prefer to do so with an official release 😊 |
|
Hello @ImmersiveTheatres! Please check the latest stable version of Stellarium: |
Thank you, today I installed it and it's looking very good! Over the next few months I'll report back if I notice anything unusual during my school bookings. Thank you again for fixing the diurnal motion. I informed another small planetarium operator today and he was delighted and rushed home to install the latest version of Stellarium 😊 |
I have been asked to open a new issue with this request
I am not a coder. I am an astronomy teacher. I am asking this question (and other questions below) because I don't understand deep coding - and this is a forum to help Stellarium users.
I work with inflatable planetariums, and over the past 10 years I have used Stellarium as my main astronomy application. I use the spherical mirror projection mode, and I think Stellarium is awesome.
I only use MacBook Pros in my planetariums.
Last week I installed Stellarium v23.3 (Stellarium-23.3-qt6-macOS.zip) on a brand new MacBook Pro (Nov 2023) with M3 Pro chip, 18 GB memory, running macOS 14.1.2 (Sonoma).
Previously I was using Stellarium v19.3 on a MacBook Pro (2019) with 2.8 GHz Quad-Core Intel Core i7 chip, 16 GB memory, running macOS 10.15.7 (Catalina). The Stellarium motion of the sky (diurnal motion) on this old laptop is perfect, silky-smooth and absolutely beautiful.
Unfortunately, the motion of the sky on my new laptop is currently rough, juddery and sticky.
I am using the same config file settings as on my old laptop - yet changing these settings seems to make no difference to the quality of the motion:
[video]
dithering_mode = color888
fullscreen = true
maximum_fps = 50000
minimum_fps = 100
screen_h = 768
screen_number = 1
screen_w = 1024
screen_x = 237
screen_y = 85
tm_display_adaptation_luminance = 50
viewport_effect = sphericMirrorDistorter
Here is my log file after I launch Stellarium (without doing anything else). I wonder if anyone can please suggest something I can change, to make the motion of the sky work more smoothly?
I'm also wondering why the following error is so strong ie. is there something I can do about this error, or not? (if possible, an answer in non-technical language would be helpful please).
/Users/aw/stellarium/src/core/StelApp.cpp:915: OpenGL error: 1282 (GL_INVALID_OPERATION)
Here is the full config.ini I am using at the moment.
Thanks very much
Mario
The text was updated successfully, but these errors were encountered: