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 aldiman · May 06, 2012 at 06:49 PM · c#meshnormalsvector 3

Algorithm for automatic mesh creation

Hi Guys,

i stumbled over a big problem in the project i'am working on:

i need to write an algorithm wich allows me to automatically connect vertices to Polygons (simply creating a mesh). Of course it would have to consider Convex and Concav Polygons (alignment of normals). So my question referrs to the possibility of writing such algorithm and if somebody knows if there are any tutorials or helps around.

The Input would be an Array filled with Vector 3 data (Vector 3 values and length/size of Array will be different each time).

I'am working in C# and would love to see you guy's advice and help.

Thanks in advance!

Comment
Add comment · Show 2
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 Jacek_Wesolowski · May 06, 2012 at 07:49 PM 0
Share

An array of vertices is just a collection of points. You can join them with edges in many ways, resulting in wildly different meshes. Does the array of vertices represent an actual 3D mesh in your case (for instance, a cube, or a piece of terrain, or a giraffe)?

avatar image aldiman · May 06, 2012 at 08:52 PM 0
Share

iam simply showing a reallife object as 3d pointcloud and the array gives me the location of scratches so i can visualise them.but since i dont know were thes scatches might be the vertices need to be wired together by code.

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by Graham-Dunnett · May 06, 2012 at 08:12 PM

My guess is that you have not read this page:

http://unity3d.com/support/documentation/ScriptReference/Mesh.html

It tells you how you can create meshes procedurally with Unity. As Jarek says, how you interpret the Vector3 array as points, and how you wire them together into triangles is outside the scope of this forum.

Comment
Add comment · Show 3 · 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 aldiman · May 06, 2012 at 08:41 PM 0
Share

yeah i know that page! just need to find a way to automatically wire the vertices given by the array together. im my case i don't have the array upfront, so i can't say 1#, 3#, 5# get's to be a polygon. i thought there's maybe some unity specific way to do that.

avatar image Jacek_Wesolowski · May 06, 2012 at 08:49 PM 0
Share

The point is, you can't tell what the connections between vertices should be from vertices alone. That's simply not enough information.

avatar image Graham-Dunnett ♦♦ · May 06, 2012 at 08:58 PM 0
Share

@Aldiman - Unity does not have to do this, since meshes that come in from modelling packages have the vertex indices for each polygon. You have what is often called a point-cloud.

@Jarek - couldn't agree more!

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

Distribute terrain in zones 3 Answers

Unity Mesh Rendering Issue 0 Answers

Getting meshes to render properly, and coloring triangles of a mesh 0 Answers

How to snap a Prefab to the normal of an irregular mesh 1 Answer

Multiple Cars not working 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