Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 PlayCreatively · Dec 11, 2019 at 05:17 PM · tilemapmapgenerationperlin noise

How would I generate a forest using perlin noise?

I always thought spawning objects using perlin would be an easy answer but now I'm realizing a huge problem! I'm not using a tile system, so the resolution (space between items) becomes a problem and I will also be generating objects in-game so I need to be able to rescan spaces I haven't seen yet when running through the map. So my stupid solution was to check every 0.1f unit using perlin noise but that doesn't seem to be enough resolution for the perlin function to give me actual noise. There's a lot of variables here that can change the outcome so I'll simply ask, what do you do to randomly generate objects in a game that's not using a tile system?

Comment
Add comment · Show 3
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 RadonRaph · Dec 11, 2019 at 05:38 PM 0
Share

Hello, can you give more information about how you want you forest ? There is many ways of using perlin noise i'm a little bit confused.

avatar image PlayCreatively RadonRaph · Dec 11, 2019 at 05:45 PM 0
Share

Dunno how else you'd do it but create a tree on the spot where perlin (e.g) returns a number below .1f

avatar image RadonRaph PlayCreatively · Dec 12, 2019 at 12:01 AM 0
Share

What i will do its generate a tree base of a chance of the perlin. I explain: you compute the perlin noise depending of the position. Then you take a random value and if its < of the perlin you place a tree however nothing. Do this every x meter and you will have differents density of tree. You could also scale distance between trees with perlin noise (perlin*maxDistance).

1 Reply

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

Answer by PlayCreatively · Dec 14, 2019 at 02:24 PM

I've figured the problem. If you're going to use perlin noise, make sure your input is a few decimal points, otherwise you'll get no noise. Only thing you have to do is add an offset to your values, or you can call it the seed: float offset = 3.452f Mathf.PerlinNoise(X + offset, Z + offset);

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

122 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 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 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 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 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 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 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 avatar image avatar image avatar image

Related Questions

Block based map generator 5 Answers

Where to start in galaxy map generation for a 4x game? 1 Answer

Is it possible to round a perlin noise value to 1 or 0? 1 Answer

How to spawn a random hexagon pattern? 0 Answers

Terrain help 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