Celestia 1.7.0 Development Thread

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: 6 years 3 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #181by Lafuente_Astronomy » 06.03.2019, 23:56

Janus wrote:@Lafuente_Astronomy

I try not to step on to many toes here.
There are some significant differences between my style, and those who actually run the forum and project.
I will be putting my personal forks up on my own site over time.

However, before I can do that, I need to create a better tool for comparing differences between files and directories.
I am working on making winmerge useful on diffing directories, not just individual files.
I need that because of the number and type of comparisons I need to do, and no usable tools for windows currently exist to do it.

Is there a particular thing you would like to see or try out?


Janus.

Well, I just want to see one with as many features from your forks as possible. But I'll wait for that instead. When the official Celestia 1.7.0 is released, I'd like to test it out with your forks one day.
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.

Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 1 month

Post #182by onetwothree » 07.03.2019, 11:28

LukeCEL wrote:Stupid question, why is it that my 1.7.0 build seems to read earlier versions of my files? I've noticed that changes I make to files don't appear in Celestia 1.7.0.

For example, even though I've finished my Carina Dwarf add-on, it still displays a previous version where I was playing around with the distributions and marking the stars as M-type or O-type stars:

You older files are put into a directory read by Celestia.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #183by selden » 07.03.2019, 14:56

@Janus

That's a lot better!

@LukeCEL

I suspect Celestia isn't looking in the directory which contains your updated Addons.

You can edit celestia.cfg to control where Celestia looks for Addons. Look for the section which starts with the line
# The 'extras' directory is located under the celestia root directory

If you don't edit the config file, they should be in the folder \extras\
The \extras\ folder must be located inside the same folder where you put your updated copy of celestia.exe (or whatever you're calling it).

Also, make sure you've moved your older (backup) versions of your Addons into some folder which is not in the Celestia folder and which is not mentioned in celestia.cfg so that Celestia can't find them. (e.g. I use a folder on my desktop called prev_addons)
Selden

Avatar
LukeCEL
Posts: 373
Joined: 26.09.2017
With us: 7 years 1 month

Post #184by LukeCEL » 08.03.2019, 01:53

At this point, I'm totally confused, because my Celestia build doesn't respond to any changes I make to my default 1.6.1 installation. :fie:

For example, when first loading the splash screen shows which files it's loading. The last one it's loading is called M2-9.ssc so I decided to move that file straight to my Desktop. However, when I clicked on celestia-qt, it still said that it was reading that file. So then I decided to move the whole Addons folder, from /Applications/Celestia.app/Contents/Resources/CelestiaResources/extras/Addons where it was, to the Desktop. It still read all the add-ons in it, even though my normal 1.6.1 doesn't.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #185by selden » 08.03.2019, 04:35

That's very strange. It certainly doesn't do that to me. v1.7.0 uses only what's in the v1.7.0 folder and v1.6.1 uses what's in the v1.6.1 folder.

Is there any chance you accidentally selected "Create shortcuts here" instead of "Move here" ?

FWIW, I used the v1.6.1 installer to create the directory C:\MyPrograms\Celestia (Note: it's not in the system's Program Files). That's where I do all my development, to ensure compatibility.

Similarly, v1.7 is in C:\MyPrograms\celestia-win64-1.7.0 but I'm pretty sure I created that directory only by copying files into it. I don't think I used an installer. If I did, though, I would have renamed v1.6.1's Celestia folder to something else (Celestia_tmp), then installed v1.7.0, specifying the folder name Celestia, then later renamed it to celestia-win64-1.7.0, and then renamed Celestia_tmp back to Celestia.
Selden

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

Post #186by Janus » 08.03.2019, 05:01

@LukeCEL

If you are on windows there is an easy test.
Grab this and place it on your desktop.
Extract it in place, this will create a Celestia directory on your desktop.
In it, you will find several Celestia executables of commit 5429, the ones marked hubble will zoom to Pluto at full screen from earth.
All of them are completely statically linked, and portable.
I should warn you that archive has the 2M star database enabled by default, you change it back by renaming the old one after looking in data.
It will ignore all other instances of Celestia anywhere on your system.
I have over two dozen active copies between my research and compiler drives, and none of them step on each other's toes.
If it works normally, you can start copying addons to it.
If you have a problem with Albedo errors in your log file, go back a ways and snag my Legacies fix for Selden, it does Albedos without the errors.

If you are on Win7 or later, give explorer++ a try, unlike the one M$ foisted on the world, it actually works.


Janus.

Avatar
SpaceFanatic64
Posts: 427
Joined: 16.08.2018
Age: 18
With us: 6 years 2 months
Location: Southern California

Post #187by SpaceFanatic64 » 08.03.2019, 05:36

Janus, I'm afraid that won't be helpful as for all I know, Luke is a Mac user, not a Windows user.
If you see that I made a dumb or nonsensical post years ago, please forgive me in advance.

pirogronian
Developer
Posts: 234
Joined: 05.01.2018
Age: 38
With us: 6 years 10 months
Location: Wrocław
Contact:

Post #188by pirogronian » 08.03.2019, 05:48

I have 1.6 v installed on my Linux, and 1.7 build, but not installed. The 1.7 seems to read only data from its build directory, not from 1.6.
Still formally developer, but too tired to develop. I feel sad, but Celestia is going forward despite it.
Btw, the universe is ruled by electricity.

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

Post #189by Janus » 08.03.2019, 07:51

I have had many customers {Or their employees :wink: } who have accidentally created hardlinks or shortcuts while doing something else.
So ensuring the copy he thinks is being run really is, should be his priority.
I also know even less about macs than I do about linux, which is a good example of very little.
All I can do a this point then is wish him luck.


Janus.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 1 month
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #190by cartrite » 08.03.2019, 15:02

Do you have hidden files enabled? I come to find out many are hidden. Google show mac hidden files.

Added after 6 minutes 34 seconds:
It goes something like this, defaults write com.apple.finder ShowAllAppleFiles true, then killall Finder Hidden files should be visible. Then you may see whats going on.

Added after 31 minutes 45 seconds:
Actually, defaults write com.apple.finder AppleShowAllFiles true. Then restart finder. A lot of apple folders start with a . whiich makes them hidden like linux. Its tricky to show them though. Another thing to try is to rebuild celestia-qt and change the ifdef Target_MacOS to if 0 in qtappwin.cpp. The exact place was posted by onetwothree in the wiki thread you started. Improving celestia wilibook.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
LukeCEL
Posts: 373
Joined: 26.09.2017
With us: 7 years 1 month

Post #191by LukeCEL » 08.03.2019, 21:13

Wow, thanks for all the feedback, everyone!

selden wrote:Is there any chance you accidentally selected "Create shortcuts here" instead of "Move here" ?

When I move files, it's usually by dragging them. Actually, if the files are anywhere within the Applications directory, you have to press Command (⌘) while dragging it, otherwise it'll simply create an alias. So I don't think I created any shortcuts, although as Janus said, I might have done so accidentally.

Even if I did, however, it doesn't explain why I have bright red and blue stars all over the Carina Dwarf. I made those stars bright as a test, and then when I was done, I copy-pasted the new contents to essentially overwrite the test stars. Just to be sure, I copy-pasted the new contents into a new "carina_dwarf.stc" file, then moved the old one to the Trash, but that didn't work either.

cartrite wrote:Do you have hidden files enabled? I come to find out many are hidden.
Wow, I didn't know until now that hidden files were a thing. For me, the shortcut Command+Shift+. works for me. What kinds of hidden files am I looking for, exactly? Repeatedly pressing Command+Shift+. exposed many other hidden files, but none in /Applications/Celestia.app/Contents, or ~/Documents/celestia170/usr which is where I've installed my test 1.7.0 build.

cartrite wrote:Another thing to try is to rebuild celestia-qt and change the ifdef Target_MacOS to if 0 in qtappwin.cpp.
Would I change line 13 to "#if 0"?

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 1 month
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #192by cartrite » 08.03.2019, 21:34

No,not line 13. Line 227. It should say ifdef TARGET_OS_MAC. Change to if 0. The reason, there are statements about domain and user, etc. That code may be adding paths. I had to change it cause Celestia couldn't find resource folder. Maybe yours is finding too many resource folders. The hidden files I mentioned are actually folders. In finder I goto computer. I see Mojave. Click on that I see Applications, Library, etc. With all files set to true, I see usr, tmp, bin, etc. That's how I can see usr/local/share, lib, bin,etc. They are hidden for some reason.

Added after 33 minutes 8 seconds:
Also, when I did make install, celestia-qt was installed in usr/local/bin and the rest in usr/local/share/celestia. Not in a usr/ in home folder. You may have it there too. You probably will if you rebuild with code change.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
LukeCEL
Posts: 373
Joined: 26.09.2017
With us: 7 years 1 month

Post #193by LukeCEL » 09.03.2019, 02:59

Aha, thanks for the tip. My Celestia 1.7.0 build now displays the objects defined in the GitHub repository, i.e. none of my add-ons. That's a step, but my edits still won't appear! Here's what I tried:

1. I renamed the stars.dat in /usr/local/share/celestia/data/ to stars-hip.dat, and then added a new file, my new stars.dat file. The old one has HIP 37, but the new one doesn't. When I ran celestia-qt, it still displayed HIP 37.
2. I changed "1 Ceres:Ceres:A899 OF" in asteroids.ssc (same directory) to "1 Ceres:Ceres". When I ran celestia-qt, it still displayed 1 Ceres / Ceres / A899 OF.
3. In celestia.cfg, I commented out the line with comets.ssc, but when I ran celestia-qt, it still had all the comets defined in it.

To me, it seemed a pretty clear indication that I was looking in the wrong place. But trying the same things in ~/testdir/Celestia/ didn't work either. (testdir is the folder where I cloned the GitHub repository.)

Maybe if I made changes to the files in testdir first, and then compiled it, it would work? That's what I'm trying right now.

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 #194by Lafuente_Astronomy » 09.03.2019, 04:11

LukeCEL wrote:1. I renamed the stars.dat in /usr/local/share/celestia/data/ to stars-hip.dat, and then added a new file, my new stars.dat file. The old one has HIP 37, but the new one doesn't. When I ran celestia-qt, it still displayed HIP 37.

Out of curiosity, what's the difference between your star.dat file and the vanilla one aside from the removal of HIP 37? When i downloaded it and transferred it to my Celestia 1.7.0, it is slightly larger in data than the vanilla.
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
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 1 month
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #195by cartrite » 09.03.2019, 14:48

This is strange. Once installed, you should be able to edit as you choose. As long as the file permissions are correct.

Do you have known file extensions visible? Can you see .app on all your Applications? Maybe after editing a hidden file extension is added like .txt making it unusable.

Another thing, the text-edit app is tricky.
For me at least. When using it to edit, it saves all automatically. If I make a change then close the file, the change is saved even if I wanted to discard it. Maybe.....
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
LukeCEL
Posts: 373
Joined: 26.09.2017
With us: 7 years 1 month

Post #196by LukeCEL » 09.03.2019, 22:38

Lafuente_Astronomy wrote:Out of curiosity, what's the difference between your star.dat file and the vanilla one aside from the removal of HIP 37? When i downloaded it and transferred it to my Celestia 1.7.0, it is slightly larger in data than the vanilla.
I have the improvements written here under "Changes".

cartrite wrote:Do you have known file extensions visible? Can you see .app on all your Applications? Maybe after editing a hidden file extension is added like .txt making it unusable.
I don't believe it's TextEdit, since I can edit files in my 1.6.1 and it'll work just fine. Just to be sure, though, I set "Show all filename extensions" and I didn't see any name changes.

That does remind me of when I first started playing around with Celestia's data files. I didn't know that TextEdit automatically changed straight quotes to smart quotes, so everything I touched became broken! That took a while to figure out. My problem is probably something small and tricky like that.

Avatar
LukeCEL
Posts: 373
Joined: 26.09.2017
With us: 7 years 1 month

Post #197by LukeCEL » 10.03.2019, 18:54

LukeCEL wrote:everything I touched became broken!

Great. I was fiddling around with things, and now any 1.7.0 build that I make will not work, because when I do, it says "Error reading configuration file". :fie: :cry:

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 1 month
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #198by cartrite » 10.03.2019, 21:38

I ran into that error myself. But it always went away when I did that if 0 fix and rebuilt.
On another note, I've been playing with my linux builds. I actually built version 1.6.1 today and noticed it reads the files from usr/local/share/celestia even though I never installed it. I've been running it from the build directory. So this also happens with linux.
I also installed celestia with yast. It installed it in usr. usr/bin usr/share, etc. On Tumbleweed, its installing from github. Celestia 1.7.0 (Qt5 beta version, git commit 9d51cbfa). :smile:
The reason, I was looking for a reason why earth's oceans were so bright with normalmaps. I found that the specular color was too high. I added a 1 before all.

Code: Select all

SpecularColor [ 0.150 0.144 0.140 ]
. Looks a lot better now with specular and normalmaps working as well.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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 #199by Lafuente_Astronomy » 10.03.2019, 21:39

LukeCEL wrote:Great. I was fiddling around with things, and now any 1.7.0 build that I make will not work, because when I do, it says "Error reading configuration file".

Mine actually does the same thing once you put in addons. But after a while, it loads as normal. What about yours?
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
LukeCEL
Posts: 373
Joined: 26.09.2017
With us: 7 years 1 month

Post #200by LukeCEL » 10.03.2019, 22:50

cartrite wrote:I ran into that error myself. But it always went away when I did that if 0 fix and rebuilt.
Yeah, I rebuild it after doing the "if 0" fix, and it worked again, displaying the GitHub repository objects (i.e. none of my add-ons). So that's good. I still haven't found a way to edit the contents of the 1.7.0 build after I've compiled it. It's weird, though, because I've never had the "Error reading configuration file" before, usually it would just read from my 1.6.1 build (but an older version, for some reason).

If only Celestia could display the absolute path of the files it's reading, not just "data/asteroids.ssc" or whatever. Is this possible?

Lafuente_Astronomy wrote:Mine actually does the same thing once you put in addons. But after a while, it loads as normal. What about yours?
I'm not sure what you mean here. How did you install add-ons, and what do you mean by "after a while"?


Return to “Development”