Spherical Mirror Projection?

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 7 months

Spherical Mirror Projection?

Post #1by ImmersiveTheatres » 09.04.2018, 14:09

Hello

I own and operate my own mobile planetarium business and Celestia 1.4.1 continues to be as important to me as Stellarium and my catalogue of fulldome (360°) films.

I use Celestia ver 1.4.1 adapted for spherical mirror projection. This version was commissioned by Discovery Dome many years ago and it is available free to its customers.

Of course 1.4.1 is an older version with limitations (and a few bugs).

It would be wonderful if an official spherical mirror projection option was incorporated into Celestia in the future. This would make Celestia of great value and interest to the large and growing number of small and medium digital dome operators around the world.

Is a version with a spherical mirror projection option perhaps already in development?

I'm not a programmer, but would love to help where I can. Please let me know if any developers would like to see a copy of the 1.4.1 spherical mirror version I have?

Thanks very much.

Mario

mmontag
Posts: 3
Joined: 09.04.2018
With us: 6 years 7 months

Post #2by mmontag » 15.04.2018, 08:49

Hi Mario, that sounds really cool.
Would be cool to see that modified version 1.4.1, but don't happen to have a copy of the source, do you?

Matt

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 7 months

Post #3by ImmersiveTheatres » 18.08.2019, 13:47

Hello Matt

Apologies for my VERY late reply, but I thought I had email notifications turned on! Plus, to be honest, I didn't expect anyone to take an interest in my post, as the mobile planetarium community / industry is relatively small and the Celestia developers probably have far more important work they're busy on.

Are you still interested in seeing a copy of ver. 1.4.1 modified for spherical mirror projection?

It would be AWESOME if you (or any of the developers) could apply the same distortion to the current version and it suddenly became usable in a mobile planetarium!!

Please let me know (I have email notifications turned on now :)

Thanks very much

Regards

Mario

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

Post #4by Janus » 18.08.2019, 16:54

@ImmersiveTheatres

I would be very interested in acquiring a copy, both to use, and to study.
If it comes with source that be great, if not, I can try to derive what was done via compare contrast with reconstructed source.
Mostly though, I am simply curious about opengl code to do spherical projection.
Someone I trade favors with is working on a tiltpan filter for opengl to give focus depth to renderings.
This would be a nice reference point.


Janus.

EDIT: Fixed word choice.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 7 months

Post #5by ImmersiveTheatres » 21.12.2019, 09:22

OK this is strange. @Janus I was not notified of your reply, even though I have notifications turned on! In fact, as you can see from my screengrab below, I have not received any notifications. Can anyone please explain what I'm doing wrong?

@Janus and anyone else, please email me for a copy of the spherical mirror version of Celestia 1.4.1. mario[at]immersive-theatres.com

It would be BRILLIANT for the small planetarium community AND Celestia, if we can once again begin using Celestia in small planetariums!

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

Post #6by Lafuente_Astronomy » 21.12.2019, 13:00

ImmersiveTheatres wrote:OK this is strange. @Janus I was not notified of your reply, even though I have notifications turned on! In fact, as you can see from my screengrab below, I have not received any notifications. Can anyone please explain what I'm doing wrong?

@Janus and anyone else, please email me for a copy of the spherical mirror version of Celestia 1.4.1. mario[at]immersive-theatres.com

It would be BRILLIANT for the small planetarium community AND Celestia, if we can once again begin using Celestia in small planetariums!

1: Did you either "Subscribed" or "Bookmarked" the topic? Because if you don't, you'll not be notified of any replies in any post. However, normally, you'll be notified if a member posts on your topic, so I do not know what's wrong. Just to be safe, either subscribe to the topic or bookmark it, or do both.

2: Perhaps you can try checking if Celestia 1.6.1 or Celestia 1.7.0 could be allowed for small planetarium projections. If not, hopefully onetwothree or Markerz could find a way to incorporate it in there.

3: With regards to Celestia being used for small planetariums, it would be a great honor to do so. In the days in which more advanced software now exist and dominate the market, I think that we, as a community based on a freeware program about astronomy would be very happy to cooperate with small planetarium groups since we focus on educational purposes. That being said, I think our cooperation would be beneficial.
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 7 months

Post #7by ImmersiveTheatres » 21.12.2019, 16:13

Thank you for your reply @Lafuente_Astronomy

1: I have now subscribed and bookmarked this topic.

2: Apparently only Celestia 1.4.1 was modified for projection with a spherical mirror in digital planetariums. The work was commissioned by Discovery Dome for its customers, many years ago.

Please let me know if you (or anyone else) would like a copy of Celestia 1.4.1 for spherical mirror (as I am a sales agent for Discovery Dome and authorised to share a copy).

3: Fantastic that you would like to promote the use of Celestia in small planetariums! The community would be SO grateful to you, because Celestia is a wonderful application that looks BRILLIANT in a digital planetarium. Plus most small mobile planetarium operators cannot afford the expensive propriety applications available in the industry. That's why Stellarium is appreciated so much - and I know Celestia would be as well.

Please let me know what else I can do to support the Celestia community in this project.

I'm not a programmer, but I'm sure it will be VERY easy for you to adapt Celestia for the spherical mirror, because:
- we already have one version adapted for the spherical mirror ie. Celestia 1.4.1
- Stellarium is now very advanced in its support for the spherical mirror
- Paul Bourke (the inventor of spherical mirror projection) is an academic who makes all the information and support you require freely available on his website eg http://paulbourke.net/dome/stellarium/

Looking forward to working with the Celestia developer community to promote and expand this wonderful application you have created!

Mario

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

Post #8by Janus » 21.12.2019, 20:29

@ImmersiveTheatres

I would appreciate it.
I can reverse it and the 1.4.1 release, then compare them to see how the projection is done.
With the 1.4.1 source as a guide, finding the differences should be straight forward.

That is not to say it will be fast or easy, just straight forward.


Janus.

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

Post #9by Lafuente_Astronomy » 21.12.2019, 22:07

ImmersiveTheatres wrote:Looking forward to working with the Celestia developer community to promote and expand this wonderful application you have created!

Well, I can help you with that. Go to either onetwothree or Markerz here in the Forum or make a GitHub account, then go to this site: https://github.com/CelestiaProject/Celestia. And then post your concern as part of the issues that the Celestia Development has to face.
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 7 months

Post #10by ImmersiveTheatres » 22.12.2019, 07:48

Thank you for the advice @Lafuente_Astronomy, I have joined GitHub and opened a request for spherical mirror projection.

I have also shared my Celestia 1.4.1 (planetarium version) with @Janus. If anyone else would like a copy, please let me know.

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

Post #11by Janus » 23.12.2019, 06:37

Okay, here is what I have so far.
This is preliminary, the sort of thing I give after a once over to be sure the project itself is properly defined.
Quite often goals are modified at this point, once the actual scope is understood.

The spherical projection system is based on a type of mesh mapping distortion of the data layer.
In this case, a brute force approach is taken, no elegance, just simplicity.

The layering Celestia uses to keep text & the gui separate from the data display is used as base.
The data layer is remapped as a texture through a mesh map.
The basis for what is done can be explored at:

http://cse.csusb.edu/tongyu/courses/cs520/notes/texture.php

In this case a half sphere is used, then the data layer is projected on to the inside of it.
While the text layer is also projected, the method used makes the text display oddly as a by product.

Before I can go into this any further here, I need to know the status of the program.
While I can give a decent amount of detail, I need to know if I can use the program itself to do so, or if I need to use other props.
As best I can tell at this time, it is derived from publicly available examples when it was written, but I have no proof one way or another.

I can also at this point reproduce what was done, though I would need help with the opengl commands since I lack experience and knowledge with it.
I know what to do, but lack the specific knowledge to actually carry out the implementation steps.

I also believe there are more efficient ways to accomplish the same thing, but someone who actually knows opengl would be the one(s) to make that judgement.


Janus.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 7 months

Post #12by ImmersiveTheatres » 23.12.2019, 06:53

Thank you for your initial overview and summary @Janus.

>>Before I can go into this any further here, I need to know the status of the program. While I can give a decent amount of detail, I need to know if I can use the program itself to do so, or if I need to use other props. As best I can tell at this time, it is derived from publicly available examples when it was written, but I have no proof one way or another.

I'm not sure I understand your request here, but I know years ago a programmer was paid to modify Celestia 1.4.1 for mirror projection - and all warp meshing resources utilised originate with Paul Bourke and are publicly available eg: http://paulbourke.net/dome/warpingfisheye/

As mentioned before, Paul Bourke is very generous with knowledge and support and he will be pleased to learn the Celestia development team is considering including spherical mirror functionality. Please feel free to contact him directly if necessary: paul.bourke[at]gmail.com

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

Post #13by Janus » 23.12.2019, 16:10

The issue here is whether the specific work is open source.
While the guide(s) may be free or open source, a specific implementation may not be.
The legal system fights to keep these issues from being straight forward.

So while I am sure I can reproduce from scratch all of the files needed, it would be simpler to use what exists.
It comes down to reusing or re-implementing the wheel.
Either can be appropriate, depending on circumstances.

Unless the programmer, or copyright holder of that version gives release, the best I can do is reinvent the wheel.
In this case, that means implementing based on what I see from the outside, without looking inside.
As I have time I will search for examples predating the 2005 date of the program.
If I find them, that will establish prior art, meaning the only thing presenting a problem will be the actual data files.
I still won't be able to use the existing art(Data files), but the rest will be fair game.
The same issue faced when using a game engine, while the engine may be open source, the game files (levels/textures) are not.

That isn't a real problem however, since what is done is not that complicated.
I can give those who know opengl a starting point however.
Textures are remapped using a mesh.
The star and body positions are adjusted using a vertex shader.

Here is the normal 1.4.1 start screen with POV matched to target.
Celn.jpg


And here is projector 1.4.1 start screen target.
CelW.jpg



Then here are opengl commands that produced them.
Generated using apitrace, then matching frames dumped to text.
celwn.7z
(459.2 KiB) Downloaded 340 times


A simple diff of the opengl commands will show the technique.
If I can find solid prior art, then I will delve into the program itself.


Janus.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 7 months

Post #14by ImmersiveTheatres » 24.12.2019, 12:32

From now on, perhaps we can follow the discussion and progress here:

https://github.com/CelestiaProject/Celestia/issues/572

I've managed to find the original creator of the dome version of Celestia 1.4.1 and we may soon have the source code.

Thank you.

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

Post #15by Janus » 24.12.2019, 16:32

For my part, I prefer to stay here.
I do not do places like github.

Still working on this for fun.
Compare and contrast is easier than most of my work.


Janus.

Avatar
Topic author
ImmersiveTheatres
Posts: 16
Joined: 09.04.2018
With us: 6 years 7 months

Post #16by ImmersiveTheatres » 24.12.2019, 17:03

OK no problem, I will update both forums.


I have contacted Discovery Dome and they don't have the source code, so they referred me to Paul Bourke, who was originally commissioned to do the work.

Paul Bourke says he does not have the source code either, because he employed a programmer called Evan Hallein to create the dome version of Celestia 1.4.1.

I have managed to contact Even Hallein and he thinks he may no longer have the source code, but he will check when he returns from holiday in two weeks time.

I will follow up with him next month to try and obtain the source code.



During my investigation, both Discovery Dome and Paul Bourke were delighted to hear the Celestia development team wishes to incorporate a spherical mirror option for Celestia.

In fact, Paul Bourke said that if we cannot obtain the original 1.4.1 source code: "...assuming Celestia already creates fisheye, then the warping is pretty straight forward. It is normally the fisheye bit that the harder part."

Discovery Dome said: "That would be cool to get Celestia up to date and warped (because WorldWide Telescope isn’t available for Mac). As for the source code ... probably would be better to start from scratch and use external warp meshes so we can go up to 4K, larger domes, etc…"

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

Post #17by Janus » 25.12.2019, 18:01

For amusement purposes, I have managed to get the celestia 1.4.1 source to compile in VS2015.
Though I had to update the LUA to 5.1, and make some other minor adjustments.

Static linked of course, but it runs.
Only x86 so far, but it runs.

If anyone wants to play with it, let me know.
Though I should warn you it may not work with current data or other stuff.

The festivities have begin, enjoy the holidays.


Janus.

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

Post #18by Janus » 23.01.2020, 05:20

Just wondering if anyone has heard anything about the original source yet?


Janus.

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

Post #19by Lafuente_Astronomy » 23.01.2020, 05:30

Janus wrote:Just wondering if anyone has heard anything about the original source yet?


Janus.

What do you mean by "original source"? 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: 8 years 3 months

Post #20by Janus » 23.01.2020, 06:29

The source that includes the spherical aberration/projection code.


Janus.


Return to “Development”