# Perlin Noise on 2d curved surface

This topic is 4109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello I am trying to make a planetoid using Perlin noie.I have used 2d perlin noise to create flat lands(with nountains). My perlin noise gen. consists of the following steps: 1:Set Noise R^2 -> R on a 2d array 2:Smooth Noise 3:Interpolete 4:OverLap Octanes 5:Exponential Function Now I would like to use my 2d perlin noise code(or I should use 3d perlin noise?) to create perlin noise on a curved surface like a sphere generated from a recursively subdivided Icosahedron? How do I implement this? Any ideas? Thanks

##### Share on other sites
Yes, you should use 3D noise, and put the 3D coordinates of the points on the sphere as parameters. This will give a nice result without seams.

##### Share on other sites
Can you be a little more specific?
Which parameteres?
How will I do the mapping?

##### Share on other sites
Think of 3D Perlin noise as a volumetric cube. So instead of generating noise as a 2D texture, this time you have the 3rd dimension forming a solid cube, filled with noise inside. This is like a basic "hyper texture" to some extent.

Now imagine you have the sphere completely inside that volume. Instead of rendering the entire noise volume, we're only interested in noise values where the sphere's surface intersects, or more precisely occupies the solid.

You can do that by obtaining any 3D point on the sphere's surface and plugging that [x, y, z] coordinate into the 3D Perlin noise function. You can save the returned noise value into a 2D texture wrapped around the sphere.

##### Share on other sites
Thanks.

I suppose that I could use the same method to create some geometry on the sphere right?

##### Share on other sites
You mean a mountain-like elevation on a planet? Yeah, I suppose you could. Use the noise value to shift the 3D surface point closer or further from the sphere's centre. You would need a really fine mesh to represent mountains with adequate detail. For that, you'd probably better off using a texture with a bump map - but that depends on what you're aiming for, of course.

If you go with the texture option, here's some sphere mapping math that could be useful. The reverse mapping equation (near the bottom of the page) might interest you - it allows you to calculate the 3D sphere coordinate [Rx, Ry, Rz] for any given texture coordinate [s, t].

##### Share on other sites
Is there any good tutorial on perlin noise?

I have found some odd pascal perlin noise samples with mubers like 1.2392392e1 - why not use hex declaration instead? Are there differences for perlin noise in 1D, 2D and 3D? If someone has a good link to a perlin noise imlementation please stick it.

##### Share on other sites
Thanks again

Quote:
 Samurai Jack Is there any good tutorial on perlin noise?

Here is a good one

http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

This is from Perlin himself

If you search gamedev articles there is one tutorial with code but I dont remember the link.

##### Share on other sites
The Perlin noise math FAQ

Very good page if you have problem understanding Perlin's own explanation (which is rather mathematical, tbh). I based my own Perlin implementation on this, and get pretty decent results. The FAQ only covers 2D noise though, but the step to 3D noise isn't very complicated.

##### Share on other sites
I am so excited from my first 3d Perlin noise creation that I couldn't do anything but post it :)

• 18
• 11
• 16
• 9
• 50
• ### Forum Statistics

• Total Topics
631396
• Total Posts
2999783
×