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 GridManiac · Jan 10, 2019 at 10:09 AM · materialsuvmeshrenderer

Use material with specific UV

Hi, I have a solid human mesh with two materials: HEAD and BODY. I'm adding a third material to its mesh renderer to draw some decals on body (tattoos, wounds), but it uses HEAD UV, thereby I see body tattoos on face. I tried offsets but with no avail. Only secondary map works, but I want many materials, for face and body separately.

How do I switch UV?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by AndrewIanBurrow · Jan 10, 2019 at 11:22 AM

Hi GridManiac,

I have been puzzling over this for some time too. I was wanting to have a base texture mapped over a ground tile (grass for example) and then have a separate uv (created in Blender) to render another texture over the top (leaves, stones etc...). I wanted this so I could keep the base ground texture and change the "decal" overlay without having to create whole new textures.

Although Blender can export multiple uvs I found the standard shader in Unity didn't do what I wanted even though it can handle a secondary uv map, that is, I believe, designed to handle decals. Some examples can be found online of a wall texture with bullet holes using the secondary uv.

In the end I created multiple overlay textures and materials in Blender and then got Blender to combine them all into a single uv and texture atlas. Not ideal, and not simple, but the effect was what I wanted. This might not be what you are after though as I can image you will want to change the tattoos dynamically at run time, which would require a whole head and body texture.

I have reason to believe that you might be able to achieve what you want with a custom shader as well but I didn't look into that.

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 GridManiac · Jan 10, 2019 at 08:16 PM 0
Share

Thank you for sharing experience!

avatar image
0

Answer by GridManiac · Jan 10, 2019 at 08:17 PM

@AndrewIanBurrow I think I found a suitable solution (at least for me). In my case I need to add decals at runtime, so the first alternative was to mix textures through Texture.SetPixels method, but performance was bad. Then I decided to try RenderTexture thing. I setup camera with orthogonal mode and created a plane with UI material and BODY texture, then I added another plane and moved it up slightly, the final texture I dragged to my human model BODY material. Now I can add as many decals as I want at runtime.

P.S. I use Substance Painter to adjust decals position to fit my model UV.

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

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

101 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

Related Questions

using unity animation, Is there a way to offset UV of only one material? 0 Answers

Adding material trough a script, 1 Answer

Texture problem, multiple uv's & materials (blender) 2 Answers

Material Instance Created in Car Model Prefab 0 Answers

Change specific material on an object with multiple materials?,Change specific material on an object in a script? 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