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
1
Question by cobertos · Mar 27, 2013 at 12:13 AM · c#texturemeshproceduralvertices

Do I need to split my mesh up to properly UV texture it?

I'm procedurally generating meshes for my game and I have a few questions.

Say I have a cylinder with a top, bottom, and sides. I need to assign different UV values to the vertices shared by the top and sides. Does splitting up these vertices, so that there may be two in the same place, have any noticeable impact on performance or resource usage? Is there a better way to do this? Is this standard across all engines (do most game engines want you to split up your vertices like this)?

In addition to the questions above, do I need to split up my mesh into multiple mesh's (multiple mesh filters) to apply multiple materials to it? Can I keep the one mesh together and texture different triangles differently?

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

Answer by Benproductions1 · Mar 27, 2013 at 01:03 AM

To answer your first question: The only reason gameEngines split up some, but not other vertices, is because of Normal Interpolation. If the vertices were combined, it would result in every edge being smoothed. When this is not a desired effect, the vertices are split. Unless your working in the millions, there is no noticeable difference.

For the second Question: You need to split up your mesh into submeshes in order to apply different materials to different parts. You can't have more than 1 Mesh Renderer on one object

Hope this helps :) Benproductions1

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 cobertos · Mar 27, 2013 at 01:30 AM 0
Share

Alright, cool. If I want to have more than two different UV coordinates on one shared vertex do I need to split them up (I'm guessing this is a yes though considering if I wanted to have two different UV coordinates of the same texture I wouldn't really want a smooth edge)

avatar image whydoidoit · Mar 27, 2013 at 01:57 AM 0
Share

It takes more memory to split the vertices - depending on how many things you store on a vertex it can have an impact on mobile devices. You do need to split for multiple uvs. You could us an atlas texture and uv coordinates to put multiple textures on different parts of the mesh (better performance) but then you can't swap the textures easily afterwards.

If you want different tints etc you could use a custom shader that uses vertex colours, second uvs, alpha values in the first texture etc to tell the shader to use a different texture for different parts of the model.

In the picture you can see my "shop" which has two textures. The window for the shop is chosen based on looking for special vertex colours and the underlying texture map is recoloured using a red/green/blue mapping.

$$anonymous$$y people are all one model and a single combined skinned mesh - they use a reference texture to colour different parts of their bodies different colours. They all use a base stripey texture which is mapped onto different clothing colours.

alt text

screen shot 2013-03-27 at 01.54.00.jpg (221.7 kB)
avatar image cobertos · Mar 27, 2013 at 03:43 AM 0
Share

By multiple UVs you mean multiple UV values not multiple UV textures, right? Thanks, that really explained a lot btw :)

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

12 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

Related Questions

Problem Creating a 2D Mesh 1 Answer

Setting mesh.vertices to a 3-dimensional array 1 Answer

Help in understanding Mesh Generation 1 Answer

Mesh adaption 1 Answer

mesh-morph scaling badly 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