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 testure · Aug 04, 2011 at 07:05 AM · meshpost processingimporter

unity vertex order

In modo, I have a single unified mesh with NO uv's, and a single material. If I import that mesh into unity, I can loop through mesh.triangles and all of the vertices match up perfectly.

Here's where the trouble comes: If that same mesh has more than one 'island', that is to say, there are a group of triangles that are not welded to the rest, the vert numbers in modo and unity no longer match. I'm trying to figure out why this is happening so I can take steps to get them matching again.

Well, a picture is worth a thousand words, so hopefully somebody can help me figure out what's happening here:

alt text

Comment
Add comment · Show 3
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 Graham-Dunnett ♦♦ · Aug 04, 2011 at 09:51 AM 1
Share

I know this doesn't help you, but I really wouldn't rely on the vertex ordering in a 3d modeller and a 3d engine being preserved. I think I'd do some vertex matching as a tool in Unity (assu$$anonymous$$g the important thing is that you match vertex 2 and 16 and so on in your diagram.)

avatar image testure · Aug 04, 2011 at 02:29 PM 0
Share

Hrm, see I thought vertex order preservation was one of the tennets of 3D.. that's how different applications are able to calculate normals without having them explicitly stated..

I can 'project' which vertex is which, but I run into problems when they occupy the same space- for example, 16 and 2 in this example would have the same coordinates, but they are not connected- i would need some bulletproof way to know that 16 and 21 are part of the same triangle, not 16 and 3, or 21 and 2..

any thoughts?

avatar image testure · Aug 04, 2011 at 03:46 PM 0
Share

Thinking on this problem more, I suppose what's more important to me than vertex order is making sure I have some way of correlating triangle data between my custom data set and the mesh inside of unity.

So I could attack the problem in another way- At the time the mesh is imported, I could cache the centers of each triangle, and compare those against the centers of my custom data. There should never be a triangle that overlaps to such an extent that it would have the same center as another triangle, so it could be sufficiently bulletproof for my needs... it would, however, make importing one of these special meshes take a lot longer, because that's a lot of division :P

edit: actually, I could even avoid the division altogether since I don't need the accurate world positions of the centers, just the relationship, so I could just let x = ax + bx + cx and not average them.

1 Reply

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

Answer by Adam-Mechtley · Aug 04, 2011 at 04:09 PM

Hi,

I addressed a similar problem to automate exportation of BlendShapes from Maya. My basic approach in Maya was to tag vertices with color values when they are exported (using a background Python process). You can effectively use this method to get a lookup into your point order in the modeling application if you need, or to generate a mapping system between your new and old point orders. I imagine you get the idea.

I have a video here showing how I use it: http://www.youtube.com/watch?v=JT39maunxLk And all of my source code is free via the asset store: http://u3d.as/content/adam-mechtley/maya-extensions/1Cy

Though it may not solve your problem directly, maybe there's an idea in there you can use.

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 testure · Aug 04, 2011 at 04:25 PM 0
Share

Ah, that's a clever way to do it. I guess the ceiling with this method would be 16,581,375 verts, or 4,228,250,625 if you're using RGBA. very reasonable!

avatar image Adam-Mechtley · Aug 04, 2011 at 04:30 PM 0
Share

Right, but since Unity's importer only allows 65535 verts per model, you have plenty of wiggle room ;)

avatar image testure · Aug 04, 2011 at 04:37 PM 0
Share

for sure. this method seems to be a clear winner to me since I won't be using vertex colors on these special meshes.

avatar image DaveA · Jul 11, 2012 at 01:02 AM 0
Share

Very clever!

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Retaining vertex indexes when importing meshes 1 Answer

It's possible save materials and meshes into a prefab like the unity's model importer? 2 Answers

Procedural cube generation 1 Answer

Edit Mesh Edge to Match Overlapping Object or Obstruction 0 Answers

Skin mesh model merge (iPhone and android) 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