Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Complex77 · May 07 at 03:01 PM · procedural meshprocedural generationmap-generationcircles

Proceduraly generated concentric circle sectors

Hi all! Im trying to create a procedurally generated galaxy and subdivide the area in concentric sectors generated the following way:

alt text

Id like this to be dynamically and randomly generated.

Bonus points: Sectors should grow in a spiral-like way

Whats a good formula to achieve this? i tried using a pair coordinate system but it fails the further away from the center i am, since the further i am from the center, the bigger each tile is.

Thanks!

ask.png (99.4 kB)
Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · May 07 at 04:23 PM

a spiral-like way

Well that's a quite vague definition. Though given your example image we could imagine what you had in mind.


Also you need to think of some kind of limiting factors. To how many rings a sector could reach out? How many actual sectors (of the 24 sectors) should one region spread at max / min? Should the limit be per ring or for the region as a whole?. Should there be an area limit per region? Since the sectors grow the further out you go, does that matter regarding the area?


Anyways, what concrete issues do you have implementing your algorithm? You would just start at any cell in the inner ring and follow the above mentioned rules. Roll some random numbers to define how many cells on the first ring you may occupy. Roll another random number to decide how many rings to go out. For each ring, roll another random number to decide how many cells it should be offset compared to the first Once one region is finished, just start again at the first ring at the end of the last one. Since you probably don't want any gaps, each ring would simply start at the end of the previous ring. The outer rings should always have at least as many cells as the next inner ring. This ensures that you don't move backwards like you did in the yellow region, second ring.


Since you have a fix sector count, the whole thing can be stored in a single flattened array where 24 elements represent one ring and the next 24 elements the second ring and so on.

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 Complex77 · May 07 at 04:48 PM 0
Share

Hi, thanks for your reply. I working on the algorithm and the limiting factors are variables I'm playing with.

The I have two current issues: I currently have 24 elements per ring, but this has the mentioned issue that as the ring number increases, so does the size of each element. I'm thinking that maybe I could have 48 elements after the 5th ring, 96 after the 10nth, etc. So the first issue is: I don't know if this is a good idea and if it scales well.

The second issue I have is that I don't know how I can create a mesh representing each sector.

Thanks again!

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

139 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 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

how to add windows and door in procedural cube? 1 Answer

For loop not starting from zero 0 Answers

How can I generate procedural 3D geometry faster? 2 Answers

How do I optimize loads of quads generated as a Tile map for my procedurally generated tileSet? 1 Answer

What are some good marching cube resources? 2 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