[Bf-committers] Very old game engine issue with Quad lamps
Kester Maddock
Christopher.Maddock.1 at uni.massey.ac.nz
Sat Dec 4 05:47:11 CET 2004
Hi Alexander,
The lighting has changed since 2.25 (I assume this is for bug #1957 ?):
1. 2.25 game engine does not handle quadratic attenuation.
2. Neither does the 3d view. (Except in 'fastshade' mode which is lit in
software)
3. The renderer's attenuation function is incompatible with OpenGL's
attenuation function. (Or I forgot to carry a 1 somewhere...)
4. 2.25 did not do specular lighting correctly. (Per vertex specular lighting
is ugly if the mesh is not tesselated enough.)
Kester
PS:
Lighting equations:
d = lamp distance
a1 = attenuation constant 1
a2 = attenuation constant 2
x = lamp to vertex distance.
Blender Renderer:
attenuation = (d / (d + a1*x)) * ( d^2 / (d^2 + a2*x^2)))
= 1/(1 + a1*x/d + a2*x^2/d^2 + a1*a2*x^3/d^3)
OpenGL:
attenuation = 1/(1 + a1*x/d + a2*x^2/d^2 )
On Saturday 04 December 2004 15:50, Alexander Ewering wrote:
> Actually, after some more testing, I noticed that the behaviour changed
> since 2.25 and got worse, i.e., the difference got much more noticable.
>
> For a test file, see:
>
> http://pub.intrr.org/game-test2.blend.gz
>
> Just hit P in the 3d view to see the ugly lighting difference :)
>
> | alexander ewering instinctive mediaworks
> | ae[@]instinctive[.]de http://www[.]instinctive[.]de
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
--
Knock, knock!
Who's there?
Sam and Janet.
Sam and Janet who?
Sam and Janet Evening...
More information about the Bf-committers
mailing list