Skip to main content
GameDev.net gamedev.net
🔒 Locked

Normals

Started by giugio Jul 20, 2008 at 12:46 PM 6 replies 1.4k views
Original Post
giugio
giugio
Hy. What are and what do the normals? Thanks
MARS_999
MARS_999
Are you asking what are normals and what do they do?

If so they are a vector of unit length that determines the lighting direction, to put it simply.

http://en.wikipedia.org/wiki/Surface_normal
jpetrie
jpetrie
Surface normals are used in conjunction with the lighting direction to determine the color of the surface based on lightning equations, et cetera. They don't determine the lighting direction.
MARS_999
MARS_999
Umm normals have a direction, and the light you see has a direction also, this is what I was getting at, not that a normal determines where the light's direction is coming from.


The normal is an imaginary line perpendicular to the surface of an optical medium. The word normal is used here in the mathematical sense, meaning perpendicular. In reflection of light, the angle of incidence is the angle between the normal and the incident ray. The angle of reflection is the angle between the normal and the reflected ray.

jpetrie
jpetrie
Quote:

Umm normals have a direction, and the light you see has a direction also, this is what I was getting at, not that a normal determines where the light's direction is coming from.

I am aware of what you were getting at, but your wording:
Quote:

If so they are a vector of unit length that determines the lighting direction, to put it simply.

stated quite the opposite. I was merely pointing that out. What you originally stated was flat-out wrong, although you presumably meant well, and your follow up has no real bearing on the fact that your initial assertion was incorrect.
gah_ribaldi
gah_ribaldi
So, as previously stated the normal to a flat surface, e.g. the trangles of our 3d models is a vector of unit length perpendicular to the plane upon which the triangle lies.

That would give us two normals though... imagine a piece of paper - there would be one normal coming out of the front and one out of the back. They're both equally viable but we only specify one per polygon - generally in keeping with whatever front face convention we have defined.

openGL can the use the defined normal to calculate the direction of refliected light in lighting calculations.

I believe one can also have per vertex normals instead of per face normals and there is some trade off then between an advantage which currently eludes me and the fact there are more calculations per face as each triangle has 3 instead of 1 normal to deal with.

gah_ribaldi
gah_ribaldi
Guys, it's about getting correct, relevant and understandable information to the OPer, first and foremost.

Please chill out. And someone who understands normals better than me give an answer - I'd be interested to expand my understanding in this area.
Washu
Washu
This thread was cleaned with Clorox®.
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.