Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
2 captures
11 Jun 22 - 14 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 SomeGuy22 · Jul 14, 2015 at 10:08 PM · shaderimportnormalmapbumpmaptangent

Normal mapping mirrored UVs?

I have an object that has been mirrored in Blender with the mirror modifier. UV's have been correctly mirrored as normal, but applying a normal map to the object in Unity causes only one half of the object to be bump mapped. So after doing some research on the topic I noticed it had something to do incorrect tangents. However, after disabling Unity's tangent importer, I was left with an unshaded objects. (No tangents had been imported)

I thought the problem was that .blend files didn't contain tangents, so I exported an FBX with "tangent space" checked. And sure enough, there was bump mapping on both halves of the object. But something is still not right, there is an obvious seam and the bump mapping on one half looks opposite to the other half: alt text

On the left is the original .blend (with only half bump mapped) and the right is the .fbx with imported tangents (noticeable seam with inverted bump maps). What is going on here?

Side note: previously when I ran into this problem I would just apply the mirror and recalculate UV's. This worked when I had tiled textures (as I could just scale up UV mapping to compensate for the extra UV coordinates) but now I'm using a non-tileable texture, which means I can't just dump the current UVs! The mapping is now dependent on the texture being correct in mirrored mode. Thanks in advance!

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 SomeGuy22 · Jul 15, 2015 at 01:33 AM 0
Share

Still no luck, however this article explains my problem and a solution in UD$$anonymous$$. http://www.polycount.com/forum/showthread.php?t=116922 However this would require applying the mirror (which I really don't want to do) and it would require a mirrored tile texture (which I don't see an option for in Unity). Any thoughts would be appreciated.

2 Replies

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

Answer by SomeGuy22 · Jul 15, 2015 at 06:14 PM

Well after no help and hours of scratching my head I came up with an Editor script that helped out. This thread contains a TangentSolver script in CS. Using it, I made a script that executes in edit mode and calls the TangentSolver.Solve() function on the mesh I wanted to fix. From there, it's able to recalculate tangents and multiply the w component of the mirrored mesh by -1 to solve the Normal Mapping problem.

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 IgorAherne · Mar 21 at 07:50 AM

In unity, In the import settings of your objects you need to select the tangents "Import".

Also, you need to remember which UV chunks were mirrored. In the photoshop, select their regions, go into Channels, green channel and press ctrl+i to invert that channel, specifically for those lasso-selected areas.

alt text .... alt text


tangents.jpg (158.0 kB)
ctrli-jpg.jpg (308.4 kB)
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

21 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

Related Questions

Shader issue: Normal map from tangent to world space - Textures flipping? 0 Answers

can you make a surface shader be drawn before or after a certain pass? 1 Answer

Mobile bump shader not working 1 Answer

Normal map mask 2 Answers

Mobile Bumped Diffuse problem 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