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 MarshCZA · Jul 24, 2017 at 01:08 PM · shadermeshmeshrenderer

How can I make the shading on my mesh look like the primitives?

I've got a pretty simple mesh that I'm using, however, as you can see in the screen shot, it won't shade in the same way as a primitive cube. Both objects have the same material on them. Any suggestions? I'm having unity calculate the normals for me, could that be the problem? alt text

example.png (289.4 kB)
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 rageingnonsense · Jul 24, 2017 at 03:30 PM 0
Share

Where are you making your mesh? A 3D program like Blender? If that is the case, check to see if you are using smooth edges or vertices.

2 Replies

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

Answer by FortisVenaliter · Jul 24, 2017 at 07:01 PM

The problem is the normals. Your mesh is sharing normals on edges between faces (often called "edge-smoothing"). The unity one has separate normals for each faces' vertices.

You'll need to fix the normals in your mesh editor before re-exporting to Unity.

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 Firedan1176 · Jul 24, 2017 at 07:08 PM 0
Share

They can also be changed in Unity. Select your mesh in the Project view and you can have Unity calculate normals for you. You also have the option to change the edge break angle

avatar image MarshCZA Firedan1176 · Jul 25, 2017 at 02:38 PM 0
Share

Hi, thanks for the replies. I have generated the mesh in unity and had unity calculate the normals for me. Where do I access the break angle for the normals?

avatar image NoseKills MarshCZA · Jul 25, 2017 at 02:58 PM 1
Share

I believe he's talking about the slider you have when importing for example an FBX file and unity generates a mesh asset for you based on the data in it.

If you have a pure mesh asset in unity (for example dynamically created by code), you don't have this slider because it doesn't need to be imported, it's already a mesh. $$anonymous$$ore here

In this case you need to manually create the mesh so that it has the extra normals to make edges sharp. For example for a cube, you'd need to make each side use 4 separate vertices/normals and use those to draw the 2 triangles that make up the side.

avatar image
0

Answer by MarshCZA · Jul 26, 2017 at 12:51 PM

It turns out this is happening because I am sharing vertices. This means that the normals are pointing directly out at each corner. By having 3 vertices at each corner of the mesh I can properly direct the normals for each face.

I found my answer here

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

111 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

Related Questions

Particle System: Material doesn't cover the entire sphere mesh 1 Answer

Transparency / depth problem 0 Answers

How can I write a custom cutout diffuse shader that supports custom vertex colors? 1 Answer

How to use mesh data in shader 0 Answers

My meshes arent loading properly. 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