I was thinking about ways to implement a lightweight but realistic lighting engine and what I got was a very cheap idea. But I think it'd be pretty good. So I need your opinion: do you think it'd be a good idea? See how it would work below:
- Because it would be very hard to make a good radiosity like lighting engine from scrap, I decided to use one that is free and can actually be accessed programmatically (I like this word) via Python: Blender Cycles. There is a feature named "bake to texture" which is pretty useful. So the result would be like this for a Cornell Box:
[attachment=28201:BAKE.png]
- That is great, but only works for static objects. So I thought: why not use lights for dynamic objects? So I made a Python script that puts lights through the bright spots of a scene (considering the surface's color, but at the moment it puts lights everywhere, not only on bright spots: I'm going to implement that later). Only some few would cast shadows, of course
- Then the game uses the light map baked in Cycles for static objects, the most appropriate lights (when you're in a closed room, that'd mean only the lights in that room) for shading dynamic objects and Ambient occlusion would finish the equation.
I don't have results yet, but I'm pretty sure it'd work fine. What is your opinion about this? Is it good? Is it stupid? Am I stupid? Feel free to comment.