[C#] Implementing 3DPerlin/Simplex Noise

Ok. I have some idea of how Perlin noise works and how Simplex noise is faster. I also get how you implement 2D noise. (You give x,y coords and receive float between -1.0 and 1.0 which you can use for z coords) But I can't grasp the idea of implementing 3D Noise algorithm. I tried:

 if(SimplexNoise.Generate(xWorldp, yWorldp, zWorldp)>0){
      ChunkHolder = 1; // Then i have another code that converts this into blocks.
      ChunkHolder = 0;

But it works just like normal Random generator. Help?

more ▼

asked Dec 02, 2012 at 12:13 PM

Atrus_Madhatter gravatar image

5 4 5 6

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

A while ago I started on a Minecraft-clone project in my sparetime just for the interest in doing so, so I've worked a lot with procedural generation of terrain (which now works really great!), and while I'm still new to the area, hopefully I can help out a bit here :)

First of all, I also started out trying to implement my own Perlin Noise methods, but in the end I actually ended up going with quite an awesome free Unity library which does an awesome job of offering a whole host of different noise functions. You can find it on the asset store here: CoherentNoise for Unity3D

The library uses 3D perlin noise but can be used for 1D and 2D as well.

And in any case you should really refer to it's manual for pure learning purposes, it has some great clear and basic explanations of the theory behind it all: CoherentNoise manual

Now I don't know if you are interested in implementing the perlin noise function purely for learning reasons. If you simply need to use the functionality but are not interested in how it is calculated please use the above library, no reason to do anything else :)

Now if you want to implement it to learn how it's actually done, there's a few great articles that shows the actual implementation. The first one is: Perlin Noise Article

The other one that I've found great is the documentation for the C++ perlin noise library LibNoise: LibNoise documentation

Is this what you are asking from your question? Or are you more concerned about how to actually use perlin noise in your application? In that case you would have to give me more specific examples of what you are trying to achieve :)

more ▼

answered Dec 02, 2012 at 05:33 PM

PastryGood gravatar image

846 36 31 38

If only I knew of your package sometime ago... Thanks for sharing.

Dec 07, 2012 at 06:56 PM Saitodepaula
(comments are locked)
10|3000 characters needed characters left

@PastryGood covered almost everything I think, but if you want more examples, take a look here.

more ▼

answered Dec 07, 2012 at 06:52 PM

Saitodepaula gravatar image

148 19 17 18

(comments are locked)
10|3000 characters needed characters left

why is that nobody ever really gives you a solution to a problem the just bog down your code with third party's, general approach plugins take the time to learn it i will give you a link to the perlin noise creators newest pseudo noise algorythm. maybe youj can figure it out.


more ▼

answered Jul 09 at 01:54 PM

cofcof gravatar image

3 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Dec 02, 2012 at 12:13 PM

Seen: 4947 times

Last Updated: Jul 09 at 01:54 PM