Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Atrus_Madhatter · Dec 02, 2012 at 12:13 PM · c#noiseperlin

[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?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image joellang · Apr 21, 2016 at 10:40 AM 0
Share

Here another downloadlink to the same library: https://www.assembla.com/spaces/coherentnoise/ans8N-3Gar4jxyeJe4gwI3/source/HEAD

4 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by $$anonymous$$ · Dec 02, 2012 at 05:33 PM

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 :)

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Saitodepaula · Dec 07, 2012 at 06:56 PM 0
Share

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

avatar image Simon-O · Dec 20, 2014 at 08:42 PM 0
Share

The library you linked is no longer available. Any suggested alternatives?

avatar image 321Alex Simon-O · Oct 28, 2015 at 03:16 PM 0
Share

Yess are there any known alternatives? I don't think so

avatar image joellang · Apr 21, 2016 at 09:28 AM 0
Share

Here another Link to the library that works: https://www.assembla.com/spaces/coherentnoise/ans8N-3Gar4jxyeJe4gwI3/source/HEAD

avatar image danrayson · Sep 27, 2019 at 08:16 PM 0
Share

CoherentNoise is no longer available.

avatar image
3

Answer by Winterblood · Dec 21, 2014 at 10:33 PM

Sounds like you're trying to figure out how to get from random noise to a Minecraft-like world. The trick is to layer up multiple noise patterns at different sizes, along with rules that guide the randomness towards the ballpark result you're after.

For example...(I'll use a 2D heightmap rather than 3D voxels, because it's easier to describe)

If you're using a single noise pass to set cell heights, you'll get random spikes. If you shrink the noise lookup dimensions then you should get rolling hills instead, as the heightmap picks up the interpolation between the noise values. That will give you very curvy fake-looking mountains and valleys.

So you also do a second noise lookup at a smaller scale (ie. a scale that gives you smaller landscape features), and add it to the first. This will add small hillocks onto your mountains and valleys.

Then you do another lookup at an even smaller scale and add a layer of small bumps and divots. Three passes is about the minimum to get a reasonably natural-looking terrain. These different-scaled noise lookups are called "octaves" after music.

Then you can also apply custom rules, such as "scale height down with distance from origin" which will give you an island centered on the origin. Make sense?

Minecraft does a ton of clever stuff to create it's world, including erosion passes on the generated data. What you'll want to do depends on what you're trying to create.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by cofcof · Jul 09, 2014 at 01:54 PM

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.

http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Saitodepaula · Dec 07, 2012 at 06:52 PM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Smoothing random noises with different amplitudes 0 Answers

Using noise as texture 2 Answers

Applying noise to a texture 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges