Jump to content
  • Advertisement
Sign in to follow this  
Lord_Vader

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

Thank you in advance!

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!