[Split] Planet City Lights

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
gsagostinho
---- E L I T E ----
---- E L I T E ----
Posts: 573
Joined: Sun Jul 19, 2015 1:09 pm

[Split] Planet City Lights

Post by gsagostinho »

[Discussion split from the announcement of planet illumination mapping in the Progress thread.]

This looks stunning!! Now if there was a way of automagically adding city lights to Povray's planets. Maybe identifying those that are not gas giants and then batch applying a pre-made texture for the alpha channel masking it for blue and white colours (ocean and ice caps) could create a nice effect.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Progress

Post by Disembodied »

another_commander wrote: Wed Apr 29, 2020 2:52 pm
Illumination mapping on custom planets is now a thing.
And what a thing it is! This is amazing … :o
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: Progress

Post by dybal »

I have missed city lights... this will make the planets look much more realistic (if you are out of the Prime-Sun lane).

Could we also get rid of the collored clouds? Magenta and purple might look convincing for an alien planet, but not for one with human colonials... that's one of the reasons those pics from a_c look so much better to me than what I see in-game!
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 675
Joined: Sat Aug 09, 2014 4:16 pm

Re: Progress

Post by Commander_X »

another_commander wrote: Wed Apr 29, 2020 2:52 pm
In tomorrow's nightly... [...]
Does it mean in today's _self_ ?

That's great news! (shelving off the (very old) procedural shader based attempt) :)
gsagostinho wrote: Wed Apr 29, 2020 3:17 pm
[...] Now if there was a way of automagically adding city lights to Povray's planets. [...]
Why not normal and specularity maps, while we're making wishes ... :twisted:

Technically speaking, though, some PhotoGimp macros could take care of all these wishes: some edge detection and two textures combined with this (one for the continental part to tell where to place the lights, other for the lights themselves). Also normal and specularity are usually done by (mainly) conversion to grayscale, and some brightness/contrast adjustments (some extra steps might be required to "extract" what doesn't come right).
... Oh wait, this can also be attempted procedural for baking in Blender, for a quick pre-visualization of the effects.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 675
Joined: Sat Aug 09, 2014 4:16 pm

Re: Progress

Post by Commander_X »

Yup, in today's self, all right!

Right out of Lave station:
Image

... and at some distance of Lave:
Image

For the not so faint of heart, this is the layout in Blender of the shader material used to bake this set of textures:
Image

This is a bit of an advance for Blender 2.8x made to the initial Blender 2.7x version from some time back
User avatar
gsagostinho
---- E L I T E ----
---- E L I T E ----
Posts: 573
Joined: Sun Jul 19, 2015 1:09 pm

Re: Progress

Post by gsagostinho »

Wow, that looks great! Is this process slow? And is it possible to batch apply it to, say, all 2048 Povray planets? :twisted: :roll:
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Progress

Post by phkb »

That is amazing! Wow! I really do hope someone can put a Povray reboot together that makes use of this - no matter how big the download is!
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 675
Joined: Sat Aug 09, 2014 4:16 pm

Re: Progress

Post by Commander_X »

gsagostinho wrote: Thu Apr 30, 2020 12:35 am
Wow, that looks great! Is this process slow? And is it possible to batch apply it to, say, all 2048 Povray planets? :twisted: :roll:
phkb wrote: Thu Apr 30, 2020 2:24 am
That is amazing! Wow! I really do hope someone can put a Povray reboot together that makes use of this - no matter how big the download is!
Thank you!

The normal and light maps generation is a bit longer than I'd like. Diffuse and roughness/specularity are ok. Fitting lights and specularity to alpha channels in the other two is done manually in Gimp.
The batching part is not as simple for what I have now (because I rely on baking, not rendering). There could be ways to switch this to rendering in order to make use of Blender's "inner" automation facilities. ... Or just go Blender's Python all the way (which might turn to be an extra project)

Yes phkb, I hope someone can put that too ;)
User avatar
gsagostinho
---- E L I T E ----
---- E L I T E ----
Posts: 573
Joined: Sun Jul 19, 2015 1:09 pm

Re: Progress

Post by gsagostinho »

Perhaps a more sane approach to Povray would be to create substantially fewer than 2048 unique planets, but on a high enough number that repetitions are not evident. Possibly 256 planets so that they are all unique within a single galaxy. This could allow for higher-resolution textures too.

edit: possibly the colour of the star, size of planet, position of station, randomness of rings, etc., could make it even harder for anyone to notice 'repeated' planets.

For instance, I personally love the look of the Additional Planets OXP, I think the resolution and texture quality in this oxp is really really good. Here's an example from my favourite screenshot.

Image
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 675
Joined: Sat Aug 09, 2014 4:16 pm

Re: Progress

Post by Commander_X »

gsagostinho wrote: Thu Apr 30, 2020 7:06 pm
Perhaps a more sane approach to Povray would be to create substantially fewer than 2048 unique planets, but on a high enough number that repetitions are not evident. Possibly 256 planets so that they are all unique within a single galaxy. This could allow for higher-resolution textures too.
[...]
Yes, starting small could be a good thing. I'd like, though, to have unique planets -- again, it is a very easy thing to "program" in Blender.
gsagostinho wrote: Thu Apr 30, 2020 7:06 pm
[...]
edit: possibly the colour of the star, size of planet, position of station, randomness of rings, etc., could make it even harder for anyone to notice 'repeated' planets.

For instance, I personally love the look of the Additional Planets OXP, I think the resolution and texture quality in this oxp is really really good. Here's an example from my favourite screenshot.
[...]
Actually one reason I wouldn't go too far from what Povray Planets did, is that the normal maps are really not that important except when getting really close to the planet. In order to get them right good LOD should be somehow implemented.
Here's an example of how Lave would look like without normals, just with specularity:
Image

I'd guess the first stage would be to just bring in some diffuse+city lights and specular maps (keeping the normals "flat").
Couple of remarks about the material shader sample I've shown above, the version where I have:
  • two "sets" of clouds -- large and small
  • cloud shadows -- which I think are a must (it's one of the reasons Povray Planets are "that good")
  • specularity (actually roughness in the context of PBR -- Physically Based Rendering -- material) -- this would be the extra Povray doesn't have
  • normals
What that shader still misses are polar caps (not very hard to implement).
And of course, it would need some way to easily modify the parameters needed to create multiple earth-like, barren, volcanic, "different", gas giant types of textures.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Progress

Post by Redspear »

gsagostinho wrote: Thu Apr 30, 2020 7:06 pm
Perhaps a more sane approach to Povray would be to create substantially fewer than 2048 unique planets, but on a high enough number that repetitions are not evident. Possibly 256 planets so that they are all unique within a single galaxy. This could allow for higher-resolution textures to
That makes a lot of sense to me. Given that a lot of the planets will be inhabited by human colonials then a great deal of earth-like (in the broader sense) planet textures would be suggested if not required.

One method I used for additional planets was to have several cloud layers which I could tint or process in some way before superimposing over a cloudless texture. Different cloud textures expose differing landmasses, therefore with 10 different topographical textures and 10 different cloud textures you can potentially create 100 unique planet textures (clouds stuck in place, not rotating).

I didn''t really exploit this option in the oxp as it didn't need to cover the main planets. The tinting I applied to cloud layers can also be (and indeed was) done to the topographical layer, should pink oceans and the like be required.
User avatar
gsagostinho
---- E L I T E ----
---- E L I T E ----
Posts: 573
Joined: Sun Jul 19, 2015 1:09 pm

Re: Progress

Post by gsagostinho »

One more idea that could be super immersive: the amount of city lights could depend on the type of economy, so that rich industrial countries have much more lights (and perhaps more complex structures) than poor agricultural ones. Feudal planets could have the light disabled altogether!
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Re: Progress

Post by Disembodied »

gsagostinho wrote: Fri May 01, 2020 1:45 am
One more idea that could be super immersive: the amount of city lights could depend on the type of economy, so that rich industrial countries have much more lights (and perhaps more complex structures) than poor agricultural ones. Feudal planets could have the light disabled altogether!
Definitely - economy, tech level and population size could all influence the city lights. In Galaxy 1, Maesin is a Poor Agricultural, TL1, population 0.8 billion; Ceesxe is a Rich Industrial, TL15, population 6.4 billion. Their night sides would look very different!

Maybe city lights shouldn't appear at all until (say) TL3 or 4? Using Traveller as a guide, TL0-3 is classed as the "Very Low Technology Epoch", using stone, wood, basic metals, dray beasts, sails, water wheels, and the first steam engines. TL4-6 is the "Low Technology Epoch", with early atomic science, the first factories, internal combustion engines, and increasingly destructive military technologies. TL7-9 is the "Middle Technology Epoch", possessing increasingly advanced technologies including space travel, advanced computers, and increasingly dense cities (I'd estimate that present-day Earth is maybe TL7).
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Progress

Post by Redspear »

Population seems fairly obvious but are you imagining a tech level 12 having more or less lights than a tech level 8, for example?

Yellow might be the common colour today but we've been moving towards white for some time now. White is less distinct from a starfield background however.

Maybe different planets (and especially inhabitants) could favour different colours. Certainly many insects and crustaceans can experience different wavelengths of light while felines require less than we do. Even if the variation were subtle, such as pale yellow to intense orange, it could help to further make planets distinct.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: Progress

Post by dybal »

Redspear wrote: Fri May 01, 2020 9:25 am
Population seems fairly obvious but are you imagining a tech level 12 having more or less lights than a tech level 8, for example?

Yellow might be the common colour today but we've been moving towards white for some time now. White is less distinct from a starfield background however.

Maybe different planets (and especially inhabitants) could favour different colours. Certainly many insects and crustaceans can experience different wavelengths of light while felines require less than we do. Even if the variation were subtle, such as pale yellow to intense orange, it could help to further make planets distinct.
Perhaps taint the city lights matching the star hue if the population is alien (I'm assuming they are native rather than colonial, so they evolved under that sun light and should be confortable with it's color).
Post Reply