Sign in to follow this  
??????? ?????

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

Recommended Posts

??????? ?????    143
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.

Share this post


Link to post
Share on other sites
larspensjo    1561
Should be possible, but not trivial.[list]
[*]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.
[/list]

Share this post


Link to post
Share on other sites
PhilLiu    119
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.

Share this post


Link to post
Share on other sites
bobbias    120
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.

Share this post


Link to post
Share on other sites
jefferytitan    2523
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).

Share this post


Link to post
Share on other sites
bobbias    120
[quote name='jefferytitan' timestamp='1339735309' post='4949430']
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).
[/quote]

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.

Share this post


Link to post
Share on other sites
Magmatwister    109
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.

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

Sign in to follow this