Calinou wrote:Won't using dynamic shadows (or stencil shadows) make it impossible to determine a node's light level (since using dynamic lighting would remove the whole "light level" stuff)?
keneticquartz wrote:Why would you want to cull the light so that it doesn't shine in caves? In real life (from my exprience) light does normally shine in caves.
Calinou wrote:keneticquartz wrote:Why would you want to cull the light so that it doesn't shine in caves? In real life (from my exprience) light does normally shine in caves.
Not all shadows are totally dark due to global illumination; light can "bounce" somehow. Adding that effect to a game is possible, but it is quite expensive in terms of resources. Tesseract is an example of a game that has optional global illumination (and also dynamic lighting, deferred shading and many other things).
Inocudom wrote:If this can be added to Minetest, the beauty factor of the game will go way up. I heard that it will also make it easier to add colored light-rays.
MirceaKitsune wrote:I was wondering if there are any changes, plans, or new ideas and opinions here. At this point this feels like the biggest bottleneck to MineTest being one of the best voxel engines and on its way to completion. I'm totally set on making it a reality, but can't manage much by myself if other developers don't help, as well as my work being for nothing if the code isn't accepted and others can't help finish it. Are any of the experienced devs willing to gather forces and find a solution on implementing actual lighting?
rubenwardy wrote:I dont think MirceaKitsune understands what she is talking about.
The main way of getting Lighting needs shaders.
Shaders define how pixels/fragments/vertex are rendered, and do not need to be expensive or costly.
Even the default per-vertex lighting in irrlicht uses shaders.
MirceaKitsune wrote:rubenwardy wrote:I dont think MirceaKitsune understands what she is talking about.
The main way of getting Lighting needs shaders.
Shaders define how pixels/fragments/vertex are rendered, and do not need to be expensive or costly.
Even the default per-vertex lighting in irrlicht uses shaders.
The builtin Irrlicht functions for lights are what I was thinking about as an alternative to shaders, were they better. I was preferring them (so people without shader support could use lighting too) but if they work the same way that clears one thing up.
I'm still talking about code changes since I imagine this needs to be done both in code and with a new shader. I have even less experience with shaders than with C++, but if there's a chance of this happening I'll google around for free shaders and GLSL tutorials and see if I could find anything slightly helpful.
Inocudom wrote:This discussion is alive again. I just hope that this leads to something good this time. The last time that this was discussed, a couple of prominent members left (mauvebic and rarkenin.) Luckily for us, Mito551 returned to our community recently.
Adding hardware lighting to Minetest will likely be a slow and challenging process, but it is not impossible. It will require teamwork from start to finish, but the results will be worth it through and through.
// v3f light_position, float light_intensity, list nodes_and_param.
// Example (written in a Lua-like way cuz that's easier to explain in):
{x = 15, y = 0, z = 5}, 10, { {node1_pos, node1_param1}, {node2_pos, node2_param1 } }
Bind gl_LightSource(); to all nodes that add light through the API. Then tune it until it matches the Minetest lighting distance.MirceaKitsune wrote:Sorry for the triple post... I hope that can be excused by the info and ideas I'm looking into :) I did a quick search on how to setup lighting in GLSL, and found a few pages that can be useful. I don't understand all of it myself especially since I'm rather tired today, but it might make it easier for people who want to try making the shader.
http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/lighting.php
http://www.clockworkcoders.com/oglsl/tutorial5.htm
http://pyopengl.sourceforge.net/context/tutorials/shader_7.xhtml
http://www.swiftless.com/tutorials/glsl/5_lighting_perpixel.html
Base idea is that the shader function we're looking for is gl_LightSource. Perhaps I'll look more in the next days about it.
fake wrote:I want to create a fork to improve the graphics in minetest, and I have a question. What is the current situation with dynamic lighting? Is they alredy implemented, or there is only in the plan? If not, I'm wondering where do you stop, and if I can help you?
Sorry for my bad english.
Users browsing this forum: No registered users and 31 guests