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 1dayitwillmake · May 02, 2013 at 06:15 PM · lighting

per face lighting, low poly

Hi is there away to achieve per-face lighting in Unity? I'm trying to achieve a lowpoly, 90's virtual reality look for an art project.

Something along the lines of:

alt text

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

Answer by whydoidoit · May 02, 2013 at 06:21 PM

If you make the vertices of each face separate and all sharing the same normal then you will get that effect. So don't share vertices between faces, have multiple in each location. Normally in a modelling package you control this with smoothing (you don't want any!) or a flat shading option.

Comment
Add comment · Show 6 · 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 1dayitwillmake · May 02, 2013 at 06:35 PM 0
Share

For my case, I'm defor$$anonymous$$g a plane in real time. In that case I guess unity's RecalculateNormals is the "culprit" ( even though it's doing exactly what it should do ) - Any pointers on where I might be able to calculate the normals myself in this manner?

avatar image whydoidoit · May 02, 2013 at 06:38 PM 0
Share

Sure take the tree points of the triangle and calculate the cross product of the vector3 between them (though if you have the vertices split this should just work - are you sure that you are creating each face totally separately and not sharing the vertex?).

        var normal = Vector3.Cross((p2  - p1).normalized, (p3 - p1).normalized);

(Or I might have it backwards and it's - that).

avatar image whydoidoit · May 02, 2013 at 06:40 PM 0
Share

So each face has 6 vertices and 2 triangles? (or at worse it has a flat face has at least 4 vertices that aren't the vertex indices in any other triangle).

avatar image 1dayitwillmake · May 02, 2013 at 06:43 PM 0
Share

I'm creating a plane, and simply applying noise to deform it. I'm using the default plane from Unity, so I'm sure the vertices are shared. Once perform that calculation on each triangle, how can I be sure I overwrite the correct normal in the array?

avatar image whydoidoit · May 02, 2013 at 06:45 PM 0
Share

It's impossible if the vertices are shared. You are going to have to make your own plane....

Show more comments

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

13 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

Related Questions

Light bulb moving HELP 1 Answer

Ugly shading issue 2 Answers

Gui label text change 0 Answers

Colors Seem all wrong when I set them in RGB 2 Answers

my point light and spot dont work 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