Planet Generation

In reference to the reflected light of the moon, I found an article on PubMed (http://www.ncbi.nlm.nih.gov/pubmed/16916290) that deals with non-solar sources of photons for photosynthesis. Apparently the amount of reflected light (at least in the concentrations the moon provides) is rarely sufficient for photosynthesis, and the researcher suggests it’s only a viable source near the full phase. I assume that as one enters into the water this drops off further.

That being said, I’m still looking for the math on that because it’s possible that more moons or more reflective moons could make a big difference.

1 Like

Sorry for double post.

I’ve been working a bit on plotting potential graphs of spectrum absorbance with the guidance of TJWhale. I encountered a bit of a conundrum and I decided I should seek some further help.

Given how simple (read: not easy, but simple) the system in question is, I think I’ve been reinventing the wheel (and doing so quite poorly). It’s dawned on me that it can really just be a static light penetration distribution based on the NOAA chart, which can then have a sin(phi) coefficient to account for angle of deflection (i.e. polar regions will receive less light penetration than tropical regions).

The problem that I’ve encountered with graphing though is that I’m not sure how to integrate the intensity of the light in a realistic manner (specifically, there’s a lack of data on how different stars impact their planets’ oceans given our limited sampling capabilities as a species), and so far I’ve just plotted individual penetration data based on expected values, so if there’s a decent distribution function I think it’d improve vastly on my code.

Edit: Chart of expected value: http://oceanexplorer.noaa.gov/explorations/04deepscope/background/deeplight/media/diagram3.html

Firstly I think reinventing the wheel is always a great idea because it really helps you understand how the system works. For me Thrive has been great for learning stuff, my cell biology has improved immensely.

Secondly I think you’re doing great. Just go slow and don’t stress yourself out and feel free to ask for as much help as you want. The hardest big is figuring out how it should work.

It’s weird that it’s different in coastal, I was not expecting that.

This is what I’ve been imagining. Have a function which does

Scaling(Wavelength) = Use the NOAA chart to guess some values so the graph shows where the intensity has decreased to 20% of it’s original value

UnderwaterLightIntensity(Intensity, Depth, Angle, Wavelength) = Intensity*sin(Angle)exp(-DepthScaling(Wavelength))

So for example take blue light. Put in the formula Intensity = 1, Angle = pi/2, Depth = 200 then compute the value of the scaling to give light intensity of 0.2. Once you have this then you can make a function out of for the scaling for the other wavelengths (which will be greater so the light decays faster). (Infrared should basically be blocked out entirely, which is interesting).

Then make another function which takes the whole array of light intensities on the surface as an input and computes UnderwaterLightIntensity for all the wavelengths one by one and produces an array as an output (which will take Depth and Angle as parameters). Then for any patch we can input the surface intensity array, and Depth and Angle and get a spectrum out in return.

So
for (i = 0, i < LenghtOfArrays, i++) {
UnderwaterSpectrum[i] = UnderwaterLightIntensity(SurfaceSpectrum[i], Depth, Angle, Wavelength = 0.05*(i + 1));
}
or something like that.

Also you could then add a new variable to scaling so that the coastal values are different.

Does that all make sense?

1 Like

On first brush I think I follow.

In light of recent events (roughly 1/3 of all sentences in 2016 start this way), I probably won’t be able to build on the (minimal) work I’ve started until Friday, so I guess I won’t really know if I understand til then.

Thank you!

1 Like

Would all of the light be coming in from a certain 1-180 angle? Or would it be possible for it to come in from any angle (albeit thats kinda improbable). Also would water color affect the light going under the sea (since water is intrinsically slightly blue in color)

I wrote up a script to calculate the fudge factor for each wavelength when supplied with wavelength and expected depth of penetration (based heavily on the pseudo-code above). The problem is that I’m not certain what depth we’re expecting for Near Infrared and Ultraviolet. Has anyone found values for those?

Awesome.

I think this page

has this diagram

which is what you want. It’s logarithmic on the bottom axis so bear that in mind. You can see the pointy iceberg bit you have above in the visible spectrum and basically the further you get from the visible the less that gets through.

3 Likes

Sorry for necro, but from what I was reading there were a few points not addressed, it seems everyone was addressing the physics well, which is great, but we seem to forget how this would affect our little bundles of DNA that are gonna be making societies in these worlds.

  1. I would say avoid huge massive stars that will burn out in a blink, but smaller and main sequence stars would work perfectly fine for our purposes.

  2. Stars die when their CORE runns out of hydrogen and helium, and collapses. Beyond that I have no clue.

  3. I dunno about it being that limited. I feel generating it at the start and putting “stars” in the sky that are other planets in the solar system would be more immersive.

  4. They should definitely be a thing for 2 reasons: 1 they’re just really cool and 2, that CAN happen, so why not? My bigger concern is whether they should be P-orbit planets (orbit the barycenter around both stars) or S-orbit planets (orbits one of the stars). Though to avoid bigger issue, habitable ones should be limited to smaller stars (red/white dwarfs)

  5. Moons affect tides, which can affect aquatic civs. Having the homeworld as a moon has other issues, too. Bigger tides, basically being eclipsed for 1/4 of your orbit around your parent body. But it can be interesting, too. Pretty skies, lots of resources available from nearby planetoids and asteroid belts.

  6. you got that handled pretty thoroughly

  7. Size does play into mass, density, and available land and resources. We should put some variation here. Maybe pick a “mean” size, and make a standard deviation distribution so most habitable worlds are around that size, but not exactly that size.

  8. same as size, it should vary, since that affects biology and air pressure, and so diversity. But not vary so much that it would kill a non-native from a similarly concentrated biosphere. So like O2 on Earth is 22%, it could range from 18~25%, same can be applied to other gases. Earth is our only baseline, we might as well use it, but we should’t make it universally uniform, thats boring (cue exact same continents on 10,000 worlds)

  9. I think a variable model by atmospheric density would work well, and allow a variety of atmospheric densities (and colors)

  10. sounds good

  11. We could set up a plot, I actually have an idea of “you” terraforming a barren world into a fertile one, to allow some degree of customization. You’re limited in scope, you can select the star type, and weather you want moons, etc., but you can only customize the actual planet. Even then, that doesn’t guarantee survival.
    We could also make the detailed customization available only after one of your species reaches ascension, which i think was mentioned…

1 Like

Necro again, sorry, but I think it might be pertinent/useful/interesting in terms of the planet generation.

I was watching a youtube video that made me think, at the beginning, it said;
“The Earth is really a double planet. Our Moon is much too large in relation to the Earth to be considered just a moon. We now know the formation of a double planet like ours is remarkably unlikely.
We also know the Moon has had a profound impact on the evolution of life.”

I was thinking that most or all the “home” planets could have a large moon, as a nod to the Moon’s importance and the proliferation of intelligent life.

Thought it might be interesting of nothing else.

Reviving a thread from a long time ago :slight_smile:

So all of the stuff which is above here is about star and planet generation. There’s a code prototype here. What it does is it generates variables but no geography or anything spatial like that.

For the star it works out mass and from that it works out Life span, Radius, Temperature, Luminosity, the spectrum of the light the star emits and the habitable zone for the star in which planets can have liquid water.

For the planet it takes the radius and orbital distance and works out temperature and relative masses of the atmosphere, lithosphere and oceans. It also takes the composition of the atmosphere and works out the spectrum of light that hits the planet.

What I’m proposing is to work on this by adding an update step. So the star will change over time and get hotter or cooler, maybe it flares. For the planet the changes in the star will change it’s temperature and maybe damage it, maybe there will be volcanoes or asteroid impacts etc.

I think the value of this is that it can really help with patch map generation by having good variables to build on (how much of this planet is frozen, what percentage is ocean etc). It will hopefully provide some good ongoing gameplay where you need to adapt to changing planet conditions. Hopefully once this system is built it will last well, probably this is enough to get us into the strategy stages.

I’m hopeful I can do most of this work myself, I’d like to try it as a project to learn more about coding for the game, I’ll probably need some help with plumbing it in and anyone who is interested in contributing is totally welcome. Maybe 0.4.3 isn’t the right time for this so feel free to say if people have other priorities, also if anyone has ideas and contributions for this system I’d appreciate hearing them.

3 Likes

I was doing a bit of prep for the star and planet generator and I wanted to ask everyone’s opinions on what options the player should have when starting a new game.

I was thinking something along the lines of you press new game and you get a page with maybe 4 buttons on it:

Default - which makes a stable star and a reasonably earthlike planet with guaranteed land and a low amount of disasters. This would be the normal Thrive experience.
Friendly - which makes something very habitable and has no disasters.
Extreme - which makes a planet which may have poor habitability (too hot too cold) and lots of disasters however will definitely have land so you can get to all stages.
Custom.

Custom lets you choose the mass of the star and the amount of solar disasters. It also lets you choose the orbital radius of the planet and what it’s atmo is like and how many planetary disasters it has. Maybe even you can turn specific disasters on and off. You can if you want make a planet which is all water and permanently frozen, for example, or one which has massive meteor strikes frequently. This would block you from later stages but it might be possible to have a warning.

What do you all think?

3 Likes

Sounds good, could these settings apply to compound availability and cell behaviour as well? So very aggresive predatory cells won’t appear on Easy mode for example.

@DonGororo That starts to mess with realness so I’d rather not have simulation restrictions. I have a good book about creating accurate planets so I’ll post some thoughts and ideas here once I’m done reading.

1 Like

Good question. I think difficulty levels are probably a bigger debate. For now I might just have it impact the planet variables only. It’s an important thing to discuss though if you want to start a thread about it.

It’s exciting that we’re getting close to implementing this! I could have sworn there was a page that had collated this info, but all I could find was this thread:

Here’s a summary of all the settings not related to difficulty:


General Settings

Homeworld Type: Planet, Satellite, Random
Satellites (If homeworld is a planet): Yes, No, Random
Satellite Number (If planet has moons): [Enter number], Random
Terrestrial to Aquatic Ratio: Fully terrestrial, Mostly terrestrial, Balanced, Mostly aquatic, Fully aquatic, Anything Except “Fully aquatic”, Random
Natural Disaster Frequency: Frequent, Normal, Uncommon, Never
Life as We Know It: Yes, No

Microbe Settings

Starting Biome: Hydrothermal Vent, Tidepool, etc.
Compounds: Abundant, Normal, Rare
Endocytosis Chance: Certain, High, Normal, Low


Since there are so many starting options, and there will be tons more when the game is fleshed out, it’d be a good idea to allow the use and creation of presets. The game would ship with a few, and the player could make some of their own, or download ones other players have made on the forums.

Some ideas for presets would be:

Classic (Normal or random settings for everything, LAWK on, etc.)
Terracentric (Start on a balanced land to water planet with one satellite, normal settings, LAWK on, etc.)
Hardcore (All the hardest options, high disaster rates, slow evolution rates, fully random homeworld, etc.)

1 Like

https://experilous.com/1/blog/post/procedural-planet-generation

3 Likes

Forum Elaboration

There are two common ways to generate planets that won’t drive the programmer who takes it on mad.

The Quad Sphere and The Icosphere

The Way of the Past
The Quad Sphere is the classic way you see in Spore. You take a cube, you texture it, apply various data to it through maps, then turn it into a ball. End result is a fairly triangle efficient planet. The issue is this method has problems with seams, map glitches, corruption, file bloat (lots of images compared to the competition) and it was only done for one reason and one reason only.

Old GPUs used to struggle really hard with high triangle counts. I am not lying to you when I say modern integrated graphics are better than some dedicated stuff from back then at this. Modern computers and GPUs can almost draw triangles as easily as pixels, the problem arises when triangles are smaller than pixels or, in the case of software like Blender 3D, triangles are stored in RAM for manipulation.

But what makes Quad Spheres good for Spore but no good for us? Problem back then was the other competing method is an inefficient proposal in terms of triangle count as when you would subdivide it (make the triangles smaller, allowing that seamless zoom into a planet surface), you would get lots more triangles than when you applied such operations to a Quad Sphere. Couldn’t have that on a 2005 desktop. So, games like Spore which begun development in the early 2000s decided to use Quad Spheres and that’s what eventually spread. However, if you really need convincing:

  • You can’t map the surface of a Quad Sphere without image processing for the maps and textures that give it shape and features. For us that would mean writing graphics programming and writing shaders. Many of them. Ugly ones.

  • The shape a Quad Sphere comes from is a cube, so when you do various operations, you always have to keep this in mind.

  • You can’t reuse a lot we’ve done so far in terms of pathing or placement. The Quad Sphere would need logic for traversing a sphere or converting UV coordinates (2D surface coordinates) to usable units

  • Selecting spots on a Quad sphere requires either that UV / Sphere Math nonsense again, or some whole new interaction system we haven’t wrapped our minds around yet.

The Icosphere
In computer graphics, the Icosphere is a very special shape. It comes from the largest Platonic Solid (of which there are 5 in the universe, every face is the exact same size), the Icosahedron. In computer graphics this is big money huge because the means you can deform it in any direction with predictable results and you can subdivide it easily and reliably. It can also be truncated (snip off every pointy corner, that’s what truncation does) into another useful shape, The Hexasphere. The Hexasphere is, as you would guess, a sphere made out of hexes, and though it looks different, it has the exact same triangle layout as a Icosphere (because it secretly is one).

Fun Fact: there are 12 pentagons on a hexasphere no matter the number of hexes

Unfortunately, only a few projects have ever harnessed the power of the Icosphere so there are limited things to view out there that truly show their capability. Besides those who needed Hexaspheres like the game Rim World. Here are some advantages demonstrated by Rim World we may like:

  • You can use hex math to do everything on the surface of an Icosphere. Everything. In Rim World, Caravans will auto path their migrations, roads will be built, and all manner of insane things be placed purely by referencing and calculating positions on the hex grid that is the Icosphere surface.

  • You can smoothly subdivide it when you zoom in, the thing is you will be subdividing a giant triangle the closer you get to the surface (which is easy but worth knowing about) rather than a plane like on a Quad Sphere.

  • Quite compact and so is the data. The hexasphere you use to abstract positions of the surface to the player, abstract positions to yourself to use coordinates, and the shape you subdivide and mold into valleys and mountains and seas, are all one shape.

The Considerations
If I have convinced those reading that the Icosphere is shamelessly superior (it is) there are considerations. There are specific ways things must sometimes be done when it comes to handling the Hex state and the Ico state. Stretching shouldn’t really be done unless you’re willing to write warp code to un-stretch things. You can’t go modifying the Hexasphere in elaborate ways as if it exists in isolation from the Icosphere, whenever you do something, you must consider how you preserve the compactness of having one shape fill 2 roles. In general, the simpler the better. Also, it’s worth noting the Icosphere is, although a simple thing to wrap the mind around once you understand it, horribly documented. It is however, very modular and flexible.

Start small, end fantastically.

4 Likes

So the planet generaton prototype is looking good from what saw, and i want to throw in my 5 cents to this idea so. When generating a planet you can radomize it along with my idea choose its size. From my understanding some laptops or pc’s will have an easier time rendering, generation and simulating life on a smaller planet unless the player (not me) has a good pc and can have the option to generate larger planets.

MY IDEAS FOR THIS:
-planet size will by choosen by defult depending on your PC or Laptop system
-In multiplayer when free evolution (maybe) where the player can go through the whole game together
the planet size would also be how many players can be on your server.

  • 5 planet sizes: Very small, small, medium, large, huge.

This idea would help keep the games preformance stable later on with the games stages

Automatic selection of planet size based on performance specs is a bit ambitious for what it’s worth…

For something so small it’s far more appealing to just allow the player to decide on what size they want to play with. Worst case scenario we just slap a “Recommended for weaker PCs” disclaimer on smaller worlds.

By the way, with simple ideas such as this I would like to recommend you just post them in our developer chatroom so as not to clutter our forums. the developer chatroom is a good place to discuss ideas and shape them out into a proper concept which then can be taken to the forums.

3 Likes

Also for far future concepts, it’s much better to discuss many of the topics on the community forums.

2 Likes