November 16, 2012

BGE Candy - Area lights

I have a new PC computer and this is a milestone for the development for BGE and my racing game. Finally I can to some more quality screen capture, and the first ones to show you are - area lights!

As soon as I saw Arkano22`s implementation of area lights in gamedev.net forums I knew Blender must have it in GE! This is a slightly modified version of Arkano22 technique, the biggest differences are the smoother light falloff and specular reflection glossiness variations based of the reflecting surface properties and distance, and of course - the texture support!

You made it possible to remake your BPCEM scene with arealights. Each arealight having the texture of its corresponding wall.

Is it possible to give the arealight a instant falloff, so that it produces the reflection but no light? Could be useful to fake reflections only, otherwise it will be interesting to see what GI effects you can produce with this.

I had some problems making the arealights the same size as the meshes, the metric system seems to be buggy. I made the meshes 8x4m, but the arealights 8,4m are much smaller... don't know what the problem is at the moment.

You mean the texture blurring? I am just changing the mip-mapping offset based on the distance of the surface. Basically something like:miplevel = distance*glossiness;texture = texture2DLod(sampler,coords,miplevel);

Heh, nice trick with the mipmaps! And thanks for the code. You can see some of the results here http://www.flickr.com/photos/marcinignac/8210047821/in/set-72157629801608107 i'll play with textures later.