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 kag359six · Aug 21, 2012 at 10:07 PM · terrainminecraftperlin noise

How exactly is Perlin Noise implemented?

I'm just starting to get my head around Perlin Noise and how it works. Now that I have created the function, how could i use that to create a height map? And even if i figure that out, how does one make the blocks in positions according to that height map?

Or am I completely seeing this wrong? Is perlin noise used to generate the height map, and then the height map is used to generate the terrain, or is the terrain generated straight from the values given my the perlin noise function?

(Yes I want something Minecraft related, I know people have asked before but I haven't found an answer to these specific questions. Any help would be greatly appreciated! )

Comment
Add comment · Show 2
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 kag359six · Aug 22, 2012 at 11:21 PM 0
Share

so i can have a pseudo random number generator for terrain, textures, etc. The issue is (besides the fact that my current perlin noise function isnt working) that i dont know how to implement it when creating procedural terrain.

avatar image AlucardJay · Aug 23, 2012 at 01:22 AM 0
Share

I think you are looking for something like this : http://answers.unity3d.com/questions/133941/Creating-Cubes-with-Jagged-Edges.html

or here : http://answers.unity3d.com/questions/298703/perlin-noise-continuous-through-different-objects.html

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Aug 22, 2012 at 12:19 AM

You want an example for a Minecraft like terrain generator? Just take a look at the Minecraft starter package for Unity. It contains all you need.

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 ScroodgeM · Aug 21, 2012 at 10:10 PM

main way perlin noise implemented is to generate SAME noises on different targets. for example, to cover some surface without using a texture and be sure that this surface will look same on every generating and on every client it generates.

so in your case you can use simple UnityEngine.Random to got all randomization you need. heightmap, box placing, painting etc - just write algorithms to apply random to your world

Comment
Add comment · Show 1 · 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 kag359six · Aug 21, 2012 at 11:50 PM 0
Share

So how would one generate block terrain with for a given PerlinNoise function? Or a heightmap?

avatar image
0

Answer by BeShifty · Aug 21, 2012 at 10:46 PM

Your boxes will have x and y coordinates. Since most perlin noise functions take 1 parameter, use some hash function that takes your x and y values and then pass the hash to the perlin noise function. This will give you a height. Unfortunately, the heightmap isn't going to be very smooth, so you should do some interpolation and smoothing of the nearby values. This article explains that process fairly well (see the paragraph "2-dimensional Smooth Noise").

Comment
Add comment · Show 2 · 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 kag359six · Aug 21, 2012 at 11:52 PM 0
Share

That's the article I use for my perlin noise functions. I have two PerlinNoise functions, one for 1D, and one for 2D. (as in the article) What I don't understand is how to implement it to create a heighmap or $$anonymous$$ecraft-like terrain.

avatar image kag359six · Aug 21, 2012 at 11:54 PM 0
Share

I may be being unclear, so let me re-phrase my question. Can I have a code example or explanation of how to create $$anonymous$$inecraft-like terrain using a perlin noise function (2D noise function).

avatar image
0

Answer by MountDoomTeam · Jan 19, 2013 at 10:48 AM

http://answers.unity3d.com/questions/188721/creating-perlin-noise.html#answer-383517 ^^ those are tests i just did on the unity perlin function. image and distribution data. see end of thread.

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

12 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

Related Questions

Perlin noise for (sort of Minecraft) terrain generator 2 Answers

Minecraft-like ore generation 1 Answer

Add perlin noise to blocky terrain 0 Answers

Random Terrain Generation (Trees, Details, Textures) by passing a Seed? 0 Answers

How would one approach tile-by-tile terrain generation with Perlin Noise? 0 Answers


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