x


[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.
}else{
     ChunkHolder = 0;
}

But it works just like normal Random generator. Help?

more ▼

asked Dec 02 '12 at 12:13 PM

Atrus_Madhatter gravatar image

Atrus_Madhatter
5 2 2 3

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

2 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 '12 at 05:33 PM

PastryGood gravatar image

PastryGood
711 12 15 18

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

Dec 07 '12 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 '12 at 06:52 PM

Saitodepaula gravatar image

Saitodepaula
103 5 8 8

(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

By RSS:

Answers

Answers and Comments

Topics:

x7635
x51
x49

asked: Dec 02 '12 at 12:13 PM

Seen: 3055 times

Last Updated: Dec 07 '12 at 06:56 PM