Download

Procedural Planet Generation

Hi all, I just wanted to share what I’m working on. It’s a procedural planet mesh which subdivides/simplifies at run-time giving a good amount of geometry around the player. It’s a work in progress so nothing is final. The atmosphere was the one done by Robert Khalikov you can check it out here: Realistic Atmosphere in Visual Effects - UE Marketplace

The planet geometry was made using the procedural mesh component; I set up the coordinates for a cube then mapped it to a sphere. The texture is a world aligned test material with tessellation.

I used C++ for the foundation of the mesh then I extended it to blueprint for the node tile actor classes. There are noticeable cracks where certain tiles don’t meet up, I plan to reduce that in future.

I also have a video which is quite old. The pictures are also old but hey we gotta start somewhere right? I plan to post an update soon!

Video link: Desktop 2018.11.18 - 23.21.39.01.mp4 - Google Drive

2 Likes

Here’s an update; I was seeing how much I could push it and still get a playable fps!

Playing around with node count and subdivisions:

Wow! This looks great! Is this for a game?

Thanks. It’s more for my own educational exploration. I learned a lot working with the procedural mesh component. With many improvements, I hope to release it to the community to see what unreal devs can extract from it or do with it. If it’s really good, I would like to put it on the marketplace. :smiley:

I’m working on my own game though. It uses python as the programing language. I can provide a link to that if interested but this post is about Unreal stuffs! :rolleyes:

A little note about the planets that I forgot: The size of the planet in the post is around 800,000 - 900,000 unreal units so it’s fairly big. I want to go bigger! :smiley:

Got a major update for my planet system! I’ve greatly improved node/tile subdivision efficiency ! Rather than generate like 32/128 nodes at once, which I have been doing :confused: and is very CPU intensive, I instead generate 4 to 8 nodes per node that the player interacts with. This allows for pinpoint accuracy for subdivisions on the planet region. It also makes getting detail on a insanely large mesh a walk in the park!.. with this new pipeline it doesn’t matter how big the planet is… I can have one up to a size of +40km in diameter! :D. okay I might be over exaggerating a bit. :rolleyes:

Onward and upward!

Been at it again… made some more optimizations like removing old geometry etc. Here’s a link to a demo: ProceduralPlanetDemo.zip - Google Drive

I’m going to keep at it and see where it goes.

This is looking very promising :). Can you recommend any resources to learn about PMC? For some reason I haven’t been able to find good learning materials for it

Hi CoquiGames,

I have to admit myself that the documentation for the procedural mesh component is sparse. I have listed a few resources below. My advice would be to render your first triangle in blueprint then give it a go in C++. Experiment with vertex location, rotation, scale, materials etc.

All the best.

Text based: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

Text based: Jan Wlosok | Procedural Mesh in UE4 #1 – Triangle

Text based: http://orfeasel.com/creating-procedural-meshes/

Video: https://www.youtube.com/watch?v=dKlMEmVgbvg

Video: https://www.youtube.com/watch?v=KdhzYJ7wdq8

GitHub file: GitHub - SiggiG/ProceduralMeshes: Plugin with example procedural mesh actors and components

Thank you for pointing me in the right direction :slight_smile: I’ll have to use PMC for my next project so I’ll have no choice but to dive deep until I figure it out.

No problem. Just out of curiosity, what you making? :smiley:

A Procedural City Generator. Right now I’m using splines to generate the roads, but I’m thinking of using PMC to create the intersections since the roads can meet at almost any angle and I cant have a premade set of connectors :frowning:

Here’s a video showing what I have so far:

Oh wow nice! yeah, I see what you mean about the intersections. Making the road mesh will be easy but the intersections might be a pickle. Trial and error I’d say. :wink:

Interesting!! Have you seen or are you following any similar threads this this or this??? It often feels like…
Procedural Planets projects are ‘sort-of’ cursed like certain films, doomed to never get made / finished… :stuck_out_tongue:

Yeah, they do have a bit of a gloomy atmosphere hehehe. I’m going to go as far as possible. It’s one of my dreams to have large planets in unreal. I’m going to be working on it for a while and though it may not get finished or be considered finished, I will aim to get it as game-ready as possible! :smiley:

yeah my planet system isn’t a polished as the ones in those threads. I’ve read through those threads briefly but here’s the thing. Have those projects ever been released either as a playable demo, project file or on the marketplace? heheh I’ve already shared my first demo file and can’t wait to get the next one rolling :): ProceduralPlanetDemo.zip - Google Drive

I’ve made a tiny bit more progress since last time. I’ve found a cool way to perform noise offsets for the vertices in octaves. It’s pretty fun to play with various values and see what results occur! :smiley:

Added vertex colors! My intent is to use them to determine what kind of texture goes where. :smiley: