## Re: [Algorithms] Illumination Half vector in lighting

 Re: [Algorithms] Illumination Half vector in lighting From: Tom Forsyth - 2006-07-27 12:20:38 ```You assume the viewer is infinite just because it makes the maths far easier. But obviously it only works if the viewer is actually moderately infinite - i.e. a fair distance away from the object. Infinite/non-infinite viewers have nothing to do with the light type - that's orthogonal to the problem. > To me, the meaning of an infintely far viewer and a local light is the > same as the meaning of an infinitely far light and a local viewer. Is > this correct? Imagine a hollow shape with the light actually inside it, but the viewer a decent distance away. Inf viewer + local light is a reasonable approximation, but inf light + local viewer is not. But obviously in some situations you can approximate with an infinite light (which is exactly what a "directional" light does), and then you can simplify the maths in a similar way. TomF. > -----Original Message----- > From: gdalgorithms-list-bounces@... > [mailto:gdalgorithms-list-bounces@...] On > Behalf Of Matt J > Sent: 26 July 2006 13:24 > To: Game Development Algorithms > Subject: [Algorithms] Illumination Half vector in lighting > > > Can someone explain the difference, visual and conceptually, from a > local light half vector and one that is from an infinite distance > away? I'm not having a problem with the mathematics, more like the > conceptual understanding. > > Local meaning: > > h = L + V / || L + V || > > And infinite meaning: > > h_inf = L + (0, 0, 1) / || L + (0, 0, 1) || > > i.e. the latter which is given from: fragment.light[n].half and used > in LIT ARB opcode > > Would you assume the viewer is infinite because its a directional > light? What meaning would this half vector mean then, if the source is > a spot or area light? Or is that value no longer useful then? > > To me, the meaning of an infintely far viewer and a local light is the > same as the meaning of an infinitely far light and a local viewer. Is > this correct? > > Thanks for the tips :) > > ----- > Matt Johnson > http://otowngraphics.blogspot.com ```

 [Algorithms] Illumination Half vector in lighting From: Matt J - 2006-07-27 05:45:53 ```Can someone explain the difference, visual and conceptually, from a local light half vector and one that is from an infinite distance away? I'm not having a problem with the mathematics, more like the conceptual understanding. Local meaning: h = L + V / || L + V || And infinite meaning: h_inf = L + (0, 0, 1) / || L + (0, 0, 1) || i.e. the latter which is given from: fragment.light[n].half and used in LIT ARB opcode Would you assume the viewer is infinite because its a directional light? What meaning would this half vector mean then, if the source is a spot or area light? Or is that value no longer useful then? To me, the meaning of an infintely far viewer and a local light is the same as the meaning of an infinitely far light and a local viewer. Is this correct? Thanks for the tips :) ----- Matt Johnson http://otowngraphics.blogspot.com ```
 Re: [Algorithms] Illumination Half vector in lighting From: Tom Forsyth - 2006-07-27 12:20:38 ```You assume the viewer is infinite just because it makes the maths far easier. But obviously it only works if the viewer is actually moderately infinite - i.e. a fair distance away from the object. Infinite/non-infinite viewers have nothing to do with the light type - that's orthogonal to the problem. > To me, the meaning of an infintely far viewer and a local light is the > same as the meaning of an infinitely far light and a local viewer. Is > this correct? Imagine a hollow shape with the light actually inside it, but the viewer a decent distance away. Inf viewer + local light is a reasonable approximation, but inf light + local viewer is not. But obviously in some situations you can approximate with an infinite light (which is exactly what a "directional" light does), and then you can simplify the maths in a similar way. TomF. > -----Original Message----- > From: gdalgorithms-list-bounces@... > [mailto:gdalgorithms-list-bounces@...] On > Behalf Of Matt J > Sent: 26 July 2006 13:24 > To: Game Development Algorithms > Subject: [Algorithms] Illumination Half vector in lighting > > > Can someone explain the difference, visual and conceptually, from a > local light half vector and one that is from an infinite distance > away? I'm not having a problem with the mathematics, more like the > conceptual understanding. > > Local meaning: > > h = L + V / || L + V || > > And infinite meaning: > > h_inf = L + (0, 0, 1) / || L + (0, 0, 1) || > > i.e. the latter which is given from: fragment.light[n].half and used > in LIT ARB opcode > > Would you assume the viewer is infinite because its a directional > light? What meaning would this half vector mean then, if the source is > a spot or area light? Or is that value no longer useful then? > > To me, the meaning of an infintely far viewer and a local light is the > same as the meaning of an infinitely far light and a local viewer. Is > this correct? > > Thanks for the tips :) > > ----- > Matt Johnson > http://otowngraphics.blogspot.com ```
 Re: [Algorithms] Illumination Half vector in lighting From: Matt J - 2006-07-28 07:05:48 ```I had to re-read this a few times but now it is perfectly clear. > You assume the viewer is infinite just because it makes the maths far > easier. But obviously it only works if the viewer is actually moderately > infinite - i.e. a fair distance away from the object. Infinite/non-infinite > viewers have nothing to do with the light type - that's orthogonal to the > problem. > > > To me, the meaning of an infintely far viewer and a local light is the > > same as the meaning of an infinitely far light and a local viewer. Is > > this correct? Ahh, makes sense :-) In your example, Infinite light would, for one thing, have the the specular highlights on the wrong side, right?.. - Matthew > Imagine a hollow shape with the light actually inside it, but the viewer a > decent distance away. Inf viewer + local light is a reasonable > approximation, but inf light + local viewer is not. > But obviously in some situations you can approximate with an infinite light > (which is exactly what a "directional" light does), and then you can > simplify the maths in a similar way. > > > TomF. ```