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 Excelerator · May 30, 2021 at 09:31 PM · materialsubmesh

How to work with submeshes in editor

As it is, if I click on the object in the 3D view, it will refer to the object itself and display no information specific to the submesh I clicked on. However, if I do the reverse and drag a material to the object, it will be placed on a specific submesh. So, I know there is some functionality that is particular to submeshes, but I wonder if there is any functionality I'm missing. I find it can be problematic when dealing with an object with over 50 submeshes and you are trying to refer to the material you see in the 3D view but you forgot what the name of the material was or where the file was located. And on top of all of this, the material preview window is displaying my BakedLit materials too dark to be able to differentiate between materials when browsing. I'm just wondering if anyone knows any hotkeys or workarounds that will make material and submesh management take less time. If there is no such functionality, does anyone know what functions I would use to make a material eyedropper tool for the editor?

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
0

Answer by Bunny83 · May 30, 2021 at 10:26 PM

Submeshes are just referred to by their index. They do not have any names. The materials array has a 1-to-1 relationship to the submeshes. There is no particular order of your submeshes. They will just appear as they have been imported.


Usually when you import a mesh with submeshes, you don't really "work" with individual submeshes. Each submesh has its own material and that's it. As I said, there is no identification for the individual submeshes.


You could try using my UVViewer which allows you to view the UV maps for a mesh and all submeshes. You can even somewhat inspect individual triangles and vertices. Though I'm not sure how well my viewer would work with 50 submeshes as there would be 50 buttons in a row, one for each submesh -.-


Actually the question is, why do you even have that mans submeshes? There isn't really any benefit having submeshes. It just makes splitting and handling the meshes more complicated. Since each submesh has its own material, each submesh has its own drawcall anyways

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 Excelerator · May 30, 2021 at 10:51 PM 0
Share

So, I guess the solution would be a material eyedropper tool in the user interface that would highlight the material. This is something I would need to create?

avatar image Excelerator · May 30, 2021 at 10:59 PM 0
Share

The reason I have 50 or more submeshes is a long story and has a very good reason, but it has to do with the modeler.

avatar image Excelerator · May 31, 2021 at 05:03 AM 0
Share

Well, I need to ping object

I guess next thing I need is a raycast to find what submesh I'm clicking on.

avatar image Excelerator · Jun 01, 2021 at 02:38 AM 0
Share

Okay, I think I've got it now. Might put the solution on the asset store as I had to write a custom editor tool.

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

134 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Do submeshes get sorted properly for transparent materials? 0 Answers

How does submesh index map to material? 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

Combining blender submeshes 3 Answers

Why is it possible to add additional materials to a model, beyond its sub-mesh count? 4 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