Lighting

9 Karteikartenvon Nijelous
Diese Karteikarten lernenKostenlos · Spaced Repetition · iPhone, Android, Mac & Web

Alle Karten

1
Shading models
Per Surface (Flat shading)
-Each primitive has a normal, no interpolation, each pixel is the same
-Calculated in vertex shader with flat modifier
-Early 3D (Super Mario 64)

Per Vertex (Gourard shading)
-Each vertex has a normal, with the final calculations being carried out per vertex and interpolated
-Calculated in vertex shader
-Early 2000s 3D

Per Fragment (Phong shading)
-Each vertex has a normal, interpolated across the primitive
-Final calculations are calculated per fragment
-Calculated in fragment shader
-Modern 3D
2
Phong Reflection Model
Uses 4 different kinds of light to render light in a way that is close enough to how light works

Ambient: Lights everything equally, bunces off objects to be everywhere.
-One in a scene, no direction

Diffuse: Light from a specific source, scattered equally from the surface being drawn

Specular: Light from a specific source, reflected towards the camera from the surface being drawn. Highlights.

Attenuation: Weakening of light sources as you get further away
3
Diffusion Calculation
Diffusion factor = Normal.Incident
-Normal = vector pointing off surface at a right angle
-Incident = normalised(light position - surface position)

Diffuse = Light diffuse colour * diffusion factor
4
Specular Calculation
Specular factor = Normal.Half angle
-Half Angle = The angle between the viewing angle and the incident vector

Specular = light specular colour * specular factor^n
-n = specular power, high for shiny material, low for rough material
5
Attenuation Calculation
Attenuation = 1 - (Distance/Max Distance)

Distance is from light source to surface

Max Distance is how far the light can cast
6
Final light calculations
Final Diffuse = Surface Diffuse Colour * Diffuse * Attenuation

Final Specular = Surface Specular Colour * Specular * Attenuation

Final Colour = Ambience + Final Diffuse + Final Specular
7
Normal
The unit vector perpendicular to the surface, can be calculated as the cross product of two sides of a surface.
8
Static Lighting
A texture that defines the light of a surface, combining it with a light map.

No real time changes, but quick
9
Bump Mapping
A process of rendering polygons that gives them an illusion of depth.

A normal map is stored in the texture, with each texel having a normal.

The map wraps around the object like a texture, and provides greater depth to the specular and diffusion lighting.
Alle 9 Karten kostenlos lernen

Mehr Karteikarten

3- pharynx et larynx36 KartenMedizin und Gesundheit · FranzösischOcéaneCISC372 Midterm130 KartenDänischMichaelLiteratur der Weimarer Republik (1918-1933) und von 1933-194524 KartenGeschichte und Geisteswissenschaften · Deutschsrkrs22Democracy and participation: Pressure groups and other influences and rights in context20 KartenEnglischchloeDiphtheria15 KartenMedizin und Gesundheit · EnglischcaeKrisenjahre der Weimarer Republik12 KartenGeschichte und Geisteswissenschaften · DeutschTizian7 Emotions - CB9 KartenPsychologie und Gesellschaft · Englischbevo612Psychology: Milgram's Obedience Study380 KartenEnglischQueenBeeC2 Spanish: Personal Identity & Traits99 KartenSprachen · Spanisch → EnglischSeñoraPeriodiska systemet72 KartenNaturwissenschaften · DeutschLoppanBio 190: ATP, Enzymes, and Photosynthesis56 KartenNaturwissenschaften · EnglischMacpsychologyexam46 KartenPsychologie und Gesellschaft · EnglischCarson

Lerne diese Decks in der App

Kostenlos auf iPhone, Android, Mac und im Web. Füge jedes Deck mit einem Tipp zu deinem Konto hinzu.

Laden im App StoreJetzt bei Google Play
Alle 9 Karten kostenlos lernen