Community Planet Creation: Research/Help


I’m here to ask how to create a planet. Not the casual “How do I do this.” more of a “Can you help me research how to do this?”

Before I explain any further I must explain what I mean.

I’ve done months of digging for a way to create a planet in Unreal Engine. Yet most tutorials/plugins are outdated, or people only show off the planet. No-one really explains how to create one. I love a challenge so I must say. I know this will be very very challenging, many people go through this process and seem to give up. I won’t. I want to make a planet that LOOKS to scale but actually isn’t. For example, something that is from Elite Dangerous or Star Citizen. Something like this:
The player must be-able to land on it and fly away from it. They must be-able to freely land anywhere. This will be a adventure in itself and that’s fine by me. I am dedicated. If the community can help then I will try to upload it to the market for free to help other aspiring game developers. What I plan on doing is either researching some code I can use or find a program that can help (up to date for U.E. 4.24+). That part will be a challenge.

If you say it is not possible, trust me it is. Dedication is required to make it possible. Even if we get the terrain, it will still be possible.

If you already have a solution then just say it. At least an up-to-date solution.

This isn’t a solo project. If you want to help go ahead and read below.

First off I should explain fully now. This is a project that I have been trying to do alone for quite some time. That said it won’t be easy and must be done as a team now.

I need help researching ways to create planets for U.E. 4.24 and many people still are looking like I am. This can’t be a solo project.

The Concept:

The player can land on the planet fully and anywhere they choose. Caves can be naturally generated. Realistic Atmosphere (Atmosphere doesn’t really matter since U.E. 4.24 has that now).
The effects of gravity kicks-in when the player reaches a certain distance away. Planet has rotation speed settings.

**1. (PRIORITY) The planet terrain creation: **The way the planet could be created is in a form of a mesh or a landscape, preferably a mesh (unless you have any other ideas). The planet must be highly detailed and can be customized to the users choice, EG: Noise can be customized, Making canyons or valleys. To get noise we need an up-to-date plugin or code that works with U.E. 4.24+. The terrain can be slowly customized in the editor and live updates show. Caves could be created. The L.O.D. renders in depending on the camera location and doesn’t show much of the other side of the planet if the camera is facing a certain direction.

It would be best if we start off small and make landscape that is low poly but slowly increase it to see what occurs. Experimenting with this will take months but as a community it can be more efficient. The caves would be a final point to get working on since that shouldn’t matter unless people really want it.

The landscapes are the priority since the other points listed can be found elsewhere.

  1. Realistic Atmospheres: This isn’t required since U.E. 4.24 has this implemented into it.

  2. Gravity: Gravity will be a priority for a planet. You can’t have Unreal Engine’s normal gravity as it would make the player fall off the sides of the planet. This stuff could be bought on the market place but having a plugin added to this project could make it simple. Orbits would be required since there may be moons or spacecraft that want to orbit the planet/moon. This can help make solar systems work as they should.

  3. Rotation: It is possible to make an object rotate in U.E. but again its best if we decide to make a plugin for the addon.

Yes all of this will be annoyingly difficult. Its a challenge that all of us want. We want to build planets well lets build planets.

For further details I will post a link to a document sometime next week or before/by this date (2020/1/31)

Thanks for reading and don’t want to help no need to say it wont work, we will try until it does.


I can help get you started by pointing to other people’s WIP.
But that’s about it, as overall it requires custom engine work.
The landscape / terrain system as it stands won’t help much.

…And sadly…

Epic has absolutely no interest in this area at all whatsoever.
I’ve asked for years, any chance I get, every rep I speak with. :frowning:
It’d be a game changer to have this tech, but still a challenge.
Maybe that’s why no one has made a ‘product’, just a ‘demo’.

There’s Double-Precision, long distance rendering / Gravity…
Z-fighting performance. So many diverse problems to solve…
And even after that, you still must find ways to Populate it all.…64#post1668664…dural-universe…e-eden-project

Seems you know this thread already but anyway here goes:…net-generation

That is really unfortunate. I don’t mind doing labor and research for quite some time.
I’m just getting tired of going in circles. I do plan on making a program to help this
situation. I have yet to learn how to “Modify” U.E. So that is more of a side mission.
I could just start with that but my coding skills aren’t peaked. I will do further research
through both planet creation and plugin creation.

If it’s obvious how to make plugins for U.E. then I may have just missed it. I wish for
anyone else that may be interested to help. All I can do now is continue my research.

My goal is to make this a plugin not a demo. Again help will be nice.

Thanks a lot.

No doubt, this is like the holy grail of game dev. :smiley: Outside of custom engines (Outerra / Unigine etc) and a few games (NMS / Star Citizen / Dual Universe / Elite-D / KSP etc), who else has this tech? However, a warning from IOFlow Studios (Eden) always hits home to me. To paraphrase: Even after achieving the monumental task of planets, you still have to populate it all… Because of that I no longer think it makes sense to try and actually create something on that scale. Look at how Star Citizen is struggling to actually get to the finish line etc.

What would make more sense is some way to create the feeling of a planet and particularly the descent / ascent from the surface through atmosphere to space etc. And then be able to recreate that with different parameters and different colony settlements etc. So create ‘a fake procedural’ world etc. Just one that captures the illusion well enough. Because actually, if the tech was available in UE4 today, if might become quite tiring after a while doing flyovers across endless planets, as most of it is going to be sea and endless terrain with few real focal points of interest.

But if you can get that part down credibly, you can create the illusion of planetary terrain. After all, this is what TV and Film have been doing for decades. Drawing in the viewer just enough to buy into the illusion of planets as reality. Anyway, why not chat with some of the devs behind the projects above via PM / Discord. Many are approachable and enjoy chatting about their work. It might give you some starting points. But its a hard problem to solve, that’s for sure. Few have managed to get even close to faking it. But lots have tried etc… :stuck_out_tongue:

Forgot about a few other interesting procedural planet projects, there’s also this and this

@ClavosTech “But if you can get that part down credibly” - yes, because we have all literally ascended to the stars a billion times and know exactly how that is supposed to go in a credible way XP

I’ll be posting my ideas in a bit. Just need to refine what I’m saying vs what I know the engine can/already does.

In short however single player should be possible with engine modification - MP basically no. UE4 doesn’t cater to peer 2 peer anyway, a server cannot hold tiles required for a landmass needed for a planet (earth is what, 501m km^2). I suppose on a listen server, maybe, if you Force all other players to be around whoever the listen server player is so that you don’t overload the system.

So, I think before moving forward you need to define if you want to make this a MP ordeal, or a SP ordeal. That choice will likely dictate nearly everything else about the project.

[USER=“3140864”]MostHost LA[/USER]

The thread isn’t really asking what’s possible. We know its possible. The amazingly work from the devs linked above confirm that it is. The question is, can you or anyone else help make it a reality? :cool:

By credibly, I just meant this versus this

BTW: I’m bumping this thread to keep it going, because I think its an important feature that’s drifted away into oblivion. But overall, I do not have any of the skills necessary to make it happen. I’d just love to see it happen ;)… That said, I think the landing and takeoff parts are more important than circumnavigating around what will probably be mostly desolate planets. But just getting the takeoff / landing working (perhaps dithering between gigantic meshes and voxel terrain etc), would still bring credibility to the challenge. That would mean not dealing with whole planets, just a limited number of planetary sections or tiles where ‘colonies’ have landed etc. Whole populated planets aren’t really practical or necessary anyway, as its too tricky to populate them all with interesting things. In that scenario, multiplayer is possible…

As per the OP’s request, the planets should be walk-able and customizable.
To me that would mean replicating earth. In fact, if you can replicate earth, replicating Mars would be a walk in the park.
Replicating it to scale is/may be impossible.

To put scale in perspective, if you wanted to replicate the solar system to scale on a piece of paper with earth being the tip of a pencil, you’d need a square paper of about 432m (approximate orbit of pluto with a 4inch wide sun).

It’s pretty demanding to begin with, but unreal units being what they are you would hit issues making any calculation past the max the variable types can hold.

My main question to OP is: Are you wanting to fly around the planet like an airplane, or not?
The answer to that actually determines if you can use the UE4 landscape system or if something better should be built specifically for this. (not like the landscape system works anyway right? :P)

That’s why I think its too impractical and makes more sense to have some kind of procedural tile system. You pick a fixed trajectory descent down to a planet and land into a tiled area and that’s the level. There’s no custom gravity needed in that scenario, just dithering of planet mesh to voxel terrain (for space to atmosphere to ground rendering). Otherwise, there’s no way to replicate reality without NMS organic algos or better. That doesn’t mean the OP really expects to fly around the whole planet. But if they do, there are solutions to increase a tiled level beyond voxels, from infinite spawning of procedural meshes, to WC / level streaming / teleport tricks. If none of that works, you could still use the old resource trick: if there’s nothing around to craft you can’t go on, so the craft runs out of fuel etc (which is not very satisfying obviously).

For a tile system to work there are limitations like not being able to freely fly around the planet in the atmosphere for starters (unless you cripple the gameplay by running out of fuel or add bad weather or other artificial limit)… So that’s where not having an actual planet falls down. It just depends on whether you can live with conventional ‘rocket realism’ or not. For example, when a spaceship takes off, it quickly goes into rocket booster mode and takes a fixed trajectory out of the earth’s gravity with multiple stages of separation. That’s how most earth based spaceships work (apart from Virgin’s). Its completely different to how commercial planes fly. Rockets go straight up for the most part. On the way back, they choose a re-entry trajectory to avoid burn up, and then parachute down. The retired space shuttle did partially glide, but it wasn’t like it switched to flying through the atmosphere like a jet-powered-airplane. In short, spaceships don’t have aerodynamic flight characteristics, and planes don’t have rocket modules for space travel. So in reality, flying like a plane through the atmosphere in a spaceship is out (except in ultra-futuristic video games).

For the larger challenge of solar systems to galaxies, a little realism may help again. The gap between planets is normally so vast that any other planets that are visible can be faked with just distant meshes. So again the core limitation is getting the ascent / descent to space to look ‘credible’, and then just deal with planets one at a time, by procedurally faking each one, and then procedurally creating tiled landing sites. This would also help deal with the larger headache of large worlds and origin rebasing. The spaceship is made to appear to travel, but the world stays at (0.0.0), as does each spawned tile. This is what TV & Film have been doing for decades.

**Quick update bump:

1.** @TitaniumAG
Procedural Planet Generation

2. @MaximeDupart
Procedural Planet - MultiThreading LOD

3. @Rockam
This Procedural Terrain Generator is available to buy today

@ClavosTech Video from last #screenshotSaturday - Biom painting. A bit more recent than the video you linked ^^…
This planet is around 300km radius.

Thanks @MaximeDupart! :cool:

Hello people.

I don’t have anything near that biome-stuff that was posted, but I can probably help with a few things to get you started.
I have never touched game-developement before this, so what I do is probably not the best way, keep that in mind.
This is all also really freaking hard to explain in a single post, so it’s gonna be hard to read.

First off, this is what I have at the moment:

This planet is bigger than Jupiter. I set its radius to 70.000 km, but because my “noise-generator” has a few flaws, it’s actually about 5-10% bigger or something.

The last thing I was working on was trying to add UE’s SkyAtmosphere, but since my planets are so huge, there are issues. Here on a 100km radius planet:

Anyway, where to begin… Research!
My plan was to make it possible to travel from the surface of a planet all the way to the surface of a planet in another galaxy.
I know this is possible because of the videos from the magnificent @dexyfex
I also learned a lot from that blog.
There are several websites and posts and videos out there doing different and similar things.
Sebastian Lague has some really interesting and extremely well-made tutorials for making planets in Unity. The logic is applicable in UE4.

When creating an entire universe, there are A LOT of things to consider. Everything should be based on noise and a seed. But first, your universe should be split into different kinds of “worlds”.
For instance, my plan was to make these:

  1. PlanetWorld
  2. SolarWorld
  3. GalaxyWorld
  4. UniverseWorld
    So when you’re in “UniverseWorld” (empty space between galaxies) and look at the nearby galaxies, these galaxies are pretty much static. They individually move relative to you, so you can fly past them, but the stars in each galaxy are just grouped into one single texture.
    When you move close to one of these galaxies, you enter a GalaxyWorld. Each star in that galaxy will now become individually static. Now, all the external galaxies are collected on a “SkyBox”, and won’t move relative to you.
    Technically, the static galaxy you approached will be destroyed, and replaced by this new GalaxyWorld’s own star-meshes.
    When you move close to a star in your galaxy, you enter SolarWorld. The other stars in the galaxy will become the static “SkyBox”. But now you can see the planets as small meshes.
    When you move close to a planet, you enter PlanetWorld. The other planets in the solar system are now textures on the skybox (either combined with the other skybox, or individual). But not necessarily actual meshes.
    The planet-mesh you approached is deleted and replaced by a complex mesh, consisting of several meshes, that increase in resolution when you move closer.

To keep track of which world you’re in, when to transition, and where to spawn the different worlds’ objects, you need a single WorldController. In fact, that’s the only thing I have in my “level” before clicking play.

This WorldController keeps track of your position in the universe. Each “world” needs its own coordinate-system, and you’d have to convert between them.

To be honest, I never got further than creating the PlanetWorld, so I don’t have a solar system etc.
I don’t even know if any of that logic would work. @dexyfex could probably answer if this is somewhat the way it was done for Galaxia.

Before we talk about creating the planet, you need to know about floating point precision, and the errors it creates.
Let’s say you want to spawn a planet in your UE4 editor, and you want it to be 70.000 km in radius like the one I showed above (which in UE-units(centimeter) is 7000000000). Then let’s say you want to spawn a rock on the surface. This is problematic.
If your planet is spawned at world zero (x:0, y: 0, z: 0), then your rock would have a coordinate/translation of e.g (x:7000000000, y:0, z:0). That number is too high!
It’s hard to explain, but since we’re dealing with such huge numbers with angles and vectors etc, the higher the number, the lower the precision.
It’s something like, for every “10 to the power of X” you move away from world zero, the same amout of precision is lost.
I.E, the higher the number, the fewer the decimal points are possible.
In your UE-editor, just try to put anything at x:7000000000 and look at it. Here’s what that looks like.

The above sphere is at 0,0,0. The one below is at x:7000000000.
The spehere looks allright, and I can move it nicely in y and z. But if I try to add 1 to X, it doesn’t move at all. It resets to the same.
If you try to move it to 7000010000, it snaps to 7000010240. It’s just… not good enough.
So basically, you can’t spawn a planet mesh at world zero and expect to be able to have anything on the surface. Everything would move in huge steps. Including the player.

How did I solve this?
First off, world rebasing. When I move more than 4km in any direction, I tell the UWorld to “rebase”, so that my position is now the new world origin, and UE moves all the other actors.
This way, anything spawned near me, always has good precision. That’s important. If I spawn a rock next to me, it will be near (0,0,0). If I move 100km, the world rebases several times, and if I spawn a new rock next to me again, that one would also be near 0,0,0.
The old rock, which would now be at -10000000 (if it still existed) probably has precision issues, but it doesn’t matter because it’s so far away, you can’t tell.

Every time I rebase the world (every 4km) I also need to add these ~4km to my own “private” coordinate systems so that I always know where I am, and where the planet is (because neither of us are at exactly world zero).


Generating an entire planet as one object with a fixed “resolution” is not practical (nor possible). You need to split it up into several meshes with several LODs, which automatically increase/decrease in resolution based on distance from player.
To create mesh in runtime, I’m using RuntimeMeshComponent.
To handle the LOD-system, I’ve created what’s called a quadtree. It’s basically just a node structure.

Basically I “visualize” my planet as six planes in the form of a 2x2x2 cube. That seems to be the most common way to do this, since a normal “sphere” has issues with the poles, and icosahedrons are nightmares for textures.
My “Planet instance” stores a “PlanetSetting”-struct which contains stuff like its radius and its noise-generator (stuff based on the seed etc.)
The planet also stores six QuadTree-nodes, which I’ll explain later. These specific nodes represent each side in the cube. The root nodes. All these nodes store 4 vertices (corners) on the cube. (e.g (-1, 1, 1), (1, 1, -1) etc)
Each tick (or so) I tell each of these six nodes to generate their mesh, based on their four vertices in the cube.
When a node generates its mesh, it calculates a range of vertices between its four corners (e.g 64x64 vertices). At the same time, it calculates where on a SPHERE relative to sphere center all these vertices should be, using some fancy math. Now we have a spherical smooth planet.
Then I ask a noise-generator to get a “heightMultiplier” for each of these coordinates and multiply that, to get the terrain. (e.g 1.00005 for one vertex, 1.00014 for the next etc.). Now we have mountains. For noise, I’m using FastNoise.
Then I add the planet’s offset from world center to each vertex, so that I can spawn this mesh relative to world center instead of planet center. That’s important.
All the above math must be done with DOUBLES instead of floats, to avoid the precision error.
When all these calculations are done, I can convert the numbers to float, and spawn it in the world.
Sorry, this is really tricky to explain…

So what’s with the QuadTree?
Well, whenever I ask a Node to generate its mesh, it can also say “hey, you are too close to me”. So instead of generating its own mesh, it can divide itself into FOUR children.
The existing mesh (if any) will be destroyed, and the node now has four children nodes. Which are exactly the same kind of object as the previous one. It’s a recursive thing.
So it creates four children, and then tell all of them to generate their meshes.
And if I get too close to one of these children, it creates four children of its own. Etc. etc.

So when I tell the original six nodes to generate their meshes on every tick, some of them might say “I’ll tell my children to generate mesh instead”.
You still need to go through the entire node tree like this every time, because if you move far enough away, the “parent” must be able to say “Hey, I won’t ask my children, but they already exist, so I will kill my children and create my own mesh”.
There is a lot of information about quad trees out there if this was confusing.

QuadTrees + world rebasing + private coordinate system, means that I can spawn the new child-node-terrains closer to my player. Meaning that when I’m on the surface, each vertex of the terrain has a value of less than 4 kilometers, because it’s relative to the dynamic world center, instead of being relative to the planet center which is several thousand kilometers away.

What I’m explaining now is just the idea. There are LOTS of other stuff that needs to be considered. Calculating the normals is a real pain.
Especially because you want normals to be smooth between different nodes, so you need to either completely change my approach so you can send in a bigger area than your targeted mesh-area, or calculate surrounding external vertices based on internal vertices.
And then there’s tangents, UV/textures etc.
And the calculations for all vertices per mesh must be done asynchronously, by use of multi threading, so the game thread isn’t overflowed and cause lagging.
It’s a lot of work. Good luck.

This took way too long to write. And I even wrote it twice, because during the first writing I pressed ctrl+z to remove the last few letters, but it actually removed everything after the first youtube-link. yay…

Anyway… I have practically given up on my own project.
I started before I had a base idea for the actual game, and now I’m sitting here with a planet, without knowing what to do with it. And I’m back to my real-life-job, so I have a lot less time to spend on this. So I’ll probably not get much further than this…

Edit: Oh, and the gravity is done by using (and slightly modifying) the free Directional Gravityplugin.


Great write up Stiian, sounds pretty similar to my setup… well done, it took me several years to get to that point!

I’ve been out of it for a while too, but this whole isolation thing has somehow bought it to the surface again.

Here’s pretty much where I’m up to:

Don’t be fooled by the basic mountains, the underlying system I’m testing here is super sneaky powerful for a bunch of tricky reasons :slight_smile:

Having said that, the lod popping is awful so for the next month or two my main focus will be crawling through my code and scrubbing it to the bone, then implementing a new LOD technique with much better (and smoother) density.

1 Like

Thanks @Stiian and [USER=“887”]ioFlow Studios[/USER]

Thanks also to @SebHillaire/Epic for the new Sky-Atmosphere system.
Looking forward to experimenting with the tech demo when its released.
And if something more comes out of this… How amazing would that be. :wink:

Hi there,

I posted this to another topic but just made longer version of movie so put it in here too :slight_smile:

Thanks @lvglvglvg :cool:

Spectacular lvglvglvg!

For anyone who hasn’t seen it, check out this guys youtube channel:…TBJDXMNZeWSUVA

No 3d, it’s all about designing worlds in the fullest sense of the word.

Wow, that’s some scope…:cool: