• 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 /
This question was closed May 25, 2018 at 01:31 AM by bpears for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by bpears · Apr 26, 2015 at 09:49 PM · normalsvertex

How to get normals per vertex, not per face?

When getting the normals from a mesh, it returns an array of normals of each face, is there a way to do by vertex? I mean, return an array of the normals in order of vertex?

is there an extension from a a mesh vertex? like mesh.vertices[10].normals? or another way to obtain the normal?

EDIT: Ok, wait a second.. mesh.normals is per vertex? why does it return a much larger array than the mesh.vertices array of the same mesh?

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

  • Sort: 
avatar image
1
Best Answer

Answer by Eric5h5 · Apr 26, 2015 at 10:38 PM

Mesh.normals is per vertex. All vertex attributes are per-vertex (by definition), and all the arrays are therefore the same size.

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 bpears · Apr 26, 2015 at 10:53 PM 0
Share

Thanks, I must have something strange happening in my code.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

Problem of color in custom vertex shader 0 Answers

How to calculate light from behind a quad? (and other light positions) 1 Answer

Edited Vertex normals in Unity - Blender 2.6.2 0 Answers

Any script to 'fix' normals/winding order? 3 Answers

Edited Vertex Normals from Maya to Unity 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges