Attenuation & Materials

Today I extended my engine to be able to load colored models exported from blender and also made a small improvement on lights, now lights using attenuation.


Now I can create colored objects in blender and I can load them into my game. I use wavefront file format when exporting from Blender so for the material data Blender will use MTL file format. 
Currently I only use the diffuse value from it.


Now I can set to a now property when I create a Light object attenuation. It describes how far a light can go.

I use this formula: attenuation + (attenuation*distanceFromLight) + (attenuation*distanceFromLight*distanceFromLight)

A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.