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 kkxzd · Mar 06, 2015 at 06:49 AM · meshprocedural meshalgorithmmeshfilter

What's the right way of generating a procedural mesh from an known outline?

I want to generate a procedural terrain in a 2D game, and I'm thinking that this can be achieved with a meshFilter component. Think worms, scorched earth, desert golfing, etc.

I'm not interested in generating the shape of the level in itself, but generating the mesh (vertices and triangles) from an already existing and known outline for the terrain, as a set of coordinates. Either if there is a builtin way of doing this or some pointers to existing algorithms to achieve what I want.

Maybe a mesh is not the right way, I'd like to hear what's a better way of achieving this in that case.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by tanoshimi · Mar 06, 2015 at 06:50 AM

There are plenty of examples of procedural mesh generation; try this for starters: http://u3d.as/content/unity-technologies/procedural-examples/3zu

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 kkxzd · Mar 21, 2015 at 04:21 PM 0
Share

Sorry for not having followed up on this before, was on a trip. I had in fact tried this asset but it didn't give me the answers I needed. I'm not having a problem generating the meshes, my problem lies more into what kind of algorithm can be used to create a surface of triangles given a known outline (described as a List for example) For example, right now to generate a procedural terrain that doesn't have "caves" or overhangs, something like this:

https://sketch.io/render/sketch550d99b2a87a5.png

But I'd like to solve the more generic problem of being able to fill up a generic terrain, something like this:

https://sketch.io/render/sketch550d9a45f3e5f.png

avatar image
0

Answer by Chiroculon · Apr 06, 2017 at 10:03 PM

@kkxzd You could use Constrained Delaunay triangulation to create the optimal triangle net, and then loop through the triangles to remove the ones that should not be filled.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Procedural Mesh problem from Editor Window 1 Answer

Sphere made of cubes algorithm 4 Answers

Procedurally created mesh appearing offset from it's vert locations. 1 Answer

Splitting vertices in a mesh specifically a plane 0 Answers

Perlin Resources system 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