Spherical Mirror Projection?

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Lafuente_Astronomy
Moderator
Posts: 713
Joined: 04.08.2018
Age: 22
With us: 1 year 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: 13
Joined: 09.04.2018
With us: 2 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: 713
Joined: 04.08.2018
Age: 22
With us: 1 year 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: 494
Joined: 13.08.2016
With us: 3 years 9 months

Post #24by Janus » 23.01.2020, 23:10

Thx.
Very much looking forward to seeing it.


Janus.

Avatar
Topic author
ImmersiveTheatres
Posts: 13
Joined: 09.04.2018
With us: 2 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: 713
Joined: 04.08.2018
Age: 22
With us: 1 year 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
Forum Admin
Posts: 360
Joined: 08.10.2019
With us: 7 months 27 days

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 • Contributing to development as much as I can • The Other Discord is still there...
PC specs: HP desktop, Windows 10 Home 64-bit, Intel Core i7-7700 (3.60 GHz), 16 GB RAM, 1 TB HDD + 128 GB SSD, Intel HD Graphics 630
Celestia versions: 1.5.1, 1.6.1, 1.6.2 (primary), and multiple 1.7.0 builds

Janus
Posts: 494
Joined: 13.08.2016
With us: 3 years 9 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: 139
Joined: 29.01.2009
Age: 24
With us: 11 years 4 months
Location: Hangzhou, 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: 13
Joined: 09.04.2018
With us: 2 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: 419
Joined: 03.07.2018
Age: 17
With us: 1 year 11 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 30 computers, trying to list them here would be a pain.

Avatar
Topic author
ImmersiveTheatres
Posts: 13
Joined: 09.04.2018
With us: 2 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 [email protected] [small_planetarium] <[email protected]>
Date: Tue, 24 Mar 2020 at 00:12
Subject: Re: [small_planetarium] Equirectangular projections from Stellarium
To: <[email protected]>


  > 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: 494
Joined: 13.08.2016
With us: 3 years 9 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
Developer
Posts: 460
Joined: 22.09.2018
With us: 1 year 8 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: 13
Joined: 09.04.2018
With us: 2 years 1 month

Post #35by ImmersiveTheatres » 24.03.2020, 16:17

Thank you, I will let Bourke know!


Return to “Development”

Who is online