Jump to content
  • Advertisement
MiniDarkOF

C# Simulate The "No Man's Sky Effect"

Recommended Posts

Watching that video, I stand by my earlier suggestion: I believe that's an LOD system procedurally loading additional details on to the surface as the player approaches the planet. The effect of being on a flat plane is a simple result of proximity to the surface, in much the same way that the Earth seems flat in your immediate proximity.

I'll see if I can dig up some reference material when I have time, but no promises I'll be able to get to that quickly. :)

Share this post


Link to post
Share on other sites
Advertisement
11 minutes ago, jbadams said:

I'll see if I can dig up some reference material when I have time, but no promises I'll be able to get to that quickly. :)

oh thanks!
 

11 minutes ago, jbadams said:

Watching that video, I stand by my earlier suggestion: I believe that's an LOD system procedurally loading additional details on to the surface as the player approaches the planet. The effect of being on a flat plane is a simple result of proximity to the surface, in much the same way that the Earth seems flat in your immediate proximity.

this theory was added to my solution list
now i just need to think a way to apply the "camera theory" and the "lod theory" in multiplayer
the "lod theory" is brilliant, but the "camera theory" is more simple and easy to implement in multiplayer

but i'll be happy if you find some reference material

Share this post


Link to post
Share on other sites

Yup, LOD system..  Notice how the spires start to appear around second 42-43 of that video. ;)

nomanskylod.thumb.png.7dab3bc8c2695d7061b13348ffc1c159.png

You'll likely want to use both creative camera work and LOD, as they aren't really mutually exclusive.  ;)

 

Share this post


Link to post
Share on other sites

Yeah I think this is just that, when close to a large sphere, it looks flat (like how some people think the earth is flat :D ).

If you really did want to "unrwap" / "warp" the sphere into a flat surface though (e.g. maybe your planets are exceptionally small and will look too curved even when up close), you can just take the heightmap data that you're using on your sphere and use it on a flat surface instead. Then you just need a way to smoothly / slowly morph between your flat mesh and your sphere mesh.

In my experience, most planet renderers will use a fairly simple base shape for the planet, such as a cube or an octahedron:

280px-Hexahedron.jpg280px-Octahedron.jpg

And then they'll map a heightmap onto each face, and tessellate + smooth the faces until it forms a sphere. Starting from these basic shapes, it's pretty easy to unwrap them into a 2D "net" and then warp them slightly so that nearby edges are still connected.

e.g. For a cube you might unwrap and warp the cube-sphere into a flat version like:

cu4ylw7.png pW50z2D.png

 

From what I've seen Starlink might actually be doing something like this to hide how small their planets are. You can see that their LOD transition from sphere to flat surface is actually quite abrupt though and hidden with some kind of dithered blend:

Also, if anyone remembers Tetrisphere, it looks like you're playing tetris on the surface of a sphere:

But actually it's just a regular 2D grid in the shape of a square, warped to appear like a sphere on screen. Because it's a regular grid, you can go out the left side and come in the right side (like going around the world on a sphere)... but, you can also go out the top and come in the bottom (which would be like going over the north pole and appearing at the south pole)! This means that while it looks like you're playing on a sphere, the actual 3D topology of the playing area is a torus/doughnut :D I guarantee most people never realized that the world was a doughnut and were happy enough thinking that they were playing on a sphere.

Share this post


Link to post
Share on other sites
5 hours ago, MiniDarkOF said:

Hey Developers!
If you already played No Man's Sky, you probally visited another planet,

but the planets are a sphere (obviously duh) but when you are entering the atmosphere of the planet, the "curved terrain" turns into a flat terrain with moutains, etc...

I'm creating a space travel system, and i want to simulate this "effect" but i don't have any idea how to do that

idk if is a camera trick, a illusion etc...

Help Me guys!

I do this in my code but of course it's in it's early stages compared to NMsS. I don't think it's a "trick". It's s just a good LOD system. I've done this twice (for height map & voxel terrain). Speaking about terrain only, you either have to generate it from procedures as you go along (this is what I do) or pre-generate your data and load it in as needed from disk.

For voxels it can be tricky. I don't zoom in yet (will be in my next entry after l take care of a few things), but check out my blog to see the LOD in action.

Share this post


Link to post
Share on other sites
10 hours ago, MiniDarkOF said:

Hey Developers!
If you already played No Man's Sky, you probally visited another planet,

but the planets are a sphere (obviously duh) but when you are entering the atmosphere of the planet, the "curved terrain" turns into a flat terrain with moutains, etc...

I'm creating a space travel system, and i want to simulate this "effect" but i don't have any idea how to do that

idk if is a camera trick, a illusion etc...

Help Me guys!

Have you played Kerbal Space Program? The planets are huge and are essentially spheres. When you are on the surface, it just looks relatively flat because the sphere you are on is too big. I am pretty sure that you can achieve it with LODs and selective rendering. 

It also depends on how deep you want to go with N-body physics implementation or even general relativity - this can be a real trick 😧 

Share this post


Link to post
Share on other sites

There is some info about how Kerbal Space Program (KSP) does it in this talk:

 

Keep in mind that in KSP you can land on any spot of any planet. I think in No Man's Sky (NMS) landing is automated, so the game can guide you to a specific location/map. I wouldn't be surprised if NMS only had a small map area for each planet and that anyone who lands ends up at the same place.

Share this post


Link to post
Share on other sites
1 hour ago, 1024 said:

Keep in mind that in KSP you can land on any spot of any planet. I think in No Man's Sky (NMS) landing is automated, so the game can guide you to a specific location/map. I wouldn't be surprised if NMS only had a small map area for each planet and that anyone who lands ends up at the same place.

Wow. No Man's Sky sounds worse and worse... 

Share this post


Link to post
Share on other sites

Eh, not really. If you generally only land on a planet once, and only do a walking distance trip when you land, there is no point in mapping the rest of the planet. After all, the object of the game is visiting different planets, not staying on one of them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!