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
3
Question by qJake · Apr 21, 2010 at 08:04 AM · meshgenerationtrianglesalgorithm

Generating Triangles Given a Set of Points

Speaking only from a 2-dimensional standpoint, given a set of points (vertices), how can I generate the triangles necessary to fill in the object that the points were made from?

And what I mean by this is, if I specify the "outer edge" of this set of points, I need something to calculate all the triangles that will properly "fill" this object in. It shouldn't matter if the object is concave or not.

I realize this is confusing, so I've drawn a helpful diagram. :)

alt text

See... what I want is, if I give this algorithm a set of line segments (point pairs), say:

AB, BC, CD, DE, EF, FG, GH, HA

It should then be able to compute the triangles necessary to fill in the object, utilizing the lines I gave it. So if you give it 8 points, depending on the configuration, it will compute either the triangle set on the left, or right.

Does something like this exist? I'm sure it has to in some form or another, I mean... how else do 3D modelling programs generate triangles like this? If anyone has any information about something that I could possibly use inside of Unity like this, that would be excellent. Thanks!

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
3
Best Answer

Answer by Eric5h5 · Apr 21, 2010 at 08:27 AM

Check out the Triangulator script on the wiki.

Comment
Add comment · Show 4 · 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 qJake · Apr 21, 2010 at 08:38 AM 0
Share

Thanks! I'll definitely give this a try tomorrow. It sounds exactly like what I'm looking for. If it works, I'll +accept. ;)

avatar image qJake · Apr 21, 2010 at 11:52 PM 0
Share

This worked splendidly, thanks! :)

avatar image davebuchhofer · Apr 20, 2011 at 03:48 PM 1
Share

Excellent script, oddly difficult to find searching for: Procedural, $$anonymous$$esh, Generation, Draw, draw mesh, triangles, polygon

maybe here are some extra keywords for the search engine for future lookers :D

avatar image EmoryM · May 09, 2015 at 04:15 AM 1
Share

That link is broken, I'm assu$$anonymous$$g this is the same thing - http://wiki.unity3d.com/index.php/Triangulator

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

No one has followed this question yet.

Related Questions

Voxel mesh generation not working. 1 Answer

automatically creating triangles 2 Answers

Setting triangles failing 0 Answers

Connecting flatshaded vertices 0 Answers

Plane mesh generation help 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