I've been working on a simple planet generator. I currently create a spherical mesh using a random radius for each vertex. This creates a very patchy looking planet as follows:
I'm looking for a better algorithm of randomness. So I can have more 'planet' looking planets, or at least the option. I need bigger oceans, larger continents, basically just less patchy.
Anyone have any suggestions?
I don't have a definitive answer but here's what I can add: If you're using Perlin Noise, try doing multiple passes. After the first one, just randomize again, but on a smaller scale, just like Fractals, where it's recursive and repeats itself, while gradually becoming smaller and smaller. This will give a more definitive and less gloomy look, like real terrain.
Also if you want continents and oceans you're gonna need to define areas where the vertices' radius from the center is less random and more offset than others, either towards the center (ocean) or away from it (terrain).
In the end it all comes down to how random you want it to be, and how realistic, because creating an algorithm that could create earth-like planets that are completely random each time, would be very difficult.
Yeah, I pretty much need less random areas, and then strict borders between them. That's what I'm looking for.
Take a slower walk through the perlin noise to reduce the resolution of the bumps. You could also use a grayscale bitmap instead of/in addition to the perlin noise. That way you could 'paint in' in the large continents.
But I would still like a procedural planet, what do you mean slower walk?
If you take a look at the example script for PerlinNoise() you will see:
var xCoord = xOrg + x / noiseTex.width * scale;
var yCoord = yOrg + y / noiseTex.height * scale;
The 'scale' changes how far to move for the next sample. If you move a smaller amount, you will move less on the 2D plane. It's like zooming in on a part of the plane so you 'see' less bumps.
Answer by Kibsgaard
May 14, 2013 at 05:57 PM
Try having a look at this white paper:
Generating Complex Procedural Terrains Using the GPU
Especially chapter 1.3.3 "Making an Interesting Density Function" and onward, where the Density Function is what you want to use as your "random depth" on your vertices. They explain everything very well and it should be no problem to use it just on the CPU.
Wow thanks, at a glance that seems very useful. I think that will probably suit me best for now. : )
Answer by rdavid269
Feb 12, 2015 at 03:52 PM
try the module: massive with a seed: 131.5054 and check how it will look
What is that? Do you have a link?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
16 People are following this question.
Is it possible to generate a high-poly spherical model from a mercator-projection heightmap?
'Planet' height based, Texture2D setPixel performance queries.
3D Perlin Noise mesh even in all axes
What is the best method to create a planet in Unity?
Perlin Noise Spherical Terrain