Spherical Mirror Projection?

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #21by Lafuente_Astronomy » 23.01.2020, 07:26

Janus wrote:The source that includes the spherical aberration/projection code.


Janus.

So far, none yet. But ImmersiveTheaters already sent the issue request to the devs. We just have to wait
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #22by ImmersiveTheatres » 23.01.2020, 10:58

Yes it's on its way :-)

I'm in touch with the person who originally commissioned the spherical mirror version at the Centre for Astrophysics & Supercomputing,
Swinburne University.

10 days ago he said: "Hi Mario, I think I’ve located the 1.4.1 version for you, but I just need to check a couple of things before I make it available"

I'll prompt him if I don't hear from him by the end of next week.

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #23by Lafuente_Astronomy » 23.01.2020, 15:18

ImmersiveTheatres wrote:Yes it's on its way :-)

I'm in touch with the person who originally commissioned the spherical mirror version at the Centre for Astrophysics & Supercomputing,
Swinburne University.

10 days ago he said: "Hi Mario, I think I’ve located the 1.4.1 version for you, but I just need to check a couple of things before I make it available"

I'll prompt him if I don't hear from him by the end of next week.

Nice! Once you do get the stuff, is it ok with you if you post it both here and in the GitHub issue page, so that both members on the forum and the devs in GitHub(And also in the Forum) can, and will test it. Thanks
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Janus
Posts: 537
Joined: 13.08.2016
With us: 7 years 8 months

Post #24by Janus » 23.01.2020, 23:10

Thx.
Very much looking forward to seeing it.


Janus.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #25by ImmersiveTheatres » 21.02.2020, 11:49

GOOD NEWS! I have finally received the spherical mirror projection source code for Celestia ver. 1.4.1.

It can be downloaded here:

https://drive.google.com/open?id=1vpefaI36Paa8APKboBZXEj6zFKJLOMqc

It came with the following comment: There is a CGShader that does the majority of the work in converting the regular projection to a fisheye projection, and this is enabled by configuring a CFILES environment variable, but I’m sure the developers will be able to work out what is required by looking at the source code.

When the spherical mirror projection version of Celestia is released, it will be nice to include in the credits: Andrew Jameson, Systems & Software Engineer, Centre for Astrophysics & Supercomputing, Swinburne University of Technology

Finally, I'd like to be the first to volunteer to test spherical mirror projection beta versions in my mobile domes! :smile:

Mario

Avatar
Lafuente_Astronomy
Moderator
Posts: 726
Joined: 04.08.2018
Age: 26
With us: 5 years 9 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #26by Lafuente_Astronomy » 21.02.2020, 11:59

ImmersiveTheatres wrote:GOOD NEWS! I have finally received the spherical mirror projection source code for Celestia ver. 1.4.1.

It can be downloaded here:

https://drive.google.com/open?id=1vpefaI36Paa8APKboBZXEj6zFKJLOMqc

It came with the following comment: There is a CGShader that does the majority of the work in converting the regular projection to a fisheye projection, and this is enabled by configuring a CFILES environment variable, but I’m sure the developers will be able to work out what is required by looking at the source code.

When the spherical mirror projection version of Celestia is released, it will be nice to include in the credits: Andrew Jameson, Systems & Software Engineer, Centre for Astrophysics & Supercomputing, Swinburne University of Technology

Finally, I'd like to be the first to volunteer to test spherical mirror projection beta versions in my mobile domes!

Mario

That is very good to hear! onetwothree, markerz, LukeCEL, and SevenSpheres, what do you think?
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #27by SevenSpheres » 21.02.2020, 22:39

Lafuente_Astronomy wrote:SevenSpheres, what do you think?

As I've said in the thread on GitHub, I think it's great! I won't be able to test it though (since I don't have a C++ compiler - or a planetarium).

ImmersiveTheatres wrote:Finally, I'd like to be the first to volunteer to test spherical mirror projection beta versions in my mobile domes! :smile:

Yes, please do! :smile:
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Janus
Posts: 537
Joined: 13.08.2016
With us: 7 years 8 months

Post #28by Janus » 22.02.2020, 02:12

@ImmersiveTheatres

A question.

Was this work done on/for a mac?
I ask because the archive has lots of 212 byte ._* files, and it extracted really oddly.
It will also help me narrow down where to look.
Though simply looking for if(dome) seems to be giving plenty of results so far.
rendercontext, render, shadermanager & celestiacore source files are where I am starting.

Before I start anything in depth though, I am going to get the source compiling in VS2015.
Anybody interested in looking at it once I have it running?


Janus.

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 28
With us: 15 years 3 months
Location: Suzhou, China

Post #29by Markerz » 22.02.2020, 07:30

@Janus

it would be more straightforward if you can use a diff tool to compare between 1.4.1 source code and this version.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #30by ImmersiveTheatres » 22.02.2020, 12:47

@Janus

I think originally it was created for Mac, because in 2004 Swinburne University created the first commercial mobile digital dome system, and it operated with a MacBook Pro.

Yet in time I received a mirror-warped Celestia 1.4.1 version for Windows too (you can download both at this link: https://www.dropbox.com/sh/4wxiluxmojt4jjv/AAAN4Dh1DNqUDcksdkxEXLnca?dl=0 )

I wouldn't be surprised if they are exactly the same though (I have only ever used MacBooks in my domes).

Avatar
Anthony_B_Russo10
Moderator
Posts: 671
Joined: 03.07.2018
Age: 21
With us: 5 years 10 months
Location: Tallahassee, Florida, US

Post #31by Anthony_B_Russo10 » 22.02.2020, 13:16

Very cool!
Anthony B. Russo, I like Pluto. Mod of the Celestia subreddit: https://www.reddit.com/r/Celestiasoftware/
I have over 40 computers, trying to list them here would be a pain.
Responsible for the NEO catalog: https://celestia.space/forum/viewtopic.php?f=23&t=22203
And mod of the Discord server.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #32by ImmersiveTheatres » 24.03.2020, 14:20

Just a quick hello to everyone working on adding spherical mirror projection capability to Celestia. I hope you're all well and are looking after yourselves at this difficult time.

Also, I thought you might be interested in a few comments about Celestia and Stellarium that Paul Bourke (the inventor of the spherical mirror projection method) made recently on a small planetarium forum (see below). He is not criticising Celestia and Stellarium - he is just sharing some programming insights from his point of view. I thought it might be useful for you guys to know.

Also, he asks three questions about Celestia. If you let me know the answers, I can reply for you if you wish?

Regards

Mario

-----------------------------

From: Paul Bourke paul.bourke@gmail.com [small_planetarium] <small_planetarium@yahoogroups.com>
Date: Tue, 24 Mar 2020 at 00:12
Subject: Re: [small_planetarium] Equirectangular projections from Stellarium
To: <small_planetarium@yahoogroups.com>


  > that is great. waiting for the end-to-end solution

I might not happen from me though, usually story ... I provide a
solution for a client to meet their particular requirements, if they
are happy with the pipeline/procedure then that is where it ends.

You may have noticed something similar was done with Celestia,
summaries for both here
http://paulbourke.net/dome/stellariumsphere/
http://paulbourke.net/dome/celestiasphere/

I'm no expert in either. But it seemed that it was easy to automate
the camera in Celestia to point in the 6 directions required but I
couldn't automate the window dumping. On the other hand Stellarium had
better window capture but i didn't see how to automate the camera.
In both cases I already have the image combining solutions,
dualfishe2sphere to create the equirectangular from the two fisheyes
from Stellarium and cube2sphere to create the equirectangular from the
6 cubemaps in Celestia.

There are lots of negative comments I could make about both packages
from a graphics and user interface perspective.

A few that affected this exercise:
1. Antialiasing in Celestria seems very poor.
2. Both should switch to draw in "points" rather than pixels in order
to behave properly on retina displays
3. In the case of Stellarium when saving the window contents to higher
resolution images, the line and font sizes should be increased
proportionately.
4. Since Stellarium has lots of projection mappings already why
doesn't it do equirectangular (properly)?
5. Why is fisheye limited to 180 degrees in Stellarium? Not that it
mattered in the end.
6. Why doesn't Celestia provide for window capture on Mac?

Some question for the gurus out there:
1. Is it possible to (reliably and precisely) orientate the camera in
Stellarium with scripting? I would rather create cubemaps also in
Stellarium than used the dual fisheye approach.
2. How does one change the line thickness, star size, and font size in Celestia?

Janus
Posts: 537
Joined: 13.08.2016
With us: 7 years 8 months

Post #33by Janus » 24.03.2020, 15:54

I am finally back to working on this, had to fix some hardware with kinetically accelerated failure states.
Lost months of private work, had to reinstall from scratch. //Details like monies to be settled by others, for now I am on spare hardware.

The feedback you provided above answers one question I have had in looking at approach used.
What the programmer did was basically put a pair of glasses on celestia.
Which also corresponds with the source not being standalone.
He used his own personal glx seperate from glew/glx inside celestia to provide the fisheye.
Instead of trying to work around the missing libraries as I had been, I am going another path.

Starting with 5772, I am going to add the fisheye/dome filter to ones already inside.
I am not an opengl programmer though, so any solution I arrive at will not be elegant.
The moment it gets to matrix math I am lost, those have never made any sense to me.

Still, this is an interesting puzzle, and I like puzzles.
Not like there is a lot of other work right now anyway.


Janus.

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #34by onetwothree » 24.03.2020, 16:01

ImmersiveTheatres wrote:2. How does one change the line thickness, star size, and font size in Celestia?

1. Line width is hardcoded. While it's possible to make it configurable, we want this implemented compatibly with OpenGL ES, which doesn't supports configurable line width (it means that that we need to draw a line as a quad).
2. The same for star size. Currently we don't allow to change them, while it will be good to take screen DPI into account, or at least add a correction factor.
3. How to change font size depends on your Celestia version. In 1.6 you should generate a *.txf file a *.ttf file using size you want. In 1.7 we use *.ttf fonts directly, so their size can be changed in celestia.cfg

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #35by ImmersiveTheatres » 24.03.2020, 16:17

Thank you, I will let Bourke know!

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #36by ImmersiveTheatres » 13.06.2020, 16:48

Hi everyone

I hope everyone is well.

I'm just wondering how the spherical mirror version of Celestia is coming along? :smile:

It would be BRILLIANT if it was available by the time schools begin to invite mobile planetariums back :smile: :smile:

Regards

Mario

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #37by onetwothree » 13.06.2020, 20:23

Personally I have postponed my attempts to reimplement spherical mirror in 1.7 because our current goal is Celestia on mobiles. When we have this achieved I'll return to that unless somebody else provides a patch.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 1 month

Post #38by ImmersiveTheatres » 15.06.2020, 06:03

Great. A mobile version of Celestia would be fantastic too, as plenty of people would download and play with it (although there are SO MANY astronomy apps already out there). You can even have a paid version with advertising removed, which would be excellent for the developers who have worked so hard.

A spherical mirror version will of course be used to actually TEACH hundreds of thousands of children around the world. There are currently NO COMPETITORS to Celestia for mobile digital planetariums. Celestia would be so unique here (and of course a paid version would be very welcome too).

We're so close now ... it would be brilliant if we could just push it over the finish line ... :smile:

Avatar
Anthony_B_Russo10
Moderator
Posts: 671
Joined: 03.07.2018
Age: 21
With us: 5 years 10 months
Location: Tallahassee, Florida, US

Post #39by Anthony_B_Russo10 » 15.06.2020, 06:17

There wouldn't be a paid version, it would be the full program no ads.
Anthony B. Russo, I like Pluto. Mod of the Celestia subreddit: https://www.reddit.com/r/Celestiasoftware/
I have over 40 computers, trying to list them here would be a pain.
Responsible for the NEO catalog: https://celestia.space/forum/viewtopic.php?f=23&t=22203
And mod of the Discord server.

Janus
Posts: 537
Joined: 13.08.2016
With us: 7 years 8 months

Post #40by Janus » 15.06.2020, 16:41

I tried to get the spherical source to compile, but was unable to.
While I could get the straight 1.4.1 code to comp[ile on VS2015, only took a few days even for me who is not a real C/C++ programmer.
The spherical source is missing external library(s).
It depends on libraries( of unknown version #s) that existed on the programmers computer at the time, but were not part of the source tree.

A lot of my work is making old and new things work together, or figuring out why a decade newer identical part doesn't work like the old one.
So I am very used to seeing missing libraries.
About half the time someone has added a custom or extra library to the standard system libraries, so ALL! projects have access to them, and since all the work/compiling is being done on one system, it works without incident.
Lose that system, upgrade that system, upgrade the libraries, upgrade the compiler, and you have a nearly silent basically untraceable fail.
Particularly common when a standard library is modified without renaming it.

It used libraries that were standard to that particular system, and being outside the celestia source tree, were not preserved with it.
I lack the opengl/glu/glew/??? knowledge to figure out what those are.
I will eventually get back to it, but with so much stuff that is normally running 24/7, shutdown, I am hopping between customers.

Once things are moving again, I will be taking at least a couple of weeks off, and this will part of what I tinker with.
Someone I trade favors with wants this done.
He has children, and is making them a home astronomy dome.
A raised deck with a hole in the middle, two military cargo parachutes, a weather balloon filled with nitrogen & CO2, and expanding foam.
There is some bracing he is including, flexible tent poles I think, but basically the foam is shaped between the inner and outer parachutes, supported by the balloon which provides the dome shape.
Not sure if it will end up working, but he confident of his math.
Someone he knows is mounting a time of flight optical sensor on a tilt table so he can ensure the dome is a hemisphere.
I look forward to playing with it.


Janus.

P.S. The commercial version idea goes against the principles of the project.
Make money making the experience better using big domes, almost everyone likes going to the fair.
But the base program is free and open.
Intended for education, like comparing the actual starscape from new horizons, to the computed one.
Big domes are perfect for that sort of project, and for learning.


Return to “Development”