Page 1 of 1
hd lighting abilities?

Posted:
Tue Jan 03, 2012 15:40
by jordan4ibanez
i was reading about irrlicht and i noticed that it is capable of lighting in hd...could this mean that there could be dynamic torch light? or dynamic TEXTURED (coloured) torch light? or how about orange glow at sun down? or blue darkness early in the morning? THAT would be amazing!

Posted:
Tue Jan 03, 2012 15:51
by neko259
celeron55 is afraid of making the game too slow on old computers if the dynamic lighting would be enabled. Mayba this can be done optionally?

Posted:
Tue Jan 03, 2012 15:51
by Jordach
And beat MC hands down.

Posted:
Tue Jan 03, 2012 16:57
by jordan4ibanez
thats the thing!! my friend is running minecraft on a p4 2.6 ghz with
like 512 gb of ram and nvidia 5200 fx (128mb vram) on half settings!
this game is 1/10th the weight of minecraft! all this stuff will be
possible if we have settings to enable and dissable some of the
bulkier features on minetest after their developed!

Posted:
Tue Jan 03, 2012 18:40
by Hackeridze
jordan4ibanez wrote:like 512 gb of ram
O_O

Posted:
Tue Jan 03, 2012 18:59
by Staffs
Hackeridze wrote:jordan4ibanez wrote:like 512 gb of ram
O_O
I think he meant MB

Posted:
Tue Jan 03, 2012 19:48
by cisoun
Would be interesting! I've got also an old Dell P4 1.8Ghz 512Mb with Nvidia Geforce 5600FX, that would be cool if it works on it!
Edit: Or we could just use the Doom 3 engine? Ok I'm out... ->[]

Posted:
Tue Jan 03, 2012 21:56
by sdzen
if I had the amount of ram he has 512 gb I would consider looking outside to remember what the sun looks like :)

Posted:
Tue Jan 03, 2012 22:16
by jordan4ibanez
sdzen wrote:if I had the amount of ram he has 512 gb I would consider looking outside to remember what the sun looks like :)
i meant mb

Posted:
Tue Jan 03, 2012 22:31
by sdzen
I know I was Just Teaseing

Posted:
Sun Jan 08, 2012 13:56
by Teravisor
If you implement dynamic lighting correctly, you can't lose anything. you might only win.
Old machines turn it off and get static lighting like the one right now
Not-so-old do dynamic lighting themselves and ignore(ideally not even receive? - meaning less bandwidth usage) lighting bits.
Though getting yourself into making correct dynamic lighting might be just time-consuming.

Posted:
Sun Jan 08, 2012 21:00
by neko259
Yes, dynamic lightning must be implemented. Also we must have an ability for entities to emit light.

Posted:
Sun Jan 08, 2012 21:35
by Nemo08
neko259 wrote:Yes, dynamic lightning must be implemented. Also we must have an ability for entities to emit light.
+100500!

Posted:
Sun Jan 08, 2012 21:39
by sdzen
+∞ :)

Posted:
Sun Jan 08, 2012 22:12
by MrThebuilder3
neko259 wrote:Yes, dynamic lightning must be implemented. Also we must have an ability for entities to emit light.
+inf

Posted:
Sun Jan 08, 2012 23:20
by RAPHAEL
+

Actually wouldn't bother me one way or the other if it was implemented. However I would be interested in MORE lighting. AKA a higher light max.

Posted:
Mon Jan 09, 2012 20:42
by celeron55
The problem with hardware lighting is that you cannot use the voxel lighting and hardware lighting simultaneously without shaders, and nobody is willing to or capable of creating such a system. Including me,

Posted:
Mon Jan 09, 2012 20:52
by neko259
celeron55 wrote:The problem with hardware lighting is that you cannot use the voxel lighting and hardware lighting simultaneously without shaders, and nobody is willing to or capable of creating such a system. Including me,
You mean shaders support isn't implemented in irrlicht? Or you don't want the game to bound users or old computers? But this also slows the game on modern hardware and wastes its features that aren't used.

Posted:
Mon Jan 09, 2012 23:33
by jordan4ibanez
i have taken this on my own to rewrite the lighting to accommodate hd/dynamic/textured lighting with help from members of the irrlicht community. wish me luck.

Posted:
Tue Jan 10, 2012 10:06
by neko259
jordan4ibanez wrote:i have taken this on my own to rewrite the lighting to accommodate hd/dynamic/textured lighting with help from members of the irrlicht community. wish me luck.
I wish you luck!

Posted:
Tue Jan 10, 2012 12:50
by jordan4ibanez
thank you..this could take me weeks or months

Posted:
Sun Jan 29, 2012 21:12
by neko259
Mesa driver supports opengl3 now, so we can use modern graphics features even on computers with old graphics cards. Of course they will be emulated by CPU.

Posted:
Sat Feb 11, 2012 10:54
by wokste
The day / night system currently gives problems. I think we should have fluent transitions. Here is a suggestion for implementation:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
u8 MapNode::getLight(u8 bankLevel, INodeDefManager *nodemgr) const
{
// Select the brightest of [light source, propagated light]
const ContentFeatures &f = nodemgr->get(*this);
if(f.param_type == CPT_LIGHT)
{
return (
(param1 & 0x0f) * (16 - bankLevel) +
(param1>>4)&0x0f * (bankLevel)
)>>4;
}
if(f.light_source > light)
return f.light_source;
return 0;
}
bankLevel must be an uint8 between 0 and 16. 16 means day, 0 means night. I suggest a sin-like curve for the float.
A word on efficiency. I do not know what the if statements do, but if statements and type conversions are relatively expensive for a computer. To further improve speed, this can be changed in a macro. (to avoid a function call). This will look somewhat like:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
#define getLight(block,bankLevel) (((block).param1 & 0x0f) * (16 - (bankLevel)) + ((block).param1>>4)&0x0f * (bankLevel))>>4)
Note: This code is neighter compiled nor tested

Posted:
Sat Feb 11, 2012 11:18
by kahrl
wokste wrote:The day / night system currently gives problems. I think we should have fluent transitions. Here is a suggestion for implementation:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
u8 MapNode::getLight(u8 bankLevel, INodeDefManager *nodemgr) const
{
[snip]
}
bankLevel must be an uint8 between 0 and 16. 16 means day, 0 means night. I suggest a sin-like curve for the float.
That's what getLightBlend() is for.
wokste wrote:A word on efficiency. I do not know what the if statements do, but if statements and type conversions are relatively expensive for a computer. To further improve speed, this can be changed in a macro. (to avoid a function call). This will look somewhat like:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
#define getLight(block,bankLevel) (((block).param1 & 0x0f) * (16 - (bankLevel)) + ((block).param1>>4)&0x0f * (bankLevel))>>4)
Umm, you know that a function that is defined inside class {} is inline?
BTW, the actual reason that the day-night transition is not smooth is that time_to_daynight_ratio (from utility.h) returns only three discrete values (350 at night, 750 at sunset and sunrise, 1000 during the day). I started changing that in my
shaders_v2 branch (be sure to set enable_shaders=0 in minetest.conf if you want to try it). However, the patches force a lot more mesh updates when the daynight ratio is changing.

Posted:
Sat Feb 11, 2012 12:07
by wokste
Thanks for the reply, appearantly I didn't understand the code as well as I thought. Your explanation helps a lot. I also like to hear that someone is already working on it.
kahrl wrote:Umm, you know that a function that is defined inside class {} is inline?
I didn't know that. Thanks again.

Posted:
Fri Feb 17, 2012 10:38
by MirceaKitsune
I would like this! Count my vote in :) But yes, make it optional, for people who have old computers or wish to have a lightning system like Minecraft's. Also, would this mean realtime shadows as well? <3

Posted:
Fri Feb 17, 2012 11:39
by Jordach
MirceaKitsune wrote:I would like this! Count my vote in :) But yes, make it optional, for people who have old computers or wish to have a lightning system like Minecraft's. Also, would this mean realtime shadows as well? <3
Woah woah woah woah woah waoh. Shadows, dont tell me DMs will become evem more scary... O.O

Posted:
Fri Feb 17, 2012 13:17
by jordan4ibanez
Jordach wrote:MirceaKitsune wrote:I would like this! Count my vote in :) But yes, make it optional, for people who have old computers or wish to have a lightning system like Minecraft's. Also, would this mean realtime shadows as well? <3
Woah woah woah woah woah waoh. Shadows, dont tell me DMs will become evem more scary... O.O
>dont tell me DMs will become evem
>dont tell become evem
>dont evem
FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU