Planet illumination user defined colors

General discussion for players of Oolite.

Moderators: winston, another_commander

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

Planet illumination user defined colors

Post by another_commander »

This
Image

and this
Image

are now possible with trunk revision e928c87.

Important: You can use this feature only if there is an illumination map defined for your planet. Illumination is inserted as a grayscale map in the alpha channel of the planet's diffuse texture. If no illumination map is defined, then you can still access this property but you will not see any difference by changing it - without an illumination map the dark side of the planet remains dark in all cases.

To use: In planetinfo.plist, enter the key illumination_color = followed by a color description of your choice. In scripts, you can use the JSPlanet read/write property illuminationColor (e.g. system.mainPlanet.illuminationColor="redColor";).
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Planet illumination user defined colors

Post by Cholmondely »

Magnificent!

But, alas, questions:

1) Would it be possible to show massive igneous volcanic streams or Giant Killer Mountain Seoids on the daytime side*? And would it also be possible to show the igneous streams and show city lights as well?

2) What would be involved in updating Povray planets to take advantage of these improvements?

*When you get in closer
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Planet illumination user defined colors

Post by another_commander »

Cholmondely wrote: Wed Jul 06, 2022 5:50 pm
1) Would it be possible to show massive igneous volcanic streams or Giant Killer Mountain Seoids on the daytime side*?
Yes. This can be represented by the diffuse and normal maps.
And would it also be possible to show the igneous streams and show city lights as well?
Yes, as long as they are similar color, which is not really very practical. Showing multiple color glows would require full rgb illumination map support, which we don' t have yet. Still, what we have now is leaps ahead of what we had before.
2) What would be involved in updating Povray planets to take advantage of these improvements?
Someone would need to add alpha channels to the selected Povray diffuse textures and fill those alpha channels with illumination grayscale maps. Note that the feature would be more impactful if only a few "surprise" systens are modified to have it.
User avatar
cbr
---- E L I T E ----
---- E L I T E ----
Posts: 1422
Joined: Thu Aug 27, 2015 4:24 pm

Re: Planet illumination user defined colors

Post by cbr »

another_commander wrote: Wed Jul 06, 2022 8:26 pm
1]
Yes, as long as they are similar color, which is not really very practical. Showing multiple color glows would require full rgb illumination map support, which we don' t have yet. Still, what we have now is leaps ahead of what we had before.

2]
Someone would need to add alpha channels to the selected Povray diffuse textures and fill those alpha channels with illumination grayscale maps. Note that the feature would be more impactful if only a few "surprise" systens are modified to have it.
1] If we 'make' the planet in the shipdata.plist we would have the rgb illumination map, so I deduct planet objects are a little different handled than ships.

2] see example from galaxy 7 in the screenshot thread
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Planet illumination user defined colors

Post by Cody »

another_commander wrote: Wed Jul 06, 2022 8:26 pm
Someone would need to add alpha channels to the selected Povray diffuse textures and fill those alpha channels with illumination grayscale maps.
And for a selected core planet? Is it beyond a dumb pilot? I have an urge to light-up my home system, you see.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
cbr
---- E L I T E ----
---- E L I T E ----
Posts: 1422
Joined: Thu Aug 27, 2015 4:24 pm

Re: Planet illumination user defined colors

Post by cbr »

Cody wrote: Thu Jul 07, 2022 3:12 pm
And for a selected core planet? Is it beyond a dumb pilot? I have an urge to light-up my home system, you see.
If the procedural created diffuse map from the planet can be accessed or stored like the povray/lave=earth maps then
it could be done...
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Planet illumination user defined colors

Post by another_commander »

cbr wrote: Thu Jul 07, 2022 4:06 pm
If the procedural created diffuse map from the planet can be accessed or stored like the povray/lave=earth maps then
it could be done...
There is a way to store the procedural textures generated by the engine, but you need to build from source with a special configuration: in the file OOPlanetTextureGenerator.m, change the line at the top that reads #define DEBUG_DUMP ( 0 && OOLITE_DEBUG) to #define DEBUG_DUMP ( 1 && OOLITE_DEBUG). Doing so will create an executable that dumps the texture files for diffuse, normal, specular and height noise (and there is also provision in the engine for light maps too, but that carries a big fat TODO: comment with it!) every time a new planet is loaded in memory.
User avatar
cbr
---- E L I T E ----
---- E L I T E ----
Posts: 1422
Joined: Thu Aug 27, 2015 4:24 pm

Re: Planet illumination user defined colors

Post by cbr »

another_commander wrote: Wed Jul 06, 2022 3:14 pm
This
Image
Is the value used in the 'city-map' for the light(n)ing only used as an on-off value?
( eg. 256 = bright lightpoint, 64 = less bright )
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Planet illumination user defined colors

Post by another_commander »

cbr wrote: Mon Jul 18, 2022 2:41 pm
( eg. 256 = bright lightpoint, 64 = less bright )
Should be this.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Planet illumination user defined colors

Post by another_commander »

However, note that in this particular pic I am using HDR color to make a point. HDR color is very simply put a color with rgb components beyond the 0.0 ... 1.0 range. In this pic I used a blue color with components (0.0, 0.0, 10.0). Note the blue component denotes an extremely bright blue. This is why the ACES tone mapper drifts towards white in the center of those very intense blue light points.

The way to enter such colors is in the form of dictionaries like this:

Code: Select all

system.mainPlanet.illuminationColor = {red:0.0, green:0.0, blue:10.0}
Any other method of inserting color values will work only for colors in the 0.0 ... 1.0 range.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Planet illumination user defined colors

Post by Cholmondely »

Another reference: Planet City Lights
another_commander wrote: Wed Apr 29, 2020 2:52 pm

May 2020

Image

Image

Image

Illumination mapping on custom planets is now a thing. The illumination map should get embedded in the alpha channel of the planet's diffuse map. Low alpha values indicate high illumination and vice versa.

To see what this is all about first hand, this OXP will turn Lave into Earth. You should be able to see something akin to what is seen in the above screenshots.
I'm unsure about this - do any of the current planet packs display illuminations on the dark side of the planets? And am I correct in presuming that the Vanilla game doesn't either?

If I wanted (dumb pilot speaking) to add this to some of the Povray Planets, would it be a doddle, or a pain in the unmentionables (I failed to add a coat of arms decal to a FdL)?
Last edited by Cholmondely on Mon Dec 05, 2022 8:59 am, edited 1 time in total.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: Planet illumination user defined colors

Post by another_commander »

Cholmondely wrote: Sun Dec 04, 2022 4:16 pm
I'm unsure about this - do any of the current planet packs display illuminations on the dark side of the planets? And am I correct in presuming that the Vanilla game doesn't either?
The only published one that I am aware of is Lave/Earth. In non-published form, there is also Coruscant and Nar Saddaa from the Star Wars universe somewhere in my hard drives. As for the core game, it does not feature lit planets because you cannot generate procedural dark side illumination textures.
If I wanted (dumb pilot speaking) to add this to some of the Povray Planets, would it be a doddle, or a pain in the unmentionables (I failed to add a coat of arms decal to a FdL)?
It is straightforward, but you need some prior experience with a graphics manipulation program like Gimp or Photoshop or similar. You can use the Lave/Earth textures as an example of how lighting up the dark side of a planet should be done.
Post Reply