• 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 EvilWeebl · Mar 23, 2013 at 07:07 PM · combinemeshes

Will CombineMeshes stitch 2 meshes together?

My end goal is to have an animated skeleton and a variety of limbs that I can attach to it and have them skinned, which means I need the limbs to stitch together at joints. But to start simply I have 2 cubes, each missing a face and these cubes are side by side with their empty faces facing towards each other.

If I use Mesh.CombineMeshes will the 2 cubes attach at the open vertices? Essentially stitching themselves together?

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

Answer by Julien-Lynge · Mar 23, 2013 at 07:15 PM

No, they will not. They will simply be turned into a single mesh. It'll be up to you to stitch them together.

There is some research on the subject, though they can be very technical (http://www.cs.cmu.edu/~mmv/papers/12irosw-BrandaoCosteiraVeloso.pdf).

However, keep in mind that all stitching means in terms of meshes is having two vertices in the same location in space. If your two cubes are exactly touching where you want them to be stitched, they will, for all intents and purposes, be stitched. If you go a step further and make sure that where they touch all the normals are identical (which they should be with aligned cubes), then they will even appear smoothly stitched for lighting calculations.

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 EvilWeebl · Mar 23, 2013 at 07:27 PM 0
Share

Thanks for the prompt response. That's good to know, thanks. I'm afraid you link isn't working though.

A quick question then, when I come to attaching an arm mesh to a torso mesh on my animated skeleton what kind of things do I need to take into account? Correct me if I'm wrong on anything here:

  • The ring of edge vertices on the torso have to be the exact same(position, normals, etc) as the ring of edge vertices on the arm where it meets the torso.

  • To keep the skin effect as the skeleton is animating I presume that these vertices for each adjoining limb also have to have the same bone weight ratio despite them not necessarily having ever met the adjoining bone?

avatar image Julien-Lynge · Mar 23, 2013 at 07:37 PM 0
Share

For the link, UnityAnswers apparently considers the ) as part of the link :)

As for the vertices, you're correct that they would need to be identical in every respect. You can read the existing bone weights and apply them like so:

http://docs.unity3d.com/Documentation/ScriptReference/BoneWeight.html

Alternatively, if you have the same number of vertices and they're roughly aligned, you could just swap out the vertices used in the first set of triangles on your arm. For instance, write a function that goes through all the verts of the two meshes, and if an arm vertex is less than X distance from a torso vertex, look through the arm triangles for all triangles referencing the old vertex, and replace them with the index of the new vertex.

avatar image EvilWeebl · Mar 23, 2013 at 08:05 PM 0
Share

That's not a bad idea either. Thanks for all the help.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

11 People are following this question.

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

Related Questions

Why mesh colliders doesn't work with combined meshes using Mesh.CombineMeshes? 3 Answers

How to combine multiple meshes into a single mesh and save it. 1 Answer

Prefab - Mesh Combines for some reason 1 Answer

Lightmapping Error with combined meshes 0 Answers

Simple CombineMeshes example needed 0 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