Multicolor lighting

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: Multicolor lighting

by ThomasMonroe » Sun Dec 10, 2017 20:28

+1 I think that is a wonderful idea.
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
TumeniNodes
Member
 
Posts: 2534
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Multicolor lighting

by TumeniNodes » Mon Dec 11, 2017 00:09

azekill_DIABLO wrote:Maybe we should just have a totally unoficial version of the game where everything is more or less mreged and then applied to the regular game if okay... Like a dev-testing-beta branch :D It would avoid paramat to be unjustly lapidated by the community. he makes a lot of good things for minetest, but most of us have the bad habit to only see the negative when he is against a pull request for example! We shouldn't do that.


And... who will develop this?
It is already plenty of work, for those performing the work, between Minetest & Minetest Game..., to add yet another repo means, more work and could also cause some confusion on both ends (devs and users)

It is difficult enough to find new/additional developers for the extisting repos in the first place.
Adding features is not as simple as many seem to think, pandora's box is always cracking at the seams.

I have voiced a desire for coloured lighting (as well as a couple other lighting related issues) a few times as well but
it is not something I will die without, or stop using the software over.
If it comes one day, I will be really happy..., but until then it really isn't a "make or break" feature.
I'm not your buddy, guy...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Multicolor lighting

by azekill_DIABLO » Mon Dec 11, 2017 16:50

Sure... We have to wait! But the community and 'sunday's coders' would dev on their own branch too!
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: Multicolor lighting

by Sires » Wed Dec 13, 2017 12:43

azekill_DIABLO wrote:Sure... We have to wait! But the community and 'sunday's coders' would dev on their own branch too!


I guess with "sundae's coder" you mean something like that:
Image
Right?



K sorry xD
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: Multicolor lighting

by ThomasMonroe » Wed Dec 13, 2017 13:22

lol
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: Multicolor lighting

by ThomasMonroe » Wed Dec 13, 2017 23:55

probably bcs you are so easy to pick on, and we know you can take it :P
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Multicolor lighting

by azekill_DIABLO » Thu Dec 14, 2017 17:41

WhAT DID you JuSt sAy?

on-topic: how should multicolor lightning be defined? in nodes? but in which way? param2 or light?
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: Multicolor lighting

by ThomasMonroe » Thu Dec 14, 2017 20:57

If shadows get implemented, we could use that structure to create light based on an integer value parsed into #RRGGBBx0
with 0 being black and 16581375 being white :P
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
TumeniNodes
Member
 
Posts: 2534
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Multicolor lighting

by TumeniNodes » Fri Dec 15, 2017 19:37

It would be nice if colour values could be set to light sources, (as they can to textures) on an individual basis.
So, to be bale to use something such as:

Code: Select all
light_source = 12, [colorize:#80800099]


... or something goofy like that, for nodes which use light

Even better, if there were some way to add code to make the light flicker (for torches)
But, all of this would require some engine work and I am unsure if this would even be a possibility
I am sure if it were, it would have already been done
I'm not your buddy, guy...
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: Multicolor lighting

by ThomasMonroe » Fri Dec 15, 2017 20:40

azekill_DIABLO wrote:#RRGGBBx0

I hope you are kidding.

I was actually :P
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: Multicolor lighting

by Sires » Fri Dec 15, 2017 23:57

Minetest Dev Wiki in the TODO page wrote:Hardware Lighting for Light Sources
Description
Benefits:
would allow variable light range and cutoff
would free up param1 of MapNodes to be used for storing more immediate node metadata (always a good thing!).
would allow colored light sources
Of course, can use dynamic lights, except they're very intensive and generally a scarce resource Dynamically generated lightmaps seem like a good way forward.
http://joshbeam.com/articles/dynamic_li ... in_opengl/
RealBadAngel is currently working on shader-based lighting. What strategy is he using?


Just quoting the wiki, wich may be really, REALLY non-updated since it says some informations that "most of us know is wrong, aka last line". But I really don't know what is hardware lighting, I search a bit and didn't find, I guess the fact that "free up param1" means that this is calculating light in the moment the player loads a light source.

It would be really interesting but I guess it's laggy too(not sure), but this would allow us to use param1 to more useful stuff, and since colored lights are treated as "novelty or something I don't remember" I guess then param1 would be used for another thing
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Multicolor lighting

by azekill_DIABLO » Sat Dec 16, 2017 11:15

ThomasMonroe wrote:
azekill_DIABLO wrote:#RRGGBBx0

I hope you are kidding.

I was actually :P

o'\
ooof...

I was expecting the worst. And yes tumeni, something like that would cool too!
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: Multicolor lighting

by ThomasMonroe » Sat Dec 16, 2017 13:06

Sires wrote:Just quoting the wiki, wich may be really, REALLY non-updated since it says some informations that "most of us know is wrong, aka last line". But I really don't know what is hardware lighting, I search a bit and didn't find, I guess the fact that "free up param1" means that this is calculating light in the moment the player loads a light source.

It would be really interesting but I guess it's laggy too(not sure), but this would allow us to use param1 to more useful stuff, and since colored lights are treated as "novelty or something I don't remember" I guess then param1 would be used for another thing


Hardware lighting actually sounds like it would be a good idea.
not sure if its already been implemented though.
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: Multicolor lighting

by Sires » Sat Dec 16, 2017 14:51

So can you explain what is it plz? It's hard to find here ;-;

But I guess not since, you know, someone died :'(
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: Multicolor lighting

by Sires » Sat Dec 16, 2017 14:54

I guess the devs reading us noobing around they are like "is this the community we just built?..."
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: Multicolor lighting

by Sires » Sat Dec 16, 2017 14:58

I guess the devs are reading complete noobs that have no idea about how hard is doing such a thing(sorry if it offends u but this included me!) and asking themselfs why did they create minetest forums xD
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

User avatar
Krock
Developer
 
Posts: 4144
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Multicolor lighting

by Krock » Sat Dec 16, 2017 15:27

In case none of you checked for older topics: viewtopic.php?f=5&t=11142

Yet, we have 8 bits for the light banks (day and night) for each node that lets light pass:
https://github.com/minetest/minetest/bl ... #L126-L132
Increasing that to three colors in total results in two additional bytes per node. "gg ez. why not do it then?" Of course this would be possible, but newer maps will no longer be accessible by older clients. A mapblock filled with air (without any metadata or header information) would require 24 KiB instead of 16 KiB of RAM and hopefully only a few ten bytes after the deflate compression for saving to the disk.
It's not as simple as telling the client to locate the light sources and calculate it themselves. The server also has to know about the light intensity in order to make mods work as they should.

inb4 we have an issue for that. https://github.com/minetest/minetest/issues/2670
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
TumeniNodes
Member
 
Posts: 2534
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: Multicolor lighting

by TumeniNodes » Sat Dec 16, 2017 16:05

I just be selling these to resolve the issue, if anyone is interested ; )
https://www.amazon.com/Rave-Cats-Kaleid ... sses&psc=1
Image
Attachments
61+omJbeigL._UX522_.jpg
(7.81 KiB) Not downloaded yet
I'm not your buddy, guy...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

Sires
Member
 
Posts: 168
Joined: Mon Jan 02, 2017 21:00
Location: Hue knows...
GitHub: Sires0
IRC: Sires
In-game: Sires

Re: Multicolor lighting

by Sires » Sat Dec 16, 2017 18:42

Krock wrote:In case none of you checked for older topics: viewtopic.php?f=5&t=11142

Yet, we have 8 bits for the light banks (day and night) for each node that lets light pass:
https://github.com/minetest/minetest/bl ... #L126-L132
Increasing that to three colors in total results in two additional bytes per node. "gg ez. why not do it then?" Of course this would be possible, but newer maps will no longer be accessible by older clients. A mapblock filled with air (without any metadata or header information) would require 24 KiB instead of 16 KiB of RAM and hopefully only a few ten bytes after the deflate compression for saving to the disk.
It's not as simple as telling the client to locate the light sources and calculate it themselves. The server also has to know about the light intensity in order to make mods work as they should.

inb4 we have an issue for that. https://github.com/minetest/minetest/issues/2670


Yes I have seen that links before.
"but newer maps will no longer be accessible by older clients" >>> I don't fell this is a problem, aren't we doing a breaking compat release anyway?

"It's not as simple as telling the client to locate the light sources and calculate it themselves. The server also has to know about the light intensity in order to make mods work as they should." >>> Can't the server just do a """"""instant"""""""(dat many " cuz I dunno how processor intensive it is) calculation of the light when mods request it? I mean, mods don't request light just like as "100000 blocks per sec", that would be insane for this "implementation" I guess

Next part is not based in any reference with a good reputation(just as my second answer there) neither based in a reference, this is based in my brain, plz don't rage 2 much if I'm being cringy:
My idea for calculating the light in a block would be, first check if there is sun, if there is get if the light is being blocked or not, if it's not, get the intensity of it in a var a by example, then get all light sources in a range of 15 nodes(I guess) and somehow, **somehow** check if there isn't any other non-transparent node blocking their light and sum their light with the var a
Nothing to declare

For the ones reading this, expect a new minetest game soon ;-)

Also, Sires is not pronouncied like Siri, it's from Sir, use he not she(also not it, I'm not a thing :P).

**SORY MAY BED ANGLISH**
 

Byakuren
Member
 
Posts: 813
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Multicolor lighting

by Byakuren » Thu Feb 08, 2018 02:38

The only lighting value that *really* needs to be stored in the map is whether a node is exposed directly to the sun, because to determine this without it cached, you might need to search a very large number of nodes.

Node-based lighting, on the other hand, only needs to look 16 nodes away from a particular node to determine that node's lighting, because Nide lighting cannot reach any farther. So hypothetically, lighting could be calculated for any map area as long as you load a one chunk shell around the area to check for light sources. The possibly tricky part is not making lighting too expensive since it will no longer be cached, other than direct sunlight. The other thing is that you would still want to cache the light values in memory, which would still increase RAM usage if color lighting is added. I think it would add 1 byte per node if lighting color is tightly packed, or 4KB per mapblock. It would be 8KB if not tightly packed. I don't think this is too big of an increase for RAM, since with the numbers of mapblocks loaded, this would probably only add up to tens of MB at most.
Every time a mod API is left undocumented, a koala dies.
 

Previous

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 1 guest