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 sebj · Mar 22, 2014 at 08:52 PM · mathnormalsimporter

Why does inverting two components of a normal break them?

I have a tool that is creating a mesh from existing data. This data was created in 3DS Max which uses a right-handed Z-up coordinate system.

When I import the vertices (and normals), I swap the Z & Y components then mirror (invert) the points along the X and Z axis. This works fine with the positions, but the normals become distorted (see the image below).

I cannot see why this is. I have not adapted any transforms or anything else that could be deforming the mesh incorrectly, these are just arrays of absolute positions in space.

If I do not invert the X component, the normals display correctly (although my model is mirrored, and I must apply a scale of [-1,1,1] to have it display correctly). Further, if I do not invert the Z component, but instead apply a scale of [1,1,-1], the model also displays correctly.

This last part confuses me the most - inverting the last component and multiplying by a transform scales it negatively, are equivalent are they not? Why can I invert one component and have the normal work, but not two? What have I missed?

(edit: note the teapot is meant to be tapered, so I can tell what direction its facing all axes) ![alt text][1] [1]: /storage/temp/24054-teapot.jpg

teapot.jpg (22.2 kB)
Comment
Add comment · Show 2
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 getyour411 · Mar 22, 2014 at 09:00 PM 0
Share

I used to have issues like this with Blender imports, no suggestion on how to fix them ins$$anonymous$$d lesson learned: on Blender FBX EXPORT, set the Y/Z "stuff" to be how Unity expects them and all is well. If you don't get a better Answer, something to try in the meantime...

avatar image sebj · Mar 23, 2014 at 01:01 PM 0
Share

@getyour411 this is a reply to your comment below (I cannot add a comment to the answer post) - I am trying to accept the answer but it says I do not have permission and must login as another user! (my rep isnt high enough to accept my own answer, perhaps?) Should I convert it to a CW? Or should someone else put the answer down under their name and I can accept that one?

1 Reply

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

Answer by sebj · Mar 22, 2014 at 11:40 PM

A post on this thread prompted me to find the answer: if you want to do this transformation you have to invert the winding order! The coordinate system change is working now.

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 getyour411 · Mar 22, 2014 at 11:44 PM 0
Share

Good find, tick the Accept this answer below the thumbs!

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

20 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

Related Questions

Procedural Mesh Display Ignoring Normals? 0 Answers

Calculate ripple normals 1 Answer

How to calculate the 3D vector perpendicular to a polygon surface in a specific direction 1 Answer

Calculating a right triangle trouble... 2 Answers

Help with eval() 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