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 Borgo · Sep 06, 2011 at 02:03 PM · meshgenerationtrianglesautomatically

automatically creating triangles

Hi,

I want to know if there is a way to automatically creating triangles in a mesh.
For example, I set the vertices and do a "magic" command :)

I'm making a applications that the user can draw lines, these lines will be transformed in walls (a closed room) but I'm having the problem to figure How can I make the floor, depending the form the user draws the room, I say, If the form drawed is Convex, it's ok, but if the form is concave, i don't know how to make the vertices links, ensuring the form shape.

You can see the project here:
widemedia.com.br/projetos/homebuilder

Thanks,
Borgo

Comment
Add comment · Show 1
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 Fattie · Dec 09, 2011 at 08:23 PM 0
Share

the very short answer is, no, you have to do it by hand and it's very, very difficult indeed! Bear in $$anonymous$$d that software systems like $$anonymous$$aya -- which exist to do precisely what you describe -- are developed by literally thousands of people. It's a huge mathematical and research and development undertaking.

2 Replies

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

Answer by Borgo · Sep 07, 2011 at 01:43 AM

I found a script in UnifyCommunity:

http://www.unifycommunity.com/wiki/index.php?title=Triangulator

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 nathanthesnooper · Jul 17, 2017 at 05:03 AM 0
Share

File not found. EDIT: http://wiki.unity3d.com/index.php/Triangulator

avatar image AdhikS · Jul 28, 2017 at 07:53 AM 0
Share

http://www.unifycommunity.com/wiki/index.php?title=Triangulator this link is working now.. just created a floor depending upon the walls

avatar image
0

Answer by StephanK · Sep 06, 2011 at 02:07 PM

There is no magic about it. You have to set the vertices first. Then use mesh.triangles to specify which vertices form a triangle.

Comment
Add comment · Show 5 · 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 Borgo · Sep 06, 2011 at 02:17 PM 0
Share

Ok, So I have a big problem :)

I'm making a applications that the user can draw lines, these lines will be transformed in walls (a closed room) but I'm having the problem to figure How can I make the floor, depending the form the user draws the room, I say, If the form drawed is Convex, it's ok, but if the form is concave, i don't know how to make the vertices links, ensuring the form shape.

You can see the project here:
widemedia.com.br/projetos/homebuilder

avatar image StephanK · Sep 06, 2011 at 02:20 PM 0
Share

So the lines should get transformed into a surface? When do you start this transformation? When he stops drawing or only if he closed the lines?

avatar image Borgo · Sep 06, 2011 at 02:32 PM 0
Share

Not exactly the lines, but the points that the user have clicked. The transformation occurs when the user click on the first point, this ensures that every form drawed will be closed.

avatar image StephanK · Sep 06, 2011 at 02:35 PM 0
Share

So from each closed form you create a surface? Then you could just limit the user to draw the points in the correct order and create the triangles yourself. If you don't want to do that (the limitation) you could still figure out which is the top right topleft and so on.

avatar image Borgo · Sep 06, 2011 at 02:47 PM 0
Share

The points will be drawed in a correct order, the problem is the "concave" forms, I don't want to make a application that make only convex rooms, i want to make a solution to make concave rooms too. I know that it possible, but I dont know how can I make it.

Look at the link I have posted, You can make any room form you want, when you close the form, the program create the walls (regardless if the user drew clockwise or counterclockwise), so I have the vertices points of the surface.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Voxel mesh generation not working. 1 Answer

Setting triangles failing 0 Answers

Connecting flatshaded vertices 0 Answers

Plane mesh generation help 1 Answer

Generating Triangles Given a Set of Points 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