KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Post Reply
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 270
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Keeper »

The main purpose of this OXP was to reduce the size of background stars and reduce the distraction of the giant "space dust" that floats around your ship. However, while doing this I also discovered that other OXPs which modified sun distance and other things were doing so in old ways that are not ideal for Oolite 1.81+ (actually overriding new features), so I decided to package in a planetinfo.plist that also does those tasks, with plenty of comments to help you to tweak their values to your liking.

First, the download link:
http://www.keeper1st.com/Oolite/KeeperSky.zip

Screenshots in 1680 × 1050:
Default background stars -- http://www.keeper1st.com/Oolite/stars-001.png
KeeperSky background stars set to 2.0 multiplier -- http://www.keeper1st.com/Oolite/stars-002.png (how OXP comes packaged)
KeeperSky background stars set to 10.0 multiplier -- http://www.keeper1st.com/Oolite/stars-003.png

Screenshot in 1280 × 1024 from Commander Cody:
KeeperSky on Torus drive with 20.0 star multiplier, 5.0 sun distance multiplier, and 0.32 space dust opacity: https://app.box.com/s/clovphdnhy953j6g7o3kwvn3xpy9gk00

While the size of the background stars can't be adjusted easily (you have to edit the textures), the properties affecting "space dust", sun distance and background star/nebula count are easily adjusted.

That is the main reason this is packaged as an OXP and not as an OXZ. An OXP is simply a folder so you can open the files easily to edit them, since everyone will have a particular preference. You should drop the KeeperSky.oxp folder (the folder itself; not just its contents) into your Oolite/Addons folder. Maybe someone can set this up for OXPConfig or whatever tweaking interface method is supposed to be replacing it. For now, though, you can fire up a text editor like Notepad++ and get tweaking. It's really quite easy and I'll explain here.

How to Tweak Stuff

To adjust "space dust" (those blocks that float around your ship to give you a sense of speed when you move), look in the Shaders folder and open the only file there (oolite-dust.vertex) into a text editor like Notepad++. Scroll to the very bottom of that file to the line that starts with float vector. The final number in that line (set in this OXP to 0.2) is the maximum opacity of the "space dust". Oolite default is 1.0, which makes the "space dust" appear as solid white blocks which I found rather annoying given their size. I set it here to 0.2, which makes the "space dust" 80% transparent. This still provides a sense of speed but the blocks are far less distracting. You may prefer a different value. Obviously, if you want to remove "space dust" entirely, you can set that final number to 0.0. Note that this value also affects the lines you see when using Torus drive.

All other values set by this OXP (other than background star sizes, which are done via textures) are adjusted by editing the planetinfo.plist in the Config folder. I put extensive comments in that file to explain what they do, so much of what follows here is redundant information.

The first value there is sun_distance_multiplier used to set a farther sun distance for those who prefer it. While there are other OXPs/OXZs which move the suns, they all do it in an old way that actually (apparently) prevents a new feature of Oolite (as of 1.81) from working -- the new planet list has set up different sun distances for each system. However, the way that FarSun, Distant Suns, Realistic Stars, Sensible Sun, etc., were moving the sun was by using an old "sun_distance_modifier" which (apparently) completely overrode the varied sun distances provided by Oolite 1.81+. Therefore, if you want to have unique distances in each system like the current version of Oolite provides, it's important to remove any of those OXPs/OXZs and instead use this one, setting the "sun_distance_multiplier" to get farther distances than default. In this OXP, I have it set to 3, which isn't as far as some may like, but isn't super close either. Note that the greater the multiplier, the more variation in distances you will experience from system to system.

The next setting is ambient_level which determines how much lighting is applied to the sides of objects that are not receiving direct sunlight. I have set it to 0.20, which isn't completely dark but still provides a pleasingly stark contrast. The default value was 1.0. For comparison, ZygoUgo's old Cinematic Skies OXP used a value of 0.05, and Knotty's old Realistic Stars used 0.1, so the value I've set isn't as severe as those. As with all these things, change the value to your preference.

The next settings are sky_color_1 and sky_color_2. These are a different way of doing what the old sky_rgb_colors setting did. They set the ranges of color in which the background stars may be drawn. The values I have set up are what were in Knotty's Realistic Stars OXP. See the comments in the file for explanation of the numbers. Note that you also can add nebula_color_1 and nebula_color_2 (you do need both) if you want to adjust the color range of nebulae. I didn't put lines for those in here because I don't know what the default values are.

Next is star_count_multiplier. Use this to increase or decrease the amount of drawn background stars. Other OXPs increase background stars by using a universal "sky_n_stars" setting, but that makes the sky have the same number of visible stars in every system. Using this star_count_multiplier instead retains the system-by-system variation that the current version of Oolite is designed with. I have set the multiplier to 2.0 to create a balance since I have halved the size of the star textures. Some people prefer higher values. Play with it to get a result you like. Your screen resolution will be a factor here; higher resolutions should see more stars. Keep in mind that because each system has a different base star count value, high multiplier values can create a massive difference from system to system. Also, this setting will have an effect on your frame rate, so while it may look pretty to have a really high value, it's probably not practical to do so, especially if you enter a system that has a high base value to be multiplied.

Next is nebula_count_multiplier. Other OXPs increase the number of visible nebulae by using a universal "sky_n_blurs" setting, but that makes the sky have the same number of visible nebulae in every system. Using this multiplier instead retains the system-by-system variation that the current version of Oolite is designed with. I keep this multiplier at 1.0 so it has no effect, but I put the line here in case you want to increase or decrease the amount of nebulae that you see in the background. As with the star count multiplier, keep in mind that because each system has its own base nebula count, a high multiplier here can cause a massive difference from system to system, and again will affect your frame rate.

Finally I have put in the station_roll value. In default Oolite this value will do nothing, as the game's default stations all have their own specific roll rates set up. This value simply is in place to control the rotation rate of any OXP stations that don't have a rate set up. The rate set here would be slightly faster than the default Coriolis/Dodecahedron/Icosahedron stations.
Last edited by Keeper on Tue Aug 02, 2016 2:21 am, edited 10 times in total.

Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 604
Joined: Sun Jul 21, 2013 12:26 pm

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Astrobe »

Thanks! That's a great package.

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 14075
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Cody »

It should be noted that high values in the star_count_multiplier may cause low frame rates - extremely low, in some cases.
I had it tweaked way up high once, and it was like flying through a globular cluster - very, very slowly!
Give me five, I'm still alive
Ain't no luck, I learned to duck

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5803
Joined: Wed Feb 28, 2007 7:54 am

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by another_commander »

Cody wrote:It should be noted that high values in the star_count_multiplier may cause low frame rates - extremely low, in some cases.
I had it tweaked way up high once, and it was like flying through a globular cluster - very, very slowly!
For this reason, it may be preferrable to use sky_n_stars (or sky_n_blurs for nebulae) rather than a multiplier. Each system has its own number of stars by default, so a multiplier setting might result in few stars or way too many of them in the same game session. Setting sky_n_stars to a number that makes your system comfortable - assuming you set it in the universal section of your planetinfo.plist - will result in all systems having the same number of stars and may be the better option. In my experience, you can set it as high as 90000 and any gfx card above a GTX 260 will most likely not feel any difference.

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 14075
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Cody »

I think I was using both for a while - way back when.

I cranked it up to sky_n_stars = 500000; just now, with no discernible performance hit (on my old GTX 550Ti).
Give me five, I'm still alive
Ain't no luck, I learned to duck

User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 270
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Keeper »

I specifically wanted to move away from using universal values that overrode the unique values that the game has on a per-system basis. For instance, some sky/sun OXPs (e.g. Realistic Stars) have a constant sun corona size setting that overrides the varying corona sizes set by the game. So I removed that value. Likewise, I removed sky_n_stars and sky_n_blurs values so that the variable sky appearances created by the core game remain in effect instead of the sky looking basically the same no matter where in the galaxy you are.

But yes, frame rate is something you do have to be mindful of (I did actually mention it in the plist's comments), which is why I'm perfectly happy with the star_count_multiplier at only 2, and I keep the nebula_count_multiplier at 1 so there's no change to the core values there. I've added frame-rate warnings to the text above and updated the readme in the ZIP file, to help make sure people are aware not to get carried away.

On another note

Some may ask, "How about an easily tweakable adjustment to the sun glare effect? Well, that is easily done too thanks to Wildeblood's "Glare Clarifier" OXP. If you download that OXZ, find it in Oolite\oolite.app\GNUstep\Library\ApplicationSupport\Oolite\ManagedAddOns\oolite.oxp.Wildeblood.GlareClarifier.oxz\ then extract the script.js file from its Config folder and adjust the numbers in the two lines of code. (One line is for when you load an existing ship; the other is for when you buy a new ship.) His default value is "1.0" which completely removes the glare. Change it to whatever you like. Right now I have it at 0.8, but might switch back to 0.9 that I first tried. It's a little trickier to edit because this OXP is in OXZ format (i.e. a ZIP file), so you do have to extract the file, save it and re-pack the OXZ. He does have a Public Domain license in the script, though, so maybe he wouldn't mind if I just added that script file to this OXP to make it easier for folks to tweak, if they don't mind a little bit of glare but don't want the default situation where you have massive glare even if you're facing away from the sun.

doctorfrog
Average
Average
Posts: 11
Joined: Thu Nov 08, 2012 11:06 pm

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by doctorfrog »

This is exactly what I'm looking for, thank you. I've modded my starfield on my own, but this takes it another step in what I see as the right direction.

I can see that you're very open with how you made this, but I don't want to assume: May I take some of what you've done here and integrate into an OXP in the near future?

I mean, even though I could conceivably arrive to your methods separately, it would be much faster to just study what you've done and adapt what I've learned from it? I'll give credit where it is due, if that's important.

User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 270
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Keeper »

Of course you can use it!

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: KeeperSky (smaller background stars, adjustable space dust, sun distance, etc. for 1.81+)

Post by Diziet Sma »

Still think we need a 'like' button..

Nice work, Keeper! 8)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

Post Reply