BPlanets
Moderators: winston, another_commander
- Cholmondely
- 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: BPlanets
Ditto!
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?
•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?
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
Nice to see some more opinions in the thread!
Regarding the dynamic generation of the maps, for those that are not so faint of heart, are managing correctly their kitchen sink, and know how to keep their cats away from any harm, here's a quick receipt that can be a starting point to move the map generation from inside Objective-C code (as done currently, and unfortunately on the CPU), in the fragment shader (which executes on the GPU):
Step 1. Make all your planets green -- in the oolite-default-planet.fragment file in your Resources/Shaders folder (of course don't forget to back-up, or even better, use an AddOns/Shader approach), add a
right after
(i.e. such that the above becomes
)
Similarly, comment out
and add
right after (i.e. "transforming" the first line into two:
)
Step 2. Let there be map - create/copy/adapt any favorite GLSL noise based sample you consider worthy to replace the new diffuseColor value (and deduce the new normal value from it)
Regarding the dynamic generation of the maps, for those that are not so faint of heart, are managing correctly their kitchen sink, and know how to keep their cats away from any harm, here's a quick receipt that can be a starting point to move the map generation from inside Objective-C code (as done currently, and unfortunately on the CPU), in the fragment shader (which executes on the GPU):
Step 1. Make all your planets green -- in the oolite-default-planet.fragment file in your Resources/Shaders folder (of course don't forget to back-up, or even better, use an AddOns/Shader approach), add a
Code: Select all
normal = vec3(0, 0, 1);
Code: Select all
#else
vec3 normal = vec3(0, 0, 1);
#endif
Code: Select all
#else
vec3 normal = vec3(0, 0, 1);
#endif
normal = vec3(0, 0, 1);
Similarly, comment out
Code: Select all
vec3 diffuseColor = diffuseMapSample.rgb;
Code: Select all
vec3 diffuseColor = vec3(0.0, 1.0, 0.0);
Code: Select all
// vec3 diffuseColor = diffuseMapSample.rgb;
vec3 diffuseColor = vec3(0.0, 1.0, 0.0);
Step 2. Let there be map - create/copy/adapt any favorite GLSL noise based sample you consider worthy to replace the new diffuseColor value (and deduce the new normal value from it)
- submersible
- Commodore
- Posts: 264
- Joined: Thu Nov 10, 2011 7:49 am
Re: BPlanets
To clarify Water and Winter are extremes of 'Continental' in the povray planets code, sometimes they're just overrun with polar ice or have minimal landmass.Commander_X wrote:2. The initial package has only Earth like variants. As mentioned above, I used Povray Planets as a source of inspiration, and tried to cover this initial type of planet. As a reference, I classified the G1 Povray Planets in 5 main types: Terran (119), Barren (115), Water (7), Winter (5), and Gas Giants (10).
Cheating is totally encouraged. I confess that the gas giants in povray planets are cheating because they are not entirely procedural. There is procedural turbulence and warping but it is driven by some iterative simulation output maps.
Povray Planets - Planet textures for your galaxy
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
Good point, will check if I can tweak the shaders to provide for these two types, just like thatsubmersible wrote: ↑Sun Oct 18, 2020 2:25 pm[...]
To clarify Water and Winter are extremes of 'Continental' in the povray planets code, sometimes they're just overrun with polar ice or have minimal landmass.
[...]
I can hear you! But given the whole set of tricks Blender provides, if I find I need to use an external texture that can be "approximated" procedurally, I have the tendency to take the time to make that effort.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: BPlanets
These look really spectacular. Nice work
Is BPlanets compatible with Habitable Planets and System Redux (which I currently have installed)? If so, I'll definitely give them a whirl...
Is BPlanets compatible with Habitable Planets and System Redux (which I currently have installed)? If so, I'll definitely give them a whirl...
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
I don't think it's "compatible".
From what I remember System Redux was used to populate/texture extra planets/moons, and thus it shouldn't interfere.
For Habitable Planets, although not sure (i.e. didn't test), it might just replace the first set of planets that are textured (some hundred or so in Galaxy 1).
From what I remember System Redux was used to populate/texture extra planets/moons, and thus it shouldn't interfere.
For Habitable Planets, although not sure (i.e. didn't test), it might just replace the first set of planets that are textured (some hundred or so in Galaxy 1).
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: BPlanets
Thanks again. I'll just give it a go, then, and see what can be seen
(which is really the whole fun of it anyway).
(which is really the whole fun of it anyway).
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- submersible
- Commodore
- Posts: 264
- Joined: Thu Nov 10, 2011 7:49 am
Re: BPlanets
I've been reading the default planet shader and it looks like normal maps with cube map is supported. What makes me curious is how you've reproduced the 'hairy ball' tangent space with blender to get these awesome normal maps. I had always assumed that cube map normals would need to be object space or differential to object space.
I really need to get oolite installed and try them - looks *really* interesting.
Code: Select all
/* Fun sphere facts: the normalized coordinates of a point on a sphere at the origin
is equal to the object-space normal of the surface at that point.
Furthermore, we can construct the binormal (a vector pointing westward along the
surface) as the cross product of the normal with the Y axis. (This produces
singularities at the pole, but there have to be singularities according to the
Hairy Ball Theorem.) The tangent (a vector north along the surface) is then the
inverse of the cross product of the normal and binormal.
*/
#if USE_NORMAL_MAP
#if OOSTD_CUBE_MAP
vec4 normalMapSample = textureCube(uNormalMap, vCoords);
#else
vec4 normalMapSample = texture2D(uNormalMap, texCoords);
#endif
Povray Planets - Planet textures for your galaxy
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
It's really all about UV unwrapping. Once the UV map in Blender matches what Oolite expects, any baked texture will match (although, to be honest, I didn't try the equirectangular maps -- I hate with a passion the poles' distorsion -- but they work for another_commander's "<planet_in_Oolite> is <planet_in_Solar_system>" OXPs).submersible wrote: ↑Thu Dec 10, 2020 9:34 amI've been reading the default planet shader and it looks like normal maps with cube map is supported. What makes me curious is how you've reproduced the 'hairy ball' tangent space with blender to get these awesome normal maps. I had always assumed that cube map normals would need to be object space or differential to object space.
[...]
Ouch!submersible wrote: ↑Thu Dec 10, 2020 9:34 am[...]
I really need to get oolite installed and try them - looks *really* interesting.
If interested, I can send the Blender file I'm trying to munch on for creating these maps. I think that will be the better distribution for this, considering the size of the files for _not-even-half_ of G1.
- submersible
- Commodore
- Posts: 264
- Joined: Thu Nov 10, 2011 7:49 am
Re: BPlanets
No rush - same reason I don't have blender installed as oolite, not for work laptops. Povray in a container I can get away with. I will continue to follow this thread with interest.Commander_X wrote: ↑Thu Dec 10, 2020 2:57 pmIf interested, I can send the Blender file I'm trying to munch on for creating these maps. I think that will be the better distribution for this, considering the size of the files for _not-even-half_ of G1.
Povray Planets - Planet textures for your galaxy
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
A quick (Oolite in-game) composition to test planet map generation in shaders:Commander_X wrote: ↑Thu Oct 08, 2020 4:17 pm[...]
Step 2. Let there be map - create/copy/adapt any favorite GLSL noise based sample you consider worthy to replace the new diffuseColor value (and deduce the new normal value from it)
Considering the size of an unfinished G1 (+5G for 235 planets) using Blender, it might make more sense to try to pursue this avenue. There would be two more main goals to make this "official" -- 1 (easy) to bring in some more uniforms from planetinfo.plist (e.g. land_color, land_fraction, random_seed) to help with more variety; 2. (not so easy) to implement heightmap -> normal conversion in the shader.
Lower priority (or not quite so for some ): night lights, gas giant variants.
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
Whew, heightmap -> normalmap finally done!
- Redspear
- ---- E L I T E ----
- Posts: 2686
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: BPlanets
Surface looks great but are they clouds?
My usual comment re clouds: more please!
Assumptions:
Blue = water = evaporation
Green = flora = transpiration
...and I'm no expert here but...
Crude assessment in presence of both = whacking great cloud layers sweeping AND swirling ominously through the firmament
Regardless, that's one cool looking texture
My usual comment re clouds: more please!
Assumptions:
Blue = water = evaporation
Green = flora = transpiration
...and I'm no expert here but...
Crude assessment in presence of both = whacking great cloud layers sweeping AND swirling ominously through the firmament
Regardless, that's one cool looking texture
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BPlanets
Them clouds are those provided by the OOTB (out of the box) game.
Here's a more cloudy example:
These are from my attempt to "move" the planet textures creation in the shader. Even for only the diffuse + spec + normal, I'm not sure what would be the hit for older graphic cards. (Realistic) Clouds would be quite a high call at the moment.
- submersible
- Commodore
- Posts: 264
- Joined: Thu Nov 10, 2011 7:49 am
Re: BPlanets
Looking good!Commander_X wrote: ↑Wed Jan 27, 2021 2:15 amThese are from my attempt to "move" the planet textures creation in the shader. Even for only the diffuse + spec + normal, I'm not sure what would be the hit for older graphic cards.
Commander_X - are you doing this with code changes or using plists and providing the vertex/fragment shaders?
Povray Planets - Planet textures for your galaxy