Jump to content

  • Log In with Google      Sign In   
  • Create Account


What is the best method for planet generation in a playable game(if any)?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Veil   Members   -  Reputation: 143

Like
0Likes
Like

Posted 08 June 2012 - 06:17 PM

I'll be working on a game this summer and I need to be able to fly a spaceship into a huge planet and land on the surface.Now I got the ''fly space ship'' part,but I have no idea how to generate a planet.As far as I know procedural planets are way too heavy to be used in a game.For instance I get stable frame rates on the new Alien vs Predator game on highest setting,but every ''Procedural Planet Engine'' I've tried has FPS drops and yet the terrain just doesn't look all that good.Are there any other good methods on simulating a planet?Like maybe having different zones/levels for each height level from the atmosphere to the surface and while in space the planet being a premade 3d model?Or maybe I haven't stumbled on a good procedural planet example.I'm not really sure how to write one tho,so I can't judge.

Sponsor:

#2 larspensjo   Members   -  Reputation: 1526

Like
2Likes
Like

Posted 10 June 2012 - 03:06 PM

Should be possible, but not trivial.
  • Search for "terrain generator" to find ideas.
  • Look for using simplex noise or perlin noise (both 2D and 3D). This can be used to create mountain and valleys, and it can also be used to create probability of various vegetation.
  • Use fractals in combination with simplex/perlin noise.
  • Use incremental updates of detail.
  • Maybe using multi thread solution, with one thread to compute improved level of detail.
  • Algorithms that mimic terrain generation in the real world formation may be more difficult to use to get an incremental level of detail.

Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

#3 Explodinator   Members   -  Reputation: 119

Like
0Likes
Like

Posted 14 June 2012 - 01:44 PM

If you're looking for a relatively trivial solution, create a set of predefined objects, randomly scatter them around the planet. An object can be anything from a dungeon room to a mountain to a tree. This solution for procedural generation is useful for creating meaningful features. Oftentimes, procedural generation a-la-minecraft generates a plethora of meaningless features. It may be pretty and cool at first sight, but after a couple of hours it quickly becomes stale.

#4 bobbias   Members   -  Reputation: 120

Like
0Likes
Like

Posted 14 June 2012 - 05:08 PM

What are you doing that would cause the FPS to drop like that? The planet should be procedurally generated once, or once per increase in LOD, not every frame or anything crazy like that.

#5 jefferytitan   Members   -  Reputation: 1672

Like
0Likes
Like

Posted 14 June 2012 - 10:41 PM

Hmmm, it could be generation on-demand, it could be bad LOD code, or it could be no LOD (e.g. rendering a squillion polygon planet when you are in space).

#6 bobbias   Members   -  Reputation: 120

Like
0Likes
Like

Posted 15 June 2012 - 02:51 AM

Hmmm, it could be generation on-demand, it could be bad LOD code, or it could be no LOD (e.g. rendering a squillion polygon planet when you are in space).


Yeah, I was just trying to point out that if it's slowing down that badly, there's something wrong with what he's doing. I can understand something like a temporary slowdown for on-demand generation, but a permanent slowdown would suggest no LOD or bad LOD code, both of which are a bad idea and should be dealt with. I was trying to point out that there's no good reason for procedurally generated planets to permanently slow the game down like that.

#7 SnailCoder   Members   -  Reputation: 109

Like
0Likes
Like

Posted 16 June 2012 - 12:07 PM

If you want to start from scratch to create a workable planetary renderer, over summer, without knowing whether you're going to use OpenGL, DirectX, etc, etc, good luck, you'll need it. Just as a frame of reference, my current planetary renderer achieves around ~350fps in 'space' with the planet taking up most of the screen and maintains around 200fps at the surface. I still need to optimise my CPU throughput more than anything, though profiling has proved difficult with CodeAnalyst, so for now I'm focusing on expanding the project. I used six quadtree faces forming a cube, mapped to a sphere to form the planet in conjunction with GPU based heightmap, normalmap generation. If you need any help, ask, but I assure you this will be no small task. I'm sure you've seen it already, but if not check out the Infinity project for more ideas.
Currently trying to make a planet renderer. After many hours of work, somehow I know It'll never be complete.
Also, If I help you, please give me an ++




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS