Trying to explain SFS's planet data parameters

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#1
So i know there's threads like Alpha Aquilae's- i mean Altair's that go surface-level already, but since there's some confusion about the individual parameters in the planet data files, i'm gonna try explaining it here. Feel free to move the thread if appropiate, i based the placement on the aformentioned linked thread.
I've helped someone with this before in private, so for the sake of public access, here's my attempt at describing what the parameters are and what i do with then.

Some notes:
- I'm going to avoid talking about the texture data section. The atmosphere one is already a bit repetitive by itself so the texture one is only going to complicate things.
- Most of the atmospheric knowledge comes from Altair himself, especially from this thread.

Radius - The same as real life, but at a 1:20 scale. Unit used is meters.
Surface gravity - Same as real life. Unit used is m/s². You can derive that from CGS by calculating like so: (10^cgs)/100.
Color (Map) - Self-explanatory. Units are RGBA 0-1.
Atmospheric parameters - This is where it gets really complicated.
- Height: The height of the atmosphere in meters. For ACSS 2's 1-4-20 scaling (1=Stock 1:20, 20=RSS) for Normal, Hard, and Realistic, i use height scales of 5-4-20, but its mainly up to you to decide.
- Density: Uses real-world values (Times about 0.41 for consistency with stock SFS. Don't ask why.). This is NOT the same as atmospheric pressure! Density can be converted from pressure using the ideal gas law:
ρ = (P×M)/(R×T)
- ρ (Rho) = Density (g/m³)
- P = Atmospheric pressure (Pascals)
- M = Molar mass of the atmosphere (g/mol)
- R = Ideal gas constant (8.31446261815324 J•K•mol, or more exactly, the Avogadro constant times the Boltzmann constant)
Unit used is tons per cubic meter.
- Curve: This one requires a few assumptions... AND a few adjustments depending on scale. Its the annoying one of the bunch.
Lets assume that, for simplicity sake, the temperature remains constant with altitude (it does not!). You get this equation:
curve = M×g×h/(R×T)
- M = Molar mass of the atmosphere (but in kg/mol this time)
- g = Surface gravity of the planet. You may see more technical SFS players such as Altaïr use "gravitational constant" instead, even though i disagree with its usage due to a misnomer issue.
- h = Height of the atmosphere (meters)
- R = Ideal gas constant (see Density)
- T = Temperature (K)
This allows us to set a value used in-game. Or you can just use height/scale_height.
- Upper Atmosphere (upperAtmosphere): This one is purely cosmetic as it tells the game where to place "reached Upper atmosphere of [body]" achievements. I use the 1/10th base density mark as that point, which can be found by this equation:
h = Ln(10) × (H / curve)
- h = upperAtmosphere in meters
- H = height of the atmosphere in meters
- Ln(10) = Natural logarithm of 10 (about 2.302585093)
Then you divide that by H as defined above. That's your unit.
- parachuteMultiplier: That's where you can open your parachute basically. You calculate the height in meters the same way you did in upperAtmosphere, but divide that by 2500 meters instead of the height of the atmosphere.

Terrain height - The format is as follows:
AddHeightMap([Heightmap file name, with extension, eg. heightmap.txt or heightmap.png], Ω, h)
- Ω = 2πR / L
- R = Radius of the planet.
- L = How many times do you need the heightmap to repeat until it loops around the planet. I recommend using a whole number to avoid seams.
- h = Height of the displacement, in meters.

Orbital parameters - The second simplest part.
- semiMajorAxis: In meters, same as real life at a 1:20 scale (in stock SFS). I think we all know what SMA is.
- eccentricity: How elongated your orbit is. Its a dimension-less value from 0 to 1; you can go hyperbolic (>1), but while the physics for the object do work, its orbit doesn't render at all.
- argumentOfPeriapsis: Where your orbit will be oriented. Goes from 0 to 360 degrees.
- direction: Its a boolean value determing whether your orbit is prograde (1) or retrograde (-1).

I'm open to any corrections and help on this part too!
 
Last edited by a moderator:

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#2
Thanks Gurren Lagann
I've pinned it, it will be a valuable resource for planet editors.

Also, about terrain editing, allow me to reference this post where I made a detailed explanation about how terrain worked.
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#3
Just wondering, if you want to have a custom heightmap that only appears once (like herschel crater on mimas) what would you do?
 

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#4
Just wondering, if you want to have a custom heightmap that only appears once (like herschel crater on mimas) what would you do?
For that specific case you mentioned, assuming that the heightmap (which i'll call Herschel.txt) pans globally and only shows the elevation for Herschel Crater, we get this:
AddHeightMap(Herschel.txt, 9910π, h)
- Herschel.txt is the heightmap name
- 9910π is the circumference of Mimas at SFS's scale, with radius taken from here
- h is the height displacement of said heightmap.
In essence its just taking Ω and turning it into πR / 1 = πR.

Also, about terrain editing, allow me to reference this post where I made a detailed explanation about how terrain worked.
That's actually rather useful too, thanks Altair!
Gotta be honest i wasn't expecting to be pinned haha
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#5
Thanks! Also what do the things I've circled in red do?
Screenshot_20240421-112232_ZArchiver.jpg
Screenshot_20240421-112249_ZArchiver.jpg
Screenshot_20240421-115539_ZArchiver.jpg
Screenshot_20240421-115619_ZArchiver.jpg
Screenshot_20240421-112746_ZArchiver.jpg
 

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#6
I'll go through this in order. Parts of these are fully unexplored territory to me, so i'll note in italics which ones are guesses.

planetTextureCutout - I presume that basically tells the game how much of the texture you want to cull off in order to fit the object's shape, in case of, say, irregular objects or textures with backgrounds (transparent or not). This helps in preventing that black surface weirdness in-game.
surfaceTexture_[A and B]/terrainTexture_C - Represents different textures for the terrain itself. Fun fact: you can actually use custom omes too on top of the base game's, they just need to be placed in the Texture Data folder.
surfaceTextureSize_[A and B]/terrainTextureSize_C - The sizes of the above, in meters. X and Y are the dimensions.
surfaceLayerSize - Its the strip of brighter or darker surface on the very top of the terrain. It asks for the height of the strip. I took this from somewhere here but i don't recall exactly.
minFade and maxFade - To this day i have no idea what do these parameters do.
shadowIntensity - The strength of the shadow casted your ship.
shadowHeight - The height of the aformentioned shadow.
textureFormula - For when you don't have a texture. With it you can let the game derive one for you. Most of this comes from Phobos-Deimos usage lol
verticeSize - New to 1.5. Simplifying, its the size of a chunk per level in SFS.
collider - Added in 1.5.2, this alone is literally the reason RSS packs are possible now. Setting it to true makes it landable, while setting it to false makes it unlandable.
flatZones - Makes a perfectly flat zone. Used at launchpads.

Post Processing - makes a gradient of the object's shading. Useful for extrasolar systems too.
height - From (for the first)/up to (for the rest) what point the gradient parameters apply to.
shadowIntensity - How "heavy" the shadow is rendered as. 0 is a flat texture, 1 is stock Earth.
starIntensity - How "heavy" the star background is.
hueShift - Um... unsure about that one. I think its the color variation intensity or what?
saturation - Remenber the S of the HSV color scheme. 0 is pure gray.
contrast - How much will the colors contrast with each other. So a high value would basically make a deepfry.
red, green, and blue - Just the colors of the shading. Self-explanatory.

Clouds
texture - The texture for the clouds.
startHeight - The startHeight altitude of the cloud texture, in meters. And yes, i did that on purporse.
width, height - The width and height of the cloud texture segments.
alpha - The overall opacity of the cloud texture. This applies even if transparency is present in the texture.
velocity - The speed that the clouds move, in some unit. I really wish i knew what unit it is.

Fog - When its empty, there's none. But when its not...
keys - Where each point in a fog gradient is applied on the planet.
color, r, g, b, a - Also self-explanatory.
distance - The distance from the camera where the fog applies on the texture.

significant - Whether or not will the label for the object display automatically. For an example of how that works, compare the Moon (significant: true) with the Captured Asteroid (significant: false).
rotateCamera - Whether the camera will rotate along the surface of the planet. On very small bodies and very rapid flybies this can be rather unconfortable.
heightDifficultyScale (and other similar params) - How much will the parameter will scale by on Normal, Hard and Realistic. There's those for radius, surface gravity, [atmosphere] height, the atmosphere curve, and the SMA. The default values for then are defined in the code as follows (courtesy of Altair):
1713703126639.png


shockwaveIntensity - How heavy will the shockwave from reentry will be. 1 is Earth's default reentry shockwave size IIRC.
startHeatingVelocityMultiplier - How much does the minimum speed for reentry heat physics get applied, or something. 1 is like, what the game calculates as the default?

That should be all of then. Hope i've helped!
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#7
shockwaveIntensity - How heavy will the shockwave from reentry will be. 1 is Earth's default reentry shockwave size IIRC
What do you mean shockwave? like how intense the heating is?
 

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#8
Y'know that cone-like reentry shockwave effect, right? Yeah it basically affects it.
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#9
That makes sense, thanks!
surfaceTextureSize_[A and B]/terrainTextureSize_C - The sizes of the above, in meters. X and Y are the dimensions.
So the Y coordinate makes the texture go deeper right? and wha does the X cooridnate do? does it squish the texture horizontally?
And can you give references for each of the stock planet surface textures please?
Fog - When its empty, there's none. But when its not...
keys - Where each point in a fog gradient is applied on the planet.
color, r, g, b, a - Also self-explanatory.
distance - The distance from the camera where the fog applies on the texture
Is this why venus seems like a very light yellow from space and has a brown terrain?
surfaceLayerSize - Its the strip of brighter or darker surface on the very top of the terrain. It asks for the height of the strip. I took this from somewhere here but i don't recall exactly.
WhatsApp Image 2024-04-21 at 14.08.28.jpeg

This the strip you're talking about?
Post Processing - makes a gradient of the object's shading. Useful for extrasolar systems too.
height - From (for the first)/up to (for the rest) what point the gradient parameters apply to.
shadowIntensity - How "heavy" the shadow is rendered as. 0 is a flat texture, 1 is stock Earth.
starIntensity - How "heavy" the star background is.
hueShift - Um... unsure about that one. I think its the color variation intensity or what?
saturation - Remenber the S of the HSV color scheme. 0 is pure gray.
contrast - How much will the colors contrast with each other. So a high value would basically make a deepfry.
red, green, and blue - Just the colors of the shading. Self-explanatory.
Sorry if this is stupid but is this the gradient found at the edge of some atmospheres like earth or jupiters?

Also if I'm making a planet pack do I have to bother with redoing the terrain for hard and realistic difficulties? because the planet files for planets like mars do

Also what do these do?
Screenshot_20240421-142305_ZArchiver.jpg

And am I right with what the others do?
 
Last edited:

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#10
So the Y coordinate makes the texture go deeper right? and wha does the X cooridnate do? does it squish the texture horizontally?
Exactly.

And can you give references for each of the stock planet surface textures please?
The stock textures thenselves are presumably embedded within the game itself. However, for the measurements used in default, a general "rule" seems to be that surfaceTexture_B is about 150-200% the size of surfaceTexture_A, and terrainTexture_C is about 10-15 times the size of the latter. (Unless tT_C is using "Blured" [sic] but sT_A isn't, on which case its about 40 times.)

Is this why venus seems like a very light yellow from space and has a brown terrain?
Yes. IRL Venus's clouds completely cover the planet's surface, but in SFS that's emulated using the fog.


This the strip you're talking about?
Exactly!

Sorry if this is stupid but is this the gradient found at the edge of some atmospheres like earth or jupiters?
Its more like the tinting the game applies on the enviroment, so i'd say its better to demonstrate visually. For a more extreme example i made waaay back on 1.4 (should work the same on 1.5, except i hope the fuel gagues aren't affected), here's a Epsilon Eridani blunder:
1713708255835.png



Also what do these do?

And am I right with what the others do?
You got it right! As for the other two, powerCurve is basically a power law scale factor of the size distribution of these rocks, and maxAngle is the maximum terrain angle rocks can be in, i think. Or its the max angle the rocks thenselves are tilted. I haven't messed with that specific section much.
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#11
The stock textures thenselves are presumably embedded within the game itself
Guess I'll have to use trial and error then ¯\_(ツ)_/¯
You got it right! As for the other two, powerCurve is basically a power law scale factor of the size distribution of these rocks, and maxAngle is the maximum terrain angle rocks can be in, i think. Or its the max angle the rocks thenselves are tilted. I haven't messed with that specific section much.
So would a high powerCurve result in a lot of small rocks or large rocks?
Also do I need to do the terrain for all 3 difficulties? because mars has different terrain for all 3
 
Last edited:

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#13
Also one more question (I think), how many of these do you think actually matter? Like the ones you don't know probably don't matter at all but what about the others?
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#15
I guess It's mine to figure out while trying to make this complete solar system
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#16
Another question, how do you do day-night cycles? Do you have an atmosphere texture that somehow moves around the planet?
 

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#19
With the Python script i've attached, made by The Astronomer (same guy who made TCRSS). Just rename the extension to .py since the forums won't let me attach pure python scripts.
It supports DEMs (such as those in the USGS Astropedia), as well as 16-bit and 8-bit heightmaps. Keep in mind that since this script uses pure meters as output in the heightmap, you'd use the following instead:
AddHeightMap(output heightmap, πR, scale)
Where scale is 0.05 for Normal, 0.1 for Hard and 1 for Realistic (20-10-1 scale for N-H-R).
 

Attachments

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#20
Where are the DEMs on USGS? is it the big map on the left?
DEM.jpg
 

Gurren Lagann

«★» Officer «» //PT
Professor
ET phone home
Man on the Moon
Registered
#21
No, that's the map preview. For any given major celestial body (eg. Mercury) you go to this tab and check the DEM option in blue:
1713802561743.png
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#22
Now USGS is being really slow :(
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#23
New problem, unfortunately out of all the bodies I want I can only find bump maps/height maps/DEMs for a few of them.

Instead I'll probably just manually draw the major features I want (like Mimas' crater) on a separate heightmap and add the craters later. I think this is what SFS does so the new bodies won't be out of place.

One of my aims with this pack is to make everything seem more SFS like than other CSS packs I've seen

I'll also have edited textures to make things more in the style of sfs
 

Axiom

He who asks ten thousand questions
Team Judge
TEAM HAWK
Swingin' on a Star
Atlas
Under Pressure
Registered
#24
Terrain height - The format is as follows:
AddHeightMap([Heightmap file name, with extension, eg. heightmap.txt or heightmap.png], Ω, h)
- Ω = R / L
- R = Radius of the planet.
Shouldn't it be the circumference of the planet? not the radius?