That is really a great thing for us all. http://fewhacks.com/
I just based my landscape material on this. I just wish I could exactly figure out what is going on with normals, ao and displacement here.
That was extremely helpful! Thank you!
Kimmo Kaunela shared the way he approached the production of procedural planets with Substance Designer.
One of my personal sci-fi project needed to have some planets that I was planning to add to the background. I didn’t want to use NASA scans that I have used before because it’s a lot of work to modify them and I would need to heavily change things to get different results.
I came up with this idea that it would be awesome to have fully procedural system that would give me good results but would also allow to generate different types of planets, suns and moons fairly easy with minimal manual work. Also another motivation for this approach was to test how far can I go with my Substance Designer skills.
Material itself is pretty basic in terms of blending and works just like blending any different materials together but it took some time to break things down into smaller chunks. Planets are basically full of different layers that are made of different materials.
I started to think what would be the base layer and I looked what the Earth was made of. Oceans are pretty dominant element so I decided to create ocean as a base layer. Oceans also have different types of currents and tides that I wanted to have. Directional warp and some noise patterns allowed to generate these effects. I can replace this base layer with lava or dry ground to generate different styles.
Continents are making second layer. I started with a plasma noise and then it was just slope blur after slope blur to get it to look more like sharp rocky ground. Cells 3 noise gave some nice cracks that actually looks like small rivers. I also masked shore lines that I used to add small islands near the bigger continents.
Foliage is the third layer. It will grow on dry land areas so I masked it with continents to prevent it from growing from oceans. Then it was just a matter of finding the right level values for the height blend so forest would grow more naturally. This layer is something that I can just remove if I would want to make a moon.
Then I wanted to create a layer for different emissive elements that planet can hold. In Earth case there would be large cities ja buildings that would emit small lights. I used a shape node and thorn pattern and then used splatter node to scatter it many times so I got very small spots. Then I masked it out with continents and foliage layers since cities would most likely be built on flat grounds and not in forest or ocean.
Last layer is the atmosphere. Atmosphere allows that there are clouds and wind would move these clouds and results would look very curly. Directional warp was once again very useful for achieving this effect. I also noticed that planet pole areas have more clouds so I used a linear gradient to mask more clouds there.
There were a bunch of different things that took some time to figure out. One of those was the ocean and continent layers blending. At the beginning the transition was very smooth but after some testing I ended up making it more sharper. Scale was probably one of the hardest thing to get right since planets are usually pretty large so it was important to keep the scale consistent with every layer. Also the level of details needed to have balanced because too much details ended up looking very noisy.
I think most important thing is to break main task down to smaller tasks. Also this small test showed me how important it is to think things in micro/macro level. Some ideas could work well in micro level but not in the bigger macro level.
This material is still in its early stages so there are a lot of things that I need to make but it works pretty well if planets are in background or at distance. I will probably keep updating this to have more control and details so it would work for closeups too. There are also some bugs like a bad skewing on pole areas that I need to fix. It’s very messy right now and I’m planning to split it into subgraphs when I have all of the bugs fixed.
Right now I can make changes to individual layers and that way make different planets, moons and suns. One thing that I really like about this procedural workflow is that I can generate different continent layouts just by adding random seed numbers and that way find the one I like the most. It would be interesting to implement this system with UE4 to generate different galaxies just by using random seed values and changing planet layers with random ones and some boolean variables for atmosphere, civilization, forest etc..
My UE4 environment is a fictional planet somewhere in the galaxy so there are a lot of different planets and moons visible and some of them can be pretty close so they appear very large. I have fairly big scale for the planets and they are at distance but still far from realistic measurements. I didn’t want to move them too far because then different effects started to look wrong. I just move them to a place that looks nice from the player perspective.
I used a simple sphere with enough segments and I made a planet material for it. In that material I have few static switches. One switch is for atmosphere where I just use a fresnel to add rim light effect that works pretty well for Earth like planets. Then I have a switch for emissive channel and another switch inside it if I want to animate it. I use default UE4 skybox because it gives me enough control for the sky color, clouds and so on. There are always room for tweaking so this will probably change quite a bit in the future along the environment and through different iterations.