Simple Procedural Planets - BP only.

**UPDATE - not BP only - includes Custom C++ Blueprint Function Library **

Allright. As I can see there’s a different project doing exactly the same with BP. No reason to continue working on this kind of thing I guess. You can get a BP procedural planets free there, so I’m out with this one.

I mean, I done with BP only approach. Started to work with C++ this week so I can use different noise functions, and run generation process on different CPU thread.

What I have done so far:
Full C++ grid generation and Noise implementation for Fractal Value, Gradient, Cellular, Simplex.
Custom made (still WIP) normal calculation which is much faster than the one from Procedural Mesh.

Next step is moving all the functions to different CPU thread so there is absolutely no FPS drop during planet generation.

Basically, a segment of 256x256 poly is generated in about 800 ms.



Old version.

Well, not really BP only as I’m using a plugin, but about that - later.

So many people and games are using procedural generation now, specially space games, Dual Universe, Star Citizen, No Man’s Sky, so on, so forth.

And I though, if they can do it, so can I! (ofc “do it” not that complicated as the titles above “do it”).

So, started from a grid of points, and then moved it, copied it per side (6 sides, as a cube) and normalized it. Then added Simplex Noise combinations (HUGE thanks to **DevDad **for that plugin Simplex Noise

Every noise layer also creates a vertex color, 3 layers for 3 colors so far. It takes more less 3 seconds to create a 128x128 quad, there are like 96 quads per planet (values can be changed) biggest I did was 256x256 polys per quad and 8x8 quads per planet’s side.
So, that’s roughly… 256x256x64x6 = 25 165 824 polygons. Performence was, well, not bad. But it took ages to generate. So, I decided I’d SAVE that planet to a game save. Worked. Now after a first run the planet is saved and I can load it inside the editor or on the beginning of a game. Works pretty nice. Problem is a saved planet that size is 720 MB. The one you see in the video is 320 MB. No LOD yet, but the performance is amazingly good here.

Still, it would be AWESOME to have that load or generate on a different thread. Or something.

Anyways, This is how I’m killing time waiting for No Man’s Sky here. Might even consider putting that Blueprint to Marketplace later, when I finish the atmosphere shader and some other things, like rocks placement, forests and water… And such… And LOD… And gotta ask DevDad for a permission to include his plugin… Or something.

God, how I love Unreal!

What do you think?

Wow, looks awesome! Great results! I cant wait to see what else you do with it.

Well done, looks real nice :slight_smile:

This looks really nice.

I have some questions though.

  1. How big is this planet?
  2. Would it be possible to show a Wireframe of the Quads? I am curious to how dense the meshes are.
  3. Look into using the Run time Mesh Component It should load your Quads Faster.
  4. What are your plans for this? Do you plan on open sourcing it or selling it?
  5. Is this compatible with the BP to C++ toolset? If so you should get a performance boost from that.

1: You can scale it freely any way you want, there’s also a radius variable which defines the… Radius.
2: Sure. The density is actually a matter of setup, you can make it as dense as you want really. For safety measures (as first generation process is quite heavy and slow) I set the MAX amount of quads to 8x8 per side (6 sides total) and max quad squares to 256x256. But that’s a limit that can be easily changed.


  • simple mesh, on the right you can see how many quads (squared) it generates and how many faces (squared) per quad.


  • the planet from the video - 4x4 quads per side, 128x128 polys per quad. (6 sides x 4x4 x 128x128 = amount of faces * 2 = amount of triangles)


  • biggest I saved so far - 8x8 quads and each 96x96 faces. 720 MB save.


  • this is a single quad I made it possible to build - 8x8 quads, 256x256 faces. Tried to generate once a planet like that, well, can’t remember the save size but was way too big.

3: Sure will do! Thanks a bunch mate!

4: Well, probably will try creating a simple game for Android with this, like, a space exploration, mining and trading game, maybe something bigger for PC as well but that - meh, dreams XD
Sourcing / selling. That depends how this goes. If the script ends up really good I might consider just giving it free. Or through the Marketplace. Bit gotta speed things up and optimize it a lot.

5: If I’m able to do the basic math (vector grid generation) through C++ (which I can’t for now) then this might be something worthwhile.
It IS BP wise only. But uses a plugin made by DevDad, I have no idea how C++ conversion from BP to C++ with that toolset works.
Heaviest here is calculating Tangents and Normals for quads in the Generation pass…

Okay, how that works: First you gotta generate a planet - that is amount of quads and faces, set up everything in the noise, and such.
Then you checkbox SaveToFile box.
When you hit PlayInEditor the game generates quads. It’s about 3 seconds for a 128x128 polygon quad to 20 seconds for 256x256 quad. So, if you have 64 quads 256 size, it’s 21 minutes per planet’s side. And there are 6 planet sides. 2 hours straight for full res planet.
When the first generation pass is over it saves the result to a file. A simple SaveGame file. The load process is fast and easy, but the files are big. You can also load the planet in the editor through Construct Script.

Anyways, gonna check this Run Time Mesh Component, see how that goes. Thanks a bunch!

This looks promising, very cool.

Hey @Z-enzyme,

This may also be of interest to you - It was posted in the runtime mesh component thread. The Runtime Mesh Component is also free if I recall correctly.

That should help you out allot :slight_smile:

More Questions -

  1. Are there any Plans for a Solar System Generator with this included?
  2. Are you doing collisions at all with BP procedural planets?

Already downloaded the RMC, tried it, the mesh generation speed isn’t noticeably faster. Most time takes the calculation of tangents and normals (and that RMC will have in it’s next release) so I will wait patiently for that.

Also, tessellation? That should help a lot! Thanks @HeadClot.

As for questions:

1: Nope, the generation is way too slow, well, maybe, for not very detailed planets that can work. Actually, not a bad idea. Yea. I think that at some point I’ll try…

2: Yep. Each quad is separate procedural mesh with collision. No idea how that really works but never flew “inside” the planet. So, guess it works.

A little update.

Created a crater system, it’s slow but works, seed driven. Here’s a screenie of 2 planets with a single crater, but big.


Looks great! keep it up, I’m always interested seeing what people can do with procedural geometry.

Have you looked into quad trees? that could work pretty well for this.

I have a quad tree implementation in the works, meant for an infinite ocean plane but the same logic can be applied for dynamic terrain and pretty much everything of that nature, it’s pretty cool.

@TK-Master Wow, oh my. I’d totally would love to use that. Problem is I’m using procedural mesh component. I’m making my own grid of vectors, spherify them and offset them though simplex noise. No idea how to implement this kind of thing there. I’d have to take the high res grid I’ve got made with vectors and make lower res quads with that info to keep the noise persistent.

I’m doing everything in Blueprints so it’s kind’a slow.

It might not be that fast if implemented via blueprints but I can’t think of a reason why it would not be possible.

You can find multiple articles and guides about quadtrees in google if you want to research this further.

I would start by creating 6 quadtree grids, spherify them, offset them via noise etc. It’s the same thing as you are currently doing really, it’s just how you generate the initial grids that’s the tricky part.
The nice thing with quadtrees is that you can skip generating any grids outside the camera frustum and “subdivide” the grids based on pixel coverage so the vertex wastage is pretty much as little as possible, it’s very efficient.

A little update.
Got the proper atmosphere working! Material is pretty hard to set up right with different planet sizes but I guess it works. I need to do some testing.

Big demand for this…

Ok, that atmosphere material is really cool :slight_smile:

Heh, moment of transition from outer space into atmosphere is fantastic!

WTF??? … The talent level on the UE4 forums is mind blowing!

O ****! I totally forgot about it! I am a game designer already, quit teaching half a year ago :stuck_out_tongue:

You won’t believe but it’s a single lerp from distance to the planet that just changes power and multiply of the shader :stuck_out_tongue:

Well kudos, it looks great so far. Feel like saying any more?
Are you at a Triple-A studio or starting your own shop etc???

@Z-enzyme Awesome work! I love the crater system and atmosphere