• 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 t$$anonymous$$s 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 somet$$anonymous$$ng 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
avatar image AlucardJay · Aug 23, 2012 at 01:22 AM 0
Share

4 Replies

· Add your reply
  • Sort: 
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 t$$anonymous$$s 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
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. T$$anonymous$$s will give you a height. Unfortunately, the heightmap isn't going to be very smooth, so you should do some interpolation and smoot$$anonymous$$ng of the nearby values. T$$anonymous$$s 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
avatar image kag359six · Aug 21, 2012 at 11:54 PM 0
Share
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 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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

This script really makes my game lag! 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