Stars don't show after 10s of millions of light years

Report bugs, bug fixes and workarounds here.
Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Stars don't show after 10s of millions of light years

Post #1by Dimethylmercury » 05.09.2017, 17:28

PC Specs: Intel Pentium N3540 @2.16 GHz, 4 GB RAM, 64-bit system, Intel HD Graphics card.
Celestia 1.6.1

I am not sure if this was posted before, since I couldn't find anything related to it.

When I made a star in a galaxy Centaurus A, which is 11 million LY away, stars show perfectly fine.
But when I tried putting the stars into my favourite Whirlpool Galaxy, which is 23 million LY away, it only was invisible.

Is this an overall program restriction, and is there any way out of this?

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 8 months
Location: NY, USA

Post #2by selden » 06.09.2017, 00:24

Yup. That appears to be beyond the max drawing distance for STC objects.

You seem to be doing better than I am. The maximum distance that I can persuade the Windows version of Celestia v1.6.1 (downloaded from SourceForge) to draw stars is between 10.22 and 10.23 M LY, maybe within about 100 LY of the latter..

A workaround might be to use DSC objects instead: a Nebula with a Mesh that looks like a star, for example. Unfortunately, orbits, planets, and similar objects won't work with them.

DSC GlobularClusters aren't drawn correctly that far away, either. :(
Selden

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 8 months

Post #3by John Van Vliet » 06.09.2017, 05:03

there is a easy hack for that
BUT
if you have many stars and planets at a large distance there is a performance hit on the starDB

edit
src/celengine/stardb.cpp

line 48
then rebuild celestia

a star and planet at 320 million LY
Screenshot_20170906_005445.png

Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Post #4by Dimethylmercury » 09.09.2017, 11:16

I can't seem to find that stardb.cpp in celestia, neither /src folder...

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 8 months
Location: NY, USA

Post #5by selden » 09.09.2017, 12:22

the file stardb.cpp should be in the directory celestia/src/celengine
If it isn't, you don't have all of the source code.

FWIW, under Windows I like to use the program "Everything" by David Carpenter. It locates NTFS files instantly (after having indexed everything, of course).
https://en.wikipedia.org/wiki/Everything_(software)

find is a Linux command which can be used to locate files.

p.s. If you don't have the source code, you can download the version of Celestia's source code that Alex is working on from https://github.com/CelestiaProject/Celestia
Selden

Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Post #6by Dimethylmercury » 01.10.2017, 11:16

I downloaded the corresponding src folder, but in the starsdb.cpp Notepad remade the lines, as always, and I can't find Line 48.

What text should I edit there? Like text around it or smt like that

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 8 months
Location: NY, USA

Post #7by selden » 01.10.2017, 11:52

(oops, sorry: ignore this. I accidentally responded to an old post)
Selden

Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Post #8by Dimethylmercury » 03.11.2017, 11:45

Well, I managed to find that line using Notepad++.

I have all the source code, But how do I rebuild celestia?

If I simply restart it it doesn't work :eh:

Avatar
CM1215 M
Posts: 221
Joined: 30.08.2017
Age: 22
With us: 6 years 8 months
Location: Ohio, U. S. A.

Post #9by CM1215 » 03.11.2017, 12:24

I think by "rebuild" he means take all the source code and recompile it into the full program, though I know not how to do this either... :think:

I suggest you wait for Selden to respond...he will know. :wink:
CM1215: Celestial master in learning.

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 8 months
Location: NY, USA

Post #10by selden » 03.11.2017, 19:38

Right:

"Rebuiding" involves downloading all of Celestia's current source code from GitHub and invoking an appropriate compiler and linker to compile those source code files into binary files and then linking those files together with Qt graphics, Windows C++ and operating system runtime libraries to form a runnable program.

I stopped rebuilding Celestia a few years ago. Trying to stay compatible with the most recent versions of the Qt libraries, Microsoft's C++ compiler and other libraries was taking too much of my time.

However, forum member Janus has been successful in building the current version of Celestia using a recent version of Microsoft's Visual Studio C++ development environment. Maybe he can be persuaded to provide step-by-step instructions for how to build Celestia for Windows.
Selden

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

Post #11by Janus » 04.11.2017, 04:39

Ask and you shall receive, an answer anyway.

I started with a clean system, because I was silly enough to try installing VS2017 on my previous build.
(I say silly because I run a Win7 system modded to look/mostly work like 2K/XP, and VS2017 happily borks that setup.)

Install VS2013, with MFC, I used pro since I was able to borrow then later purchase a copy second hand.
Your mileage with express or community may vary, I don't run either of them because I will not have any M$ accounts.
Install MBCS (Multibyte character support), this is because M$ dropped everything non unicode for VS2013, then brought it back in VS2015 when they figured out they couldn't force everyone to drop multiplatform programming.
You can get it from M$, or from my downloads if you like.
I also have prebuilt celestia versions as well.
Be sure editor has line numbers turned on, you WILL!!! get lost without them.
(Tools/Options/Text Editor/'C/C++'/General/Settings/Line numbers)

Grab the source from github(Current version I just grabbed is VS2013-x86-x64 and has 5270 commits)
I made a clprojects directory, put the source zip into it.
Extract zip in place, this creates a vs2013-x86-x64 directory.

Start VS2013, open /clprojects/celestia-x86-x64/celestia.sln and be patient.
It has to build a file index the first time you open it, and it can take a while.

From Build, select Batch Build, check x86 & x64 release, and compile.
Be patient once again, it takes a while.
This will, assuming the moon is in the right phase, jupiter hasn't wandered off, and Venus is in a good mood.
Give you Celestia-x86.exe & Celestia-x64.exe in /clprojects/celestia-x86-x64 where you can find them easily.

The only requirement you should have at this point, is that the VS2013 redists need to be installed.
Both versions, x86 & x64, are fully statically linked, requiring no support dlls to run.

I have built VS projects for each of the support libraries, and compiled them with VS2013.
They are intended to go in /clprojects beside celestia, then have headers and libs copied as needed.
This is so that when the time comes, VS2015 can be embraced by recompiling as needed.
I am still working out some bugs, but they are compiling, linking, and displaying properly.
Once I am done, I will sending them Alexell so he can put them up on their own.

If you are wanting to compile with QT, then all you need to do is install QT creator.
The code compiles with QT 5.4/5.6/5.8/5.9 in 32 & 64 both.
Though QT does require a matching libintl.dll & QT support DLLs both.
The QT DLLs include those in a pair of subdirectories in addition to the ones in the Celestia root.
An example is in my downloads, which is VS2013 w/QT5.4, and should run on any windows system with VS2013 x86 redists installed.
I should have an x64 version up this weekend if my life stays on track.

I hope this answers any questions anyone has.

Also, I am working on making a Mingw compiled version of Celestia using Mingw5.30 available with QT, and I am nearly done preparing the support libs.
Once I have done that, I will move on to 64 bit, which I have located elsewhere, but is the same version QT has.
Then VS can be abandoned if need be, since I can concieve of no circumstances under which I will ever install VS2017.
I will only be testing with VS2015 once I can afford a copy, and it is not cheap.
I say again, no express or community version for me since I will not have an M$ account, ever.
I repeat myself on that only because I keep getting reminded it is free.
I have reasons, and they are permanent.

I hope this is able to help people get in motion.
The more people are working on it, the more can be done.

Janus.


P.S. I have also put up a solar system tour on DVD made using Celestia, if anyone is willing, I would like to get some feedback.

Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Post #12by Dimethylmercury » 04.11.2017, 10:39

OMG...

Thanks for response!
A very clear explanation, but it will take some time before my planetary head sinks in...

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

Post #13by Janus » 06.11.2017, 01:44

I hope my reply was clear enough.

If it was not, please let me know.

If it helps, then all should be well.
Should I put up VS exe compiles with star distance set to a gigayear?


Janus.

Avatar
John Van Vliet
Posts: 2940
Joined: 28.08.2002
With us: 21 years 8 months

Post #14by John Van Vliet » 06.11.2017, 04:06

even when running XP i had given up on Visual Studio and moved most things to MinGW and Autotools

however the QT5 "celestia.pro" should build easily on Windows

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

Post #15by Janus » 06.11.2017, 04:36

@John Van Vliet

Currently the celestia.pro file in the source builds with VS2013 & QT Creator using QT 5.4/5.6/5.8/5.9 in 32 & 64 bit both.
QT requires lots of support DLLs though, which I why I do not really like it much.
However, the source also compiles with the Mingw5.30 available with QT creator.
I am still in the process of getting the support libs working with Mingw, using the one with QT creator of course.
It compiles, but does not have compatible libraries to link with.

Once I have Mingw working through QT creator, I am going to see if I can get it working straight.
Working in 32 & 64 both first that is.

I have been studying make files for years now, and still find them confusing.
What little reference there is uses circular references in explaining things.
This I have been using batch files in command prompts with mingw to compile the support libs.
Eventually I am hoping to either grok make files, or develop a series of batch files to compile Celestia.

There is effectively zero chance I will ever go to VS2017, since it is hostile to how I set my system up.
I am also never going to newer versions of what M$ labels W8/W8.1 or W10.
They are increasingly broken by design, and are intended to be little more than cloud storage front ends.
The basic design of W10 is cloud account centric.
That is in addition to the telemetry inherent in W10, which is insecure and apparently intended to be so.

So Mingw & ReactOS it is for me, at least in the long run.
Once ReactOS goes beta, or soon after anyway.

I simply do not get along with how Linux does things.
I know some people do, and I wish them well, but I will not be joining them using it.
I have no idea if the source compiles in Linux, and have no way to test at this time, even if I knew how.
Given that it compiles with Mingw, I believe it should with gcc, but is out of my skill set to test.

I do not care if it compiles for mac, if mac users want it work, they can fix it themselves.
I have nothing against it working in mac, it is simply of zero interest to me.
I will not be using a mac, ever, it is a personal thing and not intended to be any sort of insult to anyone who uses one.

I hope some of the progress I have made helps others.
It would be great if it enables more people to compile it for themselves.
Then with more eyes looking over the code, and more ideas being considered.
Progress, adaptation and if needed, modernization can happen.


Janus.

Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Post #16by Dimethylmercury » 07.11.2017, 19:06

Sure, please put up VS.exe compiles with distance set to a gigayear.

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

Post #17by Janus » 08.11.2017, 02:31

@((CH3)2Hg)

Here you go.
STAR_OCTREE_ROOT_SIZE changed to 1gigayear, then compiled with VS2013.

It runs, but I have nothing appropriate to test with, so let me know.
It is in

http://celestia.simulatorlabbs.com/Downloads/

In the Celestia_VS2013 directory.
It is labelled.
Or you can grab the whole directory since it is intended to be standalone.
The other directory is a QT5.4 based compile that should run on any system with VS2013 redists, though without the 1gy mod.


Janus.

Topic author
Dimethylmercury
Posts: 8
Joined: 05.09.2017
With us: 6 years 8 months

Post #18by Dimethylmercury » 11.11.2017, 11:32

What do I do next?

Do I still have to install the VS2013?
Or just copy it into some directory?

I know I am kinda dumb at this, but I was not expecting such elaborate answer

I didn't expect that maximum star distance will be so deeply buried in Celestia's engine.

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 21 years 8 months
Location: NY, USA

Post #19by selden » 11.11.2017, 14:30

Download http://celestia.simulatorlabbs.com/Downloads/Celestia_VS2013/celestia-x86-1Gy.exe
Put celestia-x86-1Gy.exe in your main Celestia directory.
Run it.
If it needs any runtime libraries, it'll crash immediately. Let Janus know: post a screengrab of the error popup here.

If it runs OK, download http://celestia.simulatorlabbs.com/Downloads/Celestia_VS2013/celestia-x64-1Gy.exe
and put it in your main Celestia directory.
Run it.
If it crashes immediately, then you're running a 32-bit version of Windows and need to use celestia-x86-1Gy.exe

Rename your existing celestia.exe to be celestia_nearby.exe
Copy the appropriate version of ...1Gy.exe to be celestia.exe

From then on it'll be the version used whenever you run Celestia.
Selden

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

Post #20by SpaceFanatic64 » 11.09.2018, 22:37

Please ban Bryanagold. He is the same user as andreysvurdy, and is posting irrelevant stuff. You should also block his IP Address to prevent him from making new accounts to circumvent bans.


Return to “Bugs”