Re: Build A World - new massive game, using Irrlicht
Posted: Thu May 01, 2014 3:28 pm
New version is out !
http://www.buildaworld.net/news/060
http://www.buildaworld.net/news/060
Official forum of the Irrlicht Engine
https://irrlicht.sourceforge.io/forum/
Wow, that's amazing. You're actually computing vertex-lighting for potentially hundreds of thousands of vertices lit by tens of thousands of light sources in real time??sodandk wrote:Hi. The look of the game is a mix of different things. This is my first 3D game, so at start I thought that each light would just be a hardware light and shadows would automatically be shown... but got wiser
First of all, hardware light just goes through everything and shadows are not automatic, and neither is AO (Ambient occulusion) , and the game needed thousands of lights... in case of for example a volcano, each blocks is a light block and there are maybe 50.000 lights ...
So, instead this is how its done:
Each block and the sun can emit light, and a specialized software floodfill fills around with light and shadow and light are applied to the vertices on the go, and also AO is computed on the fly, so basically most of the light is made by software (maybe we move that code to the GPU with OpenCL). DevSH (user here on Irr) has made a number of Shaders for water, reflections, fire, smoke etc. For the player's headlamp and the rotator lights we do use hardware lights...
This is a fast rough simple description of how light is done in BAW. It might change radically later on, but the real challenge is to have 10.000 lights or 100.000 lights in a scene, and still have it running in realtime.
Its a very large, and very Assembly looking function which makes me want to puke every single time I want to translate it to GLSL+TransformFeedbackWow, that's amazing. You're actually computing vertex-lighting for potentially hundreds of thousands of vertices lit by tens of thousands of light sources in real time??
If you don't want me to keep inquiring, just say so and I won't. But... are you using some kind of raycasting to determine wether a vertex is lit by a light source or not? Or how does this floodfill work?