Jump to content

Kopernicus tutorials for stars?


regex

Recommended Posts

I don't know if there are any tutorials, but I've got intensity curves figured out pretty well.  Below is a reproduction of the post I made in the Kopernicus thread explaining how I've done the sunlight intensity curves for GPP.

In each key the four numbers are distance, intensity, and in/out slopes.  Distance is kilometers divided by 6 (weird, I know, but that's what it is).  Intensity just varies from 1 for maximum to 0 for no illumination.  The last key is the distance at which the star no longer casts any light (in this example, the max distance is about 3 billion kilometers).

     CORRECTION:  Distance in ScaledIntensityCurve is km/6, or meters/6000, but IntensityCurve and IVAIntensityCurve use units of meters. 

If you have a brighter star that has greater reach, or a faint one that has less reach, then I recommend simply factoring the distances up or down.  For instance, if you want your star to cast light out to a maximum distance of 6 billion km, then double all the distances.  Changing distances require that you recompute the slopes.

There are actually a total of three curves that you must create, which replace the old settings of sunlightIntensity, scaledSunlightIntensity, and IVASunIntensity.  These curves are,

     IntensityCurve{}
     ScaledIntensityCurve{}
     IVAIntensityCurve{}

I recommend using identical curves for IntensityCurve and ScaledIntensityCurve.  For IVAIntensityCurve you might want the light to be a bit more subdued, which you can do by simply factoring the intensities.  For GPP I multiplied all the intensities by 0.9 for my IVAIntensityCurve.  Changing intensities also requires that you recompute the slopes.
 

On ‎8‎/‎23‎/‎2017 at 2:59 PM, OhioBob said:

I recently wrote intensity curves for GPP and I found that I really didn't care much for a linear function.  In GPP, as well as many other planet packs like RSS and Stock+OPM, the inner planets are bunch closely together with the outer planets spaced much farther apart, often with their distances increasing exponentially.  If a linear function is used in that case, with the zero illumination point set somewhere beyond the farthest planet, there would be very little noticeable change in the light level among the bunched up inner planets.  I thought that from a aesthetic point of view, it looked best to have small but noticeable decreases in illumination for each successive planet moving outward from the star.  To do this I used intensity curves that look like this one:


				ScaledIntensityCurve
				{
					key = 0 1 0 0
					key = 500000 1 0 -2.89E-07
					key = 1000000 0.9 -1.44E-07 -1.44E-07
					key = 2000000 0.8 -7.21E-08 -7.21E-08
					key = 4000000 0.7 -3.61E-08 -3.61E-08
					key = 8000000 0.6 -1.80E-08 -1.80E-08
					key = 16000000 0.5 -9.02E-09 -9.02E-09
					key = 32000000 0.4 -4.51E-09 -4.51E-09
					key = 64000000 0.3 -2.25E-09 -2.25E-09
					key = 128000000 0.2 -1.13E-09 -1.13E-09
					key = 256000000 0.1 -5.64E-10 -5.64E-10
					key = 512000000 0 -2.82E-10 0
				}

Note that the distances increase exponentially (x2) while the light intensities decrease linearly (-0.1).  Although this isn't how light intensity varies in real life, I think it produces a nice visual effect in the game.

As long as your exponential increases and linear decreases are consistent throughout the curve, the slopes can be computed using the formula,

m = X / d

where m is slope, d is distance, and X is given by the formula,

X = (In+1 - In) / LN(dn+1 / dn)

where I is intensity.

Any pair of keys can be used to compute X, because each pair should give the same result.  For example, let's use,


					key = 4000000 0.7 -3.61E-08 -3.61E-08
					key = 8000000 0.6 -1.80E-08 -1.80E-08

where we have,

X = (0.6 - 0.7) / LN(8000000 / 4000000) = -0.1442695

This value of X is then used to compute the slope at any distance.  For example, the slope at a distance of 2000000 is,  

m = -0.1442695 / 2000000 = -7.21E-08

This method gives nice smooth logarithmic intensity curves.  The same basic curve can be used for other stars by simply factoring the distances and/or intensities to account for greater or lesser luminosity, and recalculating the slopes.

Of course you might not like the way it looks and may choose to use something else.  This is only a suggestion.
 

Edited by OhioBob
Link to comment
Share on other sites

Pretty much everything in the GPP star configs where a collaborative effort between @Galileo and I.  He did everything with the color settings and textures, and I did stuff like the intensity and brightness curves.  So if you have any other questions, I should be able to answer.

One thing about GPP is that we're actually using several different intensity curves, so you have to be careful about what you're looking at.  For instance, the default ones in the Ciro.cfg are written to maintain a constant light level out to beyond the farthest planet.  These are then replaced by the curves in the file SunCurve.cfg.  This was done so that if somebody doesn't like the decreasing intensity, they can revert back to the old look by deleting SunCurve.cfg.  There are also different curves for regular GPP and GPP_Secondary.  We also recently decided to decrease Ciro's light intensity out around Grannus, so I tweaked the curves - they no longer match the one given in my first post.  If you have questions about any of it, I'm happy to answer.

Link to comment
Share on other sites

I've just learned some new information that I want to pass on to you.  First, here is an explanation of how things are suppose to work:

IVA mode
The color of light seen in IVA mode is controlled by the parameter IVASunColor.  The intensity is controlled by either the parameter IVASunIntensity (constant intensity), or by the curve IVAIntensityCurve (variable intensity).

Scaled Space
Scaled space includes lighting on celestial bodies in the tracking station, map mode, and flight mode at distances beyond where PQS is seen.  The color of light in scaled space is controlled by the parameter scaledSunlightColor.  The intensity is controlled by either the parameter scaledSunlightIntensity (constant intensity), or by the curve ScaledIntensityCurve (variable intensity).

Flight mode/PQS
This includes lighting on space vessels and on the surfaces of celestial bodies at near distances where their PQS is seen.  The color of light is controlled by the parameter sunlightColor.  The intensity is controlled by either the parameter sunlightIntensity (constant intensity), or by the curve IntensityCurve (variable intensity).

(Note that constant intensity also means infinity distance.)

As of Kopernicus release 1.3.1-2, things are not working as they are suppose to.  It seems that the only things that are actually working are scaledSunlightColor, scaledSunlightIntensity, ScaledIntensityCurve and sunlightColor.  It doesn't look like anything with IVA mode is working (we're just getting a constant white illumination with no way to adjust it).  And although sunlightColor is working, sunlightIntensity and IntensityCurve are not.  At present the intensity of sunlight in flight mode and PQS is being controlled by scaledSunlightIntensity or ScaledIntensityCurve.

@Thomas P. is aware of these issues and has made changes that should fix it, hopefully to be included in the next release.

I also need to correct an error in something I said previously.  While the distance units used in ScaledIntensityCurve are meters/6000, or kilometers/6, the distances used in IntensityCurve and IVAIntensityCurve are meters.  I had not noticed that the units in my existing curves are wrong because those curves are not currently being used.  However, going forward we'll have to make sure all the curves use the correct units.
 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...