Jump to content

2.20 Stars/Night sky visible during day time


photo

Recommended Posts

Posted

Hello,

In 2.20, the sky environment texture (stars) is fully alpha blended with the atmospheric sky. This leads to the day-time sky being fully black/full of stars, even at 1PM, if the stars visibility controlled by CIGI is too high (and this is starting at 10-20%...).

Moreover, at 100%, the stars/night sky are simply too bright, wayyyyy overexposed. While it was always a bit too high in previous version, now it's clearly overdone.

Also, the night sky is only visible when a new value from CIGI celestial is received.

Suggestions:

  • the stars/night sky should be additive, not blended with the sky (maybe make it an option for compatibility if needed)
  • at 100%, the night sky should appear as it would in a fully clear non polluted sky (aka from space), but not overtly bright

In our case, this new situation is problematic when interfacing with a 3rd party CIGI emitter we don't control that expect 100% stars = normal sky. Ouch, now the stars are visible during daytime and the sky is black.

Thanks!

Posted

Hello! 

You can change the intensity of the stars to 100% for your project and specification.

To do this you need to change alpha channel value in environment color param.

image.png

Posted

Gosh! 9 years with Unigine and you still show me new tricks! Thanks :)

Posted

Я уже почти 4 года с UNIGINE, но тоже этого не знал) Для плавного вкл. и откл. звёзд использую вот такую конструкцию:

_d[0] += Game.IFps * 0.1f;
_stars_lerp.SetParameterFloat("billboard_scale", MathLib.Lerp(0, 0.28f, _d[0])); 

Век живи, век учись)

Posted (edited)
On 1/22/2026 at 8:08 AM, cash-metall said:

To do this you need to change alpha channel value in environment color param.

Alas, this doesn't work in IG mode, as the IG specifically will overwrite the alpha value when a IG Celestial control message is received.

Back to square one:

As you can see, at 2PM with the sun high in the sky and a stars intensity around 90%, the sky is black with starts visible (Alpha Blend mode):

image.png.cf2442b251fe1fac8f2dd4a7ff0dbd56.png

Changing the Environment Blend mode to "Additive Blend" is not working either, because the stars are far too bright during the day:

image.png.3020ee2112fad68bf1d5e53610c7c06a.png

 

 

Ideally, we'd like the stars to have the luminosity they currently have when alpha is set at 30% during night:

image.png.2909216c246f4fa2f30b096b54b3429a.png

 

 

suggestion: add a new "alpha" coefficient to the Environment color, not controlled by the IG plugin..

(reminder: this is with a CIGI emitter we have no control over, sending 100% stars)

Edited by Amerio.Stephane
Posted
12 hours ago, Amerio.Stephane said:

Alas, this doesn't work in IG mode,

Yes indeed, I misled you. (For some reason I was sure that IG modifies this value with a multiplier, but it simply rewrites it).

so right now you can solve it only via code in postupdate somewere

int AppWorldLogic::postUpdate()
{
	Plugins::IG::SkyMap *skymap = Plugins::IG::Manager::get()->getSkyMap();
	float intensity = skymap->getStarfieldIntensity();
	skymap->setStarfieldIntensity(intensity * 0.1f);
	return 1;
}

 

Posted

Is there any way to know the actual sun & moon zenithal position, I mean like a percentage or some value like  0=horizon 1=zenith ? 

The goal would be to dynamically fine tune the night sky appearance...

Posted
11 hours ago, Amerio.Stephane said:

Is there any way to know the actual sun & moon zenithal position

sure

NodePtr sun = Manager::get()->getSkyMap()->getSunNode();
if (sun)
{
	float zenith = getAngle(vec3_up, sun->getDirection(AXIS_Z));
  //.....
}

 

  • Thanks 1
×
×
  • Create New...