How the Dyson Sphere Program Universe was Created? Dev Log#2
Hi, engineers!
Attention, this is not an update log - We Are Still On Holidays! But we never forget our dearest engineers, so we would like to present the Dev Log #2 for you as a holiday book. Hope this log can bring you a new perspective of the Dyson Sphere Program.
(Click here to read Dev Log #1)
[h2]Dev’s Log 02 - Create A Universe![/h2]
Development Dyson Sphere Program has been a long journey. Almost all of our knowledge and technology have been donated to this game, and there're always new new challenges wait for us. This time I want to talk a little bit about how Dyson Sphere Universe was designed and generated.
As you may all recall, Dyson sphere is a concept proposed by Freeman Dyson around 1960. This giant structure surrounds a star have an essential purpose for the future of the Human race: being able to gather all its energy output. Dyson Sphere Program is a management simulation game. But, what exactly does it simulate? And what will you have to manage?
Building a Dyson Sphere will require lots of resources. It will need such a high number that the COSMO agency will send the mecha Icarus to explore the universe. Why? Because resources from just one planet won’t be enough to build this structure. Icarus will need to find resources, build facilities to process raw materials and, finally, operate an automated interstellar manufacturing base.

Our idea to accomplish this last point was to let players to build interstellar supply chains to connect factories from different planets, thus creating a planetary industrial empire. But, first, we needed to know the framework in which players would operate. How can you build an interstellar empire if you don’t know how your universe works?
How we designed the Universe of Dyson Sphere Program
The first question that came to our minds was about size. Obviously we couldn’t replicate the real one —considering that the Universe is infinite— so we decide that our Universe would look like a star cluster, a region filled with stars, each one of them having their own set of planets and satellites orbiting around. A smaller one than the real, but enhance the gameplay.
pic from Wikipedia
The next step was making sure that every universe was diverse enough. As you know, stars come in many flavors: there are red-dwarves, blue giants. Each one has its own characteristics, so we wanted to be sure that we got everything right from a scientific point of view.
We were able to work it out thanks to eh Hertzsprung-Russell diagram, proposed back in the day by two astronomers, Ejnar Hertzsprung, from Denmark, and Henry Norris Russell, from the United States. This diagram shows a relationship between the luminosity of a star and its spectral type: the rule of thumb says that bigger stars are blue while smaller ones are red, while yellow ones, like the sun, sit in the middle of this table. If you take a look at the diagram, you might see that it shows a diagonal path from the top left corner to the bottom right. That’s where 80% or 90% of known stars are.
pic from Wikipedia
We weren’t able to simulate the exact masses and physical laws of stars, considering that we didn’t want that to interfere with gameplay. In order to set the mass of stars, we have made some assumptions: the logarithm of the mass of stars is approximately normal distribution, and the mass of type a stars is taken as the average value of normal distribution - Red and yellow stars on the left and blue and purple stars on the right. The implementation logic of the whole setting is shown in the figure below, the mass of each star was set according this logical deduction. Of course, we also made some corrections to the mass of stars for gameplays and science point of view.

Their nature is so complex that we haven’t been able to replicate them in the game for the sake of gameplay. So, in the end, we focused on two aspects: luminosity and temperature. Those two are heavily dependent on the mass of a star, so we ended up using the mass as our framework for designing stars.

That’s how we came up with a table that let us classify the stars: O (blue), B (blue and white), a (white), f (yellow-white), G (yellow), K (orange), and m (red). Considering that masses are linked to colors, O stars will be the largest ones whereas m are the smallest. Besides, as we said in the prior paragraph, luminosity and temperature are also linked so O stars will be brighter and hotter while m stars while be darker and cooler.

Having this table was very useful but it also sparked another issue: if we represent a Universe following this table, the end result would be an artificial universe, considering that the color palette wouldn’t look natural. Thanks to Unity3D, we were able to adjust settings such as the color of the star, the color of its halo, illumination or sunsets. That allowed us to have a palette of hundreds of colors, giving Dyson Sphere Program’s universe a much more natural look.

Designing planets
Once we were happy with the generation of stars, we started working on planets. Considering that each star had its own features, we tried to stick to how it would affect planets on the game. For example, most of the planets orbiting an O-type star will be lava planets, because of the star’s high temperature and mass. What about m-type stars? They will usually have frozen planets around them.
But, first of all, we had to decide how many celestial bodies would be suitable in a star system. We ended up setting a number that is always between 1 and 6 planets, both solid and gas planets. The gas ones have, at least, one satellite around them and the number of satellites depends on how many planets are on its solar system.
We designed up to 16 different orbits for every solar system, and planets fall randomly on one of those orbits. As it happens in real life, each star has an habitable zone, that area neither too close nor too away from a star where life may appear. So planets that are orbiting in that area are more likely to have water. The ones really close to the star are more likely to be lava planets while the ones too far away will most likely be frozen. If the planet's orbit is none of the above, then it will be a desert planet.

Generating galaxies and names
So, we had a way to create star systems and fill them with planets. What next? First we had to create a system that procedurally created a Universe so there will never be two exact experiences. For that, we used the Perlin noise algorithm, a powerful tool to generate things like textures or terrain procedurally. As you can see below, the colored areas show where there’s a bigger star density while the lighter ones are more sparse.

Finally, we needed a system to name our stars. And let me tell you, at the beginning it was a pain in the ass but we ended up having a blast while finding a solution. We came with a randomly name generator that, thanks to an algorithm, creates names using the roman alphabet. It took us a while to tune it so the names look more like real names, but now our Universe has this look.

Modeling: The Tree
We made new models for trees and stones. Much prettier than the old models.

We used an interesting method to make the animation of trees - Paint different colors on each vertex of the leaves, and then use the shader to change the RGB into XYZ of the direction of motion.
v.vertex.xyz += (v.color.rgb - 0.5) * (sin(time + 0.65) * cos((2 + v.color.r) * time - 0.5) * cos(3 * time + 0.5) + sin(20 * time) * 0.05) * _Anim;
// The principle is to use the superposition of several sine waves to simulate the swing of leaves

In addition, we use the shader to change the normal of the leaves. It made the leaves look hairy as a whole.
float3 std = normalize(v.vertex.xyz);
v.normal.xyz = lerp(v.normal.xyz, std, _LerpNormal);
v.normal = normalize(v.normal);
//The principle is to point the vertex normal of the leaf to the outside

Thank you Mr. Cowboy! (Just an extra...:p)

There are still many deficiencies in the setting of the universe simulation model. We will try our best to improve it, no matter on the perspective on gameplay or the point of science. You know what, I find that there are a lot of contents we can make for the game. I'll share it with you next time~
Thank you for reading. See you at Dev's Log #3!

Attention, this is not an update log - We Are Still On Holidays! But we never forget our dearest engineers, so we would like to present the Dev Log #2 for you as a holiday book. Hope this log can bring you a new perspective of the Dyson Sphere Program.
(Click here to read Dev Log #1)
[h2]Dev’s Log 02 - Create A Universe![/h2]
Development Dyson Sphere Program has been a long journey. Almost all of our knowledge and technology have been donated to this game, and there're always new new challenges wait for us. This time I want to talk a little bit about how Dyson Sphere Universe was designed and generated.
As you may all recall, Dyson sphere is a concept proposed by Freeman Dyson around 1960. This giant structure surrounds a star have an essential purpose for the future of the Human race: being able to gather all its energy output. Dyson Sphere Program is a management simulation game. But, what exactly does it simulate? And what will you have to manage?
Building a Dyson Sphere will require lots of resources. It will need such a high number that the COSMO agency will send the mecha Icarus to explore the universe. Why? Because resources from just one planet won’t be enough to build this structure. Icarus will need to find resources, build facilities to process raw materials and, finally, operate an automated interstellar manufacturing base.

Our idea to accomplish this last point was to let players to build interstellar supply chains to connect factories from different planets, thus creating a planetary industrial empire. But, first, we needed to know the framework in which players would operate. How can you build an interstellar empire if you don’t know how your universe works?
How we designed the Universe of Dyson Sphere Program
The first question that came to our minds was about size. Obviously we couldn’t replicate the real one —considering that the Universe is infinite— so we decide that our Universe would look like a star cluster, a region filled with stars, each one of them having their own set of planets and satellites orbiting around. A smaller one than the real, but enhance the gameplay.

The next step was making sure that every universe was diverse enough. As you know, stars come in many flavors: there are red-dwarves, blue giants. Each one has its own characteristics, so we wanted to be sure that we got everything right from a scientific point of view.
We were able to work it out thanks to eh Hertzsprung-Russell diagram, proposed back in the day by two astronomers, Ejnar Hertzsprung, from Denmark, and Henry Norris Russell, from the United States. This diagram shows a relationship between the luminosity of a star and its spectral type: the rule of thumb says that bigger stars are blue while smaller ones are red, while yellow ones, like the sun, sit in the middle of this table. If you take a look at the diagram, you might see that it shows a diagonal path from the top left corner to the bottom right. That’s where 80% or 90% of known stars are.

We weren’t able to simulate the exact masses and physical laws of stars, considering that we didn’t want that to interfere with gameplay. In order to set the mass of stars, we have made some assumptions: the logarithm of the mass of stars is approximately normal distribution, and the mass of type a stars is taken as the average value of normal distribution - Red and yellow stars on the left and blue and purple stars on the right. The implementation logic of the whole setting is shown in the figure below, the mass of each star was set according this logical deduction. Of course, we also made some corrections to the mass of stars for gameplays and science point of view.

Their nature is so complex that we haven’t been able to replicate them in the game for the sake of gameplay. So, in the end, we focused on two aspects: luminosity and temperature. Those two are heavily dependent on the mass of a star, so we ended up using the mass as our framework for designing stars.

That’s how we came up with a table that let us classify the stars: O (blue), B (blue and white), a (white), f (yellow-white), G (yellow), K (orange), and m (red). Considering that masses are linked to colors, O stars will be the largest ones whereas m are the smallest. Besides, as we said in the prior paragraph, luminosity and temperature are also linked so O stars will be brighter and hotter while m stars while be darker and cooler.

Having this table was very useful but it also sparked another issue: if we represent a Universe following this table, the end result would be an artificial universe, considering that the color palette wouldn’t look natural. Thanks to Unity3D, we were able to adjust settings such as the color of the star, the color of its halo, illumination or sunsets. That allowed us to have a palette of hundreds of colors, giving Dyson Sphere Program’s universe a much more natural look.


Designing planets
Once we were happy with the generation of stars, we started working on planets. Considering that each star had its own features, we tried to stick to how it would affect planets on the game. For example, most of the planets orbiting an O-type star will be lava planets, because of the star’s high temperature and mass. What about m-type stars? They will usually have frozen planets around them.
But, first of all, we had to decide how many celestial bodies would be suitable in a star system. We ended up setting a number that is always between 1 and 6 planets, both solid and gas planets. The gas ones have, at least, one satellite around them and the number of satellites depends on how many planets are on its solar system.
We designed up to 16 different orbits for every solar system, and planets fall randomly on one of those orbits. As it happens in real life, each star has an habitable zone, that area neither too close nor too away from a star where life may appear. So planets that are orbiting in that area are more likely to have water. The ones really close to the star are more likely to be lava planets while the ones too far away will most likely be frozen. If the planet's orbit is none of the above, then it will be a desert planet.

Generating galaxies and names
So, we had a way to create star systems and fill them with planets. What next? First we had to create a system that procedurally created a Universe so there will never be two exact experiences. For that, we used the Perlin noise algorithm, a powerful tool to generate things like textures or terrain procedurally. As you can see below, the colored areas show where there’s a bigger star density while the lighter ones are more sparse.

Finally, we needed a system to name our stars. And let me tell you, at the beginning it was a pain in the ass but we ended up having a blast while finding a solution. We came with a randomly name generator that, thanks to an algorithm, creates names using the roman alphabet. It took us a while to tune it so the names look more like real names, but now our Universe has this look.

Modeling: The Tree
We made new models for trees and stones. Much prettier than the old models.


We used an interesting method to make the animation of trees - Paint different colors on each vertex of the leaves, and then use the shader to change the RGB into XYZ of the direction of motion.
v.vertex.xyz += (v.color.rgb - 0.5) * (sin(time + 0.65) * cos((2 + v.color.r) * time - 0.5) * cos(3 * time + 0.5) + sin(20 * time) * 0.05) * _Anim;
// The principle is to use the superposition of several sine waves to simulate the swing of leaves


In addition, we use the shader to change the normal of the leaves. It made the leaves look hairy as a whole.
float3 std = normalize(v.vertex.xyz);
v.normal.xyz = lerp(v.normal.xyz, std, _LerpNormal);
v.normal = normalize(v.normal);
//The principle is to point the vertex normal of the leaf to the outside

Thank you Mr. Cowboy! (Just an extra...:p)

There are still many deficiencies in the setting of the universe simulation model. We will try our best to improve it, no matter on the perspective on gameplay or the point of science. You know what, I find that there are a lot of contents we can make for the game. I'll share it with you next time~
Thank you for reading. See you at Dev's Log #3!
