Page 1 of 1
Planet illumination user defined colors
Posted: Wed Jul 06, 2022 3:14 pm
by another_commander
This
and this
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";
).
Re: Planet illumination user defined colors
Posted: Wed Jul 06, 2022 5:50 pm
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
Re: Planet illumination user defined colors
Posted: Wed Jul 06, 2022 8:26 pm
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.
Re: Planet illumination user defined colors
Posted: Wed Jul 06, 2022 8:50 pm
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
Re: Planet illumination user defined colors
Posted: Thu Jul 07, 2022 3:12 pm
by Cody
another_commander wrote: ↑Wed Jul 06, 2022 8:26 pmSomeone 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.
Re: Planet illumination user defined colors
Posted: Thu Jul 07, 2022 4:06 pm
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...
Re: Planet illumination user defined colors
Posted: Thu Jul 07, 2022 5:06 pm
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.
Re: Planet illumination user defined colors
Posted: Mon Jul 18, 2022 2:41 pm
by cbr
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 )
Re: Planet illumination user defined colors
Posted: Mon Jul 18, 2022 2:57 pm
by another_commander
cbr wrote: ↑Mon Jul 18, 2022 2:41 pm
( eg. 256 = bright lightpoint, 64 = less bright )
Should be this.
Re: Planet illumination user defined colors
Posted: Mon Jul 18, 2022 3:13 pm
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.
Re: Planet illumination user defined colors
Posted: Sun Dec 04, 2022 4:16 pm
by Cholmondely
Another reference:
Planet City Lights
another_commander wrote: ↑Wed Apr 29, 2020 2:52 pm
May 2020
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)?
Re: Planet illumination user defined colors
Posted: Mon Dec 05, 2022 7:34 am
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.