Creating Planets - Where to Start?

I’ve searched and seen a couple posts on this, but nothing has really answered my question, and I wanted to be more specific in my own questions regardless.

Before I get further in I want to note:
I know this is difficult and will require (I’d imagine) engine edits and additions. I know I need gravity and I know there’s a thread that has that covered (for the most part). I’ve been coding mainly websites, off and on, for the last 17 years. I started programming in a lua style programming language on a 2D game that was already client/server connected about 13 years ago, and you could make your own server. I coded on there for several years with a client/server relationship and made full chat systems, battle systems, etc., so while I may not know all of UE4s API and works, I do understand daunting tasks (yes, this is more) and that it will take a lot of headaches and time. I’ve also worked in Unity, UE4, and a couple other random engines off and on for a while now with fairly simple things.

I’ve seen the Houdini planet creation example on the dudes student project example, and creating a planet like that is exactly what I’m trying to do. I don’t want to purchase Houdini, not only because I work in the oil field (scary) and have 3 children and not much to spare, but because I want the experience with UE4, and at the moment I don’t need all the other bells and whistles with it (I would love to later on when my project is a bit further along).

So what I’m trying to make, is a planet that can be seen from space and then land on it and walk around. Houdini uses 1/600 of earth size. If you don’t know, here: Procedural Planet Generator Tech-Demo, Houdini to Unity, Graduation project - YouTube

The problem is I have absolutely no idea where to start to make a detailed planet like that with UE4. Is it as simple as adding a sphere, working the LOD, and then whatever? To note as well, I am trying to make a rather large planet. I know there are restrictions. I’m not trying to make a real life scale of earth, and I know it’s not possible anyways.

So my questions are:

  • Where do I start?

  • Like mentioned above, is this a sphere in UE4? Is this a mesh that I can do in blender and import to UE4? Does it matter either way? And what is Houdini creating to do it?

  • How to I work topography on the sphere?

  • Is it applying noise? How do I do that (never had to before) to a UE4 object if that’s how it’s done? Is there a better way? Can I do it by hand in the best way (sphere, mesh)? If none, then how?

  • Is there a way to only load part of a mesh or object in UE4 so it works like level streaming (even if it requires engine modifications)?

  • If so, and if needed, where would I start?

I had the idea of editing the engine to use map IDs and wrap them, clustered by ID, to create planets, but it just seems like overkill to be honest with a lot of unneeded work.

It depends on what you’re talking about. If you want to visualize planets in space, then there’s options for that. If you want a spherical object you can walk on the surface then that’s a challenge but something that can be figured out. If you want a planet-scale map, even if it were a fraction of the size of the earth it would not really be an option. Things that have done planet scale stuff have that as their main feature which they spend a large amount of time to make, you have to sacrifice in other areas to make something like that and it’s not usually worth the trouble. It would be easier to make an engine from scratch for that purpose than to try to make an engine like UE4 be able to do that.

I’ve updated my OP.

Trying to make a planet that can be flown around and landed on. Like I’ve mentioned, I already know it’s difficult, I already know it will take some engine modification. I’ve already stated I’m not trying to make a full scale, or really even close scale of any real planet (open world RPG, scale isn’t near it. Most games even online take about an hour tops to walk across completely).

I’m not trying to be rude, but I’ve said all this upfront with issues and problems because I’m not up for hearing about how hard it will be or how near impossible it is. It is in fact possible, Houdini is doing it as a plugin + program for UE4 procedural, I want to do 1 by hand.

Again, don’t mean that rude, but that’s how a lot of the other threads I’ve seen go on this; a discussion on how difficult it is, not where you really start in any real detail and how to move forward. I’m just curious if anyone knows and can point me in the direction of where to start on the best way to do all the questions in my OP.

I’ve looked at that video here: - YouTube

That solution has so many downsides that can be an issue for what you want to accomplish, which you still haven’t made clear what your plan is

So to start–it has collision but doesn’t have spherical gravity, which is a problem in itself. Without a physics system designed for that then many gameplay features of UE4 won’t work, not just physics, but AI and even the basic way that things like Blueprints will use things.
It uses meshes, so it can’t take advantage of many of the features of the engine, like terrain. I’m not even sure level streaming will work properly with a sphere broken into pieces.
The landscape is low-detail without all that many props. To add more detail and props you then get the issue of disc space, even storing the position of objects can add up to a lot. It also doesn’t have much variety, which will add more to the complexity and the amount of work. Many other visual effects aren’t good, you could spend a lot of time trying to make a sky that looks good on a spherical map.

So to summarize, the visual quality is poor and the method means that you can’t do much gameplay. If your goal would have a higher quality level, and any more interaction than just flying around it then you’d have to pretty much tear apart the engine to make it work. That’s why people make their own engines to do this type of thing and then spend years working on them. Take for example No Man’s Sky, their solution is a custom engine and years of work, the graphics aren’t super complex which they avoid by having it heavily stylized.

My plan:

I don’t really know how else to put it. I mention I wanted to use the planet for an open world RPG as well.

pull: https://github.com/EpicGames/UnrealEngine/pull/1773
Would this kill physics for everything else? This is what I was planning on using (failed to mention that, sorry). It seems it edits the character component at low level, so I would have to do that to any other things on the planet as well, but that’s fine and doable, for the original version. Looks like the one to release in the engine isn’t official still? Either way, that solves all the physics problems, by editing only the gravity for the character component (and I imagine anything outside of that component that needs gravity), doesn’t it?

The only other thing I can see having to tear the engine apart on is how a specific object (tagged, id, name, whatever) is loaded and match it to LOD. That would solve issues with requiring low detail I believe, and everything surrounding that.

It looks like questions 1 & 2 are answered:

  1. Houdini uses a mesh.
  2. Topography would have to be done while obviously creating the mesh.
    Doesn’t that solve nearly every problem you were saving above? I’d much rather do the above in this post, rather than make my own engine from scratch lol.

If anyone has any advice on rendering specific objects partially, only when that part is in view, that’d be great.

If the above 1) and 2) are wrong, please if you don’t mind, correct me. Those are 2 of the 3 reasons I posted the OP.

That wouldn’t fix the issue of other things that use gravity, that’s essentially a single object solution, you could do that type of thing for each object type but would take as much work as making a system designed for it. Still wouldn’t fix things like AI.

As far as general complexity goes, take a look at the Open World (Kite Demo) example, that’s one area, with limited types of foliage, and doesn’t have the issue of having to make it a sphere.

That pull was engine wide gravity.

Wouldn’t that solve the entire physics issue you’ve been saying?

The open world kite demo uses much higher quality than what I’ll be using more than likely. Isn’t that the point of the open world kite demo, to show off UE4 at amazing features?

Like I said in an earlier post, I was really hoping to avoid the direction this is going kinda (like discussing the highest quality epic has put out as an example vs what I’m doing alone):

As I’ve been saying consistently, I appreciate the heads up on stuff… but again, if you read the pull, it’s engine wide, not just character wide, which should adjust gravity for the entire engine then yes? I didn’t open this thread to discuss high studio AAA quality graphics in a seamless open area (because that being the case like you said, I’d have issues regardless planet or plain old level streaming like they did with limited foliage).

I’m just wondering on the 3 questions in OP. This is why I don’t post questions and just truck through on my own usually, but I didn’t want to start so much work without have a tad of help for a push in the right direction on how. Too many times now I’ve seen for myself and others be told something isn’t going to work or is impossible then it gets pulled off with work. -_-

The open world example was more about the complexity than the graphics, it was very difficult for them to create something that manages all that much information and a large map.
UE4 has a quality control system so you can load multiple levels of detail for meshes or hide them if not visible, the issue is that when things get further away from the origin things go bad because the numbers get less precise, there’s a size limit UE4 to what you can fit, which is why there’s the World Composition tool to try and attach separate pieces and allow you to travel across them without actually having them next to each other. I don’t think that system will work with a planet type thing though.

I’m also making a video game, see its a big game but my game is different to this guy who wants to make a planet, what he wants to do is what was done in Rachet 'n’Clank on the mini planets, if you do this planet sphere gravity ,you will probably render the unreal assets invalid, they probably won’t work if the world physics are being all changed.

I already have done a outline of my game, so now I’m hopped into the Unreal engine to start building the 3d
worlds. I’m very new to Unreal Engine…

I want to know how you hollow your solid things out with this engine, and creating water.seas. ect.

… a piece of…
don’t do this. i mean don’t look at other solutions or other examples. most of them is not what they are in fact. all of “space” games with their “real-scale” planets and with “real physics” and bla bla bla - in fact is poor fake and pretentious.
i’m working on my own project in free time. look at some weird (quickly-made from tests) screenshots:

scaled heights:

another planet:

i have a prototype where you have a system with 2000 stars which is with procedural generated planet systems and all of that with seamless travel from one planet to another, from one star to another.
all work which i’ve done can be finished not more than one week. yep. there is far far away from something good, but there are working big-sized planets even with foliage and some kind of water.

all your main problems will be:

  • optimizations for “60 fps” and good view
  • collision generation at runtime
  • precision problem for big planets and big world

generation of “planet” mesh is not a problem. best choise is cube mapped to sphere. okay, i know that there is an icosahedron-solution (or hexahedron… nvm) with good results. but how you will optimize them and texturing? there is not simple for icosahedron, but very simple for cubes. one more problem of icosahedron is “more calculations” and it is not obvious. cubes can be done after you take a look at them - very obvious and simple, easy in calculations.

are you need to landing? okay, are you need to walk at the planet surface? implement runtime collision generation. if your planets will be procedural that you will be use any kind of optimizations. you could not store full-precision planet on your RAM or HDD. that means you will be generate it runtime and regenerate/generate collision for it. in-engine runtime collision generation works too (too too too too too tooooooooo) slowly. just believe me, i’m using it. you can try do it with threads. okay, don’t use in-engine implementation of threads with collision generation. it is not working in package builds.

precision problem. if you are using float (you using it, look at actor location, for example) you have just 6 decimal digits, not more. that means if you will be use big planet radius and planet center will be at 1000000 (1M) coords - your planet will be shaking and moving (and spin around) with steps. it looks weird and you could not play on the planet surface with that.
so you have to do some “scale” changes for all objects: planets, stars, buildings on planet surface, foliage, space ships etc. you have to implement your own “scale-based” physics and movement. you will see problem with movement while you will change your scales.

do it alone is bad idea cause there are lot of problems with engine, with math calculations, with graphics, with gameplay etc.

spherical gravity is easy to implement. look at gravity vector implementation or just look at vector math. it is a basic math.

“real-planet like view” can be done with coherent noise or with algorithms like diamond-square.
but without good texturing planets looks like… you can see my screenshots, i’m working on it. now i have bad texturing.

more screenshots:

as you can see sometimes it looks good, but mostly weird. need more complex textures and more fine landscape setup.

start to learn how to do good textures procedurally (or manually if you want).

// –
sorry for my english. enjoy

3 Likes

Good post R4ndom3r, saved me a lot of typing :wink:

Thank you R4ndom3r, and ioFlow I’ve been following your stuff as well so thank you for the contributions in your other posts.

I’m still a bit off from fully starting this out, but wanted to get the idea established on how and where to go with it.

Well I had a similar idea but the Ureal Engine can’t handle digesting whole planets. So the best thing I think is to break up your universe up into modules. or
systems, and use a jumpgate or transport system to get to the planets. You can have your planets, but not to the detail you are wanting it. But you can
make the ground worlds for the planets. and use a wait screen then when the level is loaded, up pops your ground simulator with your planet, but even
your ground simulator can’t be too big or too detailed or it will as these guys are saying will cause engine performance to suffer especially if you
gonna use lighting.

It is good if we knew Unreal engine’s limits so we don’t break the engine.

How is doing that ??? That full “Real” planet in UE4:

It’s not even close to full-scale

Why ?? Its complete model planet: which can fly around, which can be land, walk and fly. is not it so ?

It’s not to human scale.

If you wanted to do that, you’d need some serious custom heavy lifting under the hood. A common approach is to always have your camera and character at 0,0,0 in world space, and move everything else instead of the character. This get’s around a lot of precision errors - but is also a pain in the **** to manage.

Also, to store that much data - you usually have to use procedural generation. Smooth Voxel methods are pretty common.

Is it possible to combine in UE4 shooter, rts and flights in one game ?

It’s definitely possible, Savage Resurrection is a UE4 game with RTS, FPS, 3rd person combat for example.

There’s far too many issues to try to make whole planets with it to scale. Lack of Disk Space, Resource issues, Unless Epic add in a special spherical gravity planet blueprint to the engine to allow mini planets to be made to walk around on.