CelestiaProject / Celestia

Real-time 3D visualization of space.
https://celestiaproject.space
GNU General Public License v2.0
1.77k stars 300 forks source link

Celestia on Raspberry Pi 5 Bookworm 64 bit Wayland: orbits, constellations/constellation borders, coordinate grids are not rendered #2211

Open arohrbacher opened 4 days ago

arohrbacher commented 4 days ago

Celestia now runs very well on my Raspi5 (solid 60 fps), but these things don't get rendered (when the respective options are switched on in the menu):

Attached my /tmp/celestia-shaders.log file celestia-shaders.log

Funnily enough, a small part of the ISS orbit is rendered as a red line, but no planetary or moon orbits: celestia_ISS_orbit

My system details: Raspberry Pi 5 with 4 GB RAM, Rapberry OS Bookworm 64 bit, 4 kB page size, Wayland. Running the GTK build of Celestia; the QT5 build has the same issues...

375gnu commented 4 days ago

Could you also provide Help->OpenGL Info content?

arohrbacher commented 3 days ago

here the OpenGL info for the GTK build: (I cannot select and copy the text in the box, hence a screenshot): OpenGL_Info_GTKbuild here for the QT5 build: OpenGL_Info_QT5build.txt

375gnu commented 3 days ago

It can be a bug in OpenGL driver. Could you recompile GTK UI with -DENABLE_GLES and test it?

arohrbacher commented 3 days ago

ok, I compilled with

cmake .. -DENABLE_GTK=ON -DENABLE_GLES=ON
make -j4
sudo make install

running celestia-gtk throws this: GTK_build_error

but running celestia-qt5 actually works in showing the orbits/constellations/etc: QT5_build

fps is still great; the only issue with the QT5 build is that the color depth (?) seems lower than when I run the GTK build: in the QT5 build is see some "color bands" when e.g. the sun is rendered: color_bands_QT5_build

375gnu commented 3 days ago

Could make a "clean" compilation for GTK? It seems it still uses the old GL widget. Like

mkdir build-gles && cd build-gles
cmake  .. -DENABLE_GTK=ON -DENABLE_GLES=ON
make -j4
sudo make install

Btw, do you have any issues with simple SDL UI?

arohrbacher commented 2 days ago

building the GTK version in a "clean" build folder (and disabling a QT5 build with -DENABLE_QT5=OFF) doesn't help: I still get the "Celestia was unable to initialize OpenGL" error when attempting to run the GTK version. I also attempted to build a GTK version with GTK3 (using -DUSE_GTK3), but this also gives the "Celestia was unable to initialize OpenGL" error.

A SDL build works: orbits are rendered and the color depth is OK, but how do I use the program? I don't have menus etc.

A QT6 build works actually pretty well: orbits/constellations/constellation border/coordinate grids are rendered and the color depth is just fine - I think I have found the right build for my Raspi5. This is how I configured cmake: cmake .. -DENABLE_QT6=ON -DENABLE_GLES=ON

375gnu commented 2 days ago

but this also gives the "Celestia was unable to initialize OpenGL" error. so, the last check, please, could you show output of ldd /usr/local/bin/celestia-gtk and provide file build-gles/CMakeCache.txt?

A SDL build works: orbits are rendered and the color depth is OK, but how do I use the program? I don't have menus etc. There is a file controls.txt in the root folder with sources. It's also installed into /usr/local/share/doc/celestia

A QT6 build works actually pretty well: orbits/constellations/constellation border/coordinate grids are rendered and the color depth is just fine - I think I have found the right build for my Raspi5.

Great! Perhaps Qt5 require other packages, afair there were packages with gles suffix. But it's better to switch to Qt6 as Qt5 is not supported anymore.

arohrbacher commented 2 days ago

Just found that planets with rings have issues when ring shadows are turned on (QT5 and QT6 builds): QT6_build_ringshadows_on

When turning them off, it looks like this: QT6_build_ringshadows_off

arohrbacher commented 2 days ago

as for the GTK build (that failed with the "Celestia was unable to initialize OpenGL" error), attached the information you requested: ldd_output.txt CMakeCache.txt

375gnu commented 2 days ago

as for the GTK build (that failed with the "Celestia was unable to initialize OpenGL" error), attached the information you requested:

Thanks. Both are okay, so the problem is not with CMake, but with my EGL code.

Just found that planets with rings have issues when ring shadows are turned on (QT5 and QT6 builds):

Could you go to Saturn when ring shadows are on and then post /tmp/celestia-shaders.log?

arohrbacher commented 2 days ago

here you go... celestia-shaders.log

375gnu commented 2 days ago

So the driver exposes GL_ARB_shader_texture_lod white its support is incomplete. Please create .celestia-1.7.cfg file with the following content:

Configuration
{
    IgnoreGLExtensions [ "GL_ARB_shader_texture_lod" ]
}

It should fix the problem.

arohrbacher commented 2 days ago

ok, placing .celestia-1.7.cfg into my $HOME fixed the ring shadow issue - many thanks.

I found some other "issues", however:

375gnu commented 2 days ago

The Saturn moonlet Hyperion is not rendered using OpenGL ES 2.0 (this worked when using OpenGL 2.1)

Please provide /tmp/celestia-shaders.log

here is some "halo" around the sun; using OpenGL ES 2.0 this halo disappears quickly when you move away from the sun (it disappears at about >0.2 AU); using OpenGL 2.1 it stayed much longer - all the way to at least Saturn. This makes the sun pretty hard to spot when you are in the outer solar system...

Could you check different star modes? Press Ctrl+S

arohrbacher commented 2 days ago

The Saturn moonlet Hyperion is not rendered using OpenGL ES 2.0 (this worked when using OpenGL 2.1)

Please provide /tmp/celestia-shaders.log

Sorry, now it is working - Hyperion is rendered; don't know what happened before - I did switch off my Raspi5 in the meantime, though...

here is some "halo" around the sun; using OpenGL ES 2.0 this halo disappears quickly when you move away from the sun (it disappears at about >0.2 AU); using OpenGL 2.1 it stayed much longer - all the way to at least Saturn. This makes the sun pretty hard to spot when you are in the outer solar system...

Could you check different star modes? Press Ctrl+S

I already tried the different star modes - originally I had it at "fuzzy points"; setting it to "scaled disks" turns off the halo at <0.4 AU and >2 AU; at "points" the halo is also turned off at >0.2 AU