Page 1 of 2

galaxy_dense bitmap issues

Posted: Tue Oct 05, 2021 2:50 am
by CMDR ARGHouse
Hi, I've been trying to replace the vanilla galaxy_dense map with my own, and ran into various issues. I am trying to replace it with something from 512 to about 2048 pixels, I have tried to change the values in one_over_256 to the corresponding image dimensions, I even reduced my replacement map to 256 and indexed the colors, still did not work? Is there something I am missing?
Image

Re: galaxy_dense bitmap issues

Posted: Tue Oct 05, 2021 6:33 pm
by impaktor
I haven't looked at that code, but I assume width and height might be hard coded.
What is it you expect will happen when you replace the galaxy map?

It's effect will only really be visible when zooming out more than what is possible atm, I think (link from Gliese852):
https://imgur.com/a/VkDAaRd

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 1:49 am
by CMDR ARGHouse
Well I can see why the galaxy map was removed, no point in having it if sector view is upgraded to display the whole galaxy.

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 2:17 am
by CMDR ARGHouse
How did Gliese852 do that BTW, I just tried to increase the FAR_MAX to 1024, almost nailed it by changing the threshold, but caused a crash whenever I made the number smaller than 7.5 .

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 2:29 am
by CMDR ARGHouse
Okay kinda got it working (The zoom out zoom in thing), had to start a new game, not as efficient on processing though.

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 6:50 am
by impaktor
Galaxy map view was removed because it was the last screen that used NewUI (see FAQ on the wiki), and we wanted to purge our code base of NewUI, and didn't want to have that as a blocking task preventing us from doing that, and we didn't have the energy / motivation to convert it to Imgui (aka Pigui).

Anyone is free to bring it back, using pigui, but indeed, the idea is to have the feature Gliese demonstrates in that video.

The galaxy file is what is used under the hood for determining star density in galaxy generation.

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 4:17 pm
by FluffyFreak
How the f@#k did Gliese do that?

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 9:28 pm
by sturnclaw
Terribly abused the sector cache system and undersampled sectors by a factor of about 100 IIRC... It's a really nice proof of concept but the sector cache system was never meant to do that.

Re: galaxy_dense bitmap issues

Posted: Wed Oct 06, 2021 10:31 pm
by Gliese852
I just took not every sector, but one for N sectors (in each dimension), depending on the zoom, but I drew this sector N times large. Thus, at any zoom, approximately the same number of sectors was generated, and a fairly uniform and plausible distribution of stars was drawn.

Re: galaxy_dense bitmap issues

Posted: Fri Oct 08, 2021 1:07 pm
by FluffyFreak
Brilliant use of it.