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 rwenks · Jun 15, 2012 at 07:39 PM · materialmayahow-toelementelements

How to control material element order?

I model and texture in Maya, export as .fbx, and bring into Unity. I usually apply materials by faces. In Unity I need certain materials to be certain elements for my code. Is there a way of controling the element order in Unity without having to create another script?

Example: I have a female character and a male character. I have an eye material and a skin material. Each character is a combined mesh so I apply the materials by selecting eye faces and appling eye material and then selecting the skin faces and apply the skin material. When I bring them into Unity however, the Male eye material is applied to element 1 but the female eye material is applied to element 2 (and vice versa for the skin). This is not due to which material was created first in Maya, it's not due to alphabetical order, and it's not due to which material was applied first. I don't know what could be causing this.

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 Wolfram · Jun 15, 2012 at 08:59 PM 0
Share

For females, skin is more important ;-P

(sorry, couldn't resist...)

3 Replies

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

Answer by tomekkie2 · Jun 15, 2012 at 09:24 PM

This is due to to the id sequence of faces. The material of lowest id faces gets assigned to element0 and so on

Comment
Add comment · Show 1 · 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 rwenks · Jun 16, 2012 at 01:10 AM 0
Share

Thank you for your response! After knowing this I continued research and found this similar post: http://forum.unity3d.com/threads/27738-$$anonymous$$ulti-$$anonymous$$aterial-ID. Apparently 3DS $$anonymous$$ax has a way to assign face id's (found here: http://www.maxbasics.com/materials-tutorials/concepts/multi-material) and $$anonymous$$aya handles materials and faces in a different way, where I cannot access face id info to change it. If anyone knows a way in $$anonymous$$aya please let me know!

At this point it is just worth it to fix it in code in Unity rather than dealing with 3DS $$anonymous$$ax.

I really hope Unity finds a way to control face id's since this is crucial in my workflow as an artist. I shouldn't have to rely on progra$$anonymous$$g for simple texture application.

avatar image
2

Answer by bugmagnet · Jun 29, 2016 at 05:53 AM

I just solved this myself in Maya. I did it by separating out the mesh by materials.. ie object A has been split up into A1 which has only material 1 and A2 which has only material 2.

Then, depending on the order I select A1/A2 when i recombine them: the exported mesh will have the material id's accordingly.

Comment
Add comment · 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
0

Answer by motodream · Dec 06, 2012 at 03:55 AM

Uncombine meshes in Maya, then combine meshes which must share the same material, and assign the material to combined mesh, then recombine the meshes how do you like. The element order should be normal.

You also can see, are you in the right dirrection or no, just looking at the material order in the Maya's "Attribute Editor".

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 SpaceJames · Feb 13, 2013 at 12:36 AM 0
Share

This is perfect! That did it alright. Thanks for the answer.

avatar image motodream · May 30, 2013 at 06:51 PM 0
Share

No problem. I'm glad to 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.

Follow this Question

Answers Answers and Comments

8 People are following this question.

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

Related Questions

Importing an fbx from Maya 2016. Textures white(default) or dont exist. 1 Answer

How can I ensure Unity does not rearrange the sub-mesh order of a mesh from Maya?,How can I ensure Unity does not rearrange sub-mesh order of a mesh? 0 Answers

How to create a Surface Shader in Unity? 1 Answer

Unity re-importing maya issue 0 Answers

problem with materials when importing model 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