Multicolor lighting

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

Re: Multicolor lighting

by ThomasMonroe » Post

+1 I think that is a wonderful idea.
I don't make messes, I just, er...disturb the local entropy!

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

Re: Multicolor lighting

by TumeniNodes » Post

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.
A Wonderful World

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

Re: Multicolor lighting

by azekill_DIABLO » Post

Sure... We have to wait! But the community and 'sunday's coders' would dev on their own branch too!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Multicolor lighting

by Sires » Post

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
I don't have anything important to say.

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

Re: Multicolor lighting

by ThomasMonroe » Post

lol
I don't make messes, I just, er...disturb the local entropy!

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

Re: Multicolor lighting

by azekill_DIABLO » Post

xD why me?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Multicolor lighting

by ThomasMonroe » Post

probably bcs you are so easy to pick on, and we know you can take it :P
I don't make messes, I just, er...disturb the local entropy!

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

Re: Multicolor lighting

by azekill_DIABLO » Post

WhAT DID you JuSt sAy?

on-topic: how should multicolor lightning be defined? in nodes? but in which way? param2 or light?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Multicolor lighting

by ThomasMonroe » Post

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
I don't make messes, I just, er...disturb the local entropy!

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

Re: Multicolor lighting

by azekill_DIABLO » Post

#RRGGBBx0

I hope you are kidding.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Multicolor lighting

by TumeniNodes » Post

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
A Wonderful World

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

Re: Multicolor lighting

by ThomasMonroe » Post

azekill_DIABLO wrote:#RRGGBBx0

I hope you are kidding.
I was actually :P
I don't make messes, I just, er...disturb the local entropy!

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Multicolor lighting

by Sires » Post

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
I don't have anything important to say.

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

Re: Multicolor lighting

by azekill_DIABLO » Post

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!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Multicolor lighting

by ThomasMonroe » Post

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.
I don't make messes, I just, er...disturb the local entropy!

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Multicolor lighting

by Sires » Post

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

But I guess not since, you know, someone died :'(
I don't have anything important to say.

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Multicolor lighting

by Sires » Post

I guess the devs reading us noobing around they are like "is this the community we just built?..."
I don't have anything important to say.

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

Re: Multicolor lighting

by azekill_DIABLO » Post

Wat?

[sorry for shitpost but i have no words]
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Multicolor lighting

by Sires » Post

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
I don't have anything important to say.

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

Re: Multicolor lighting

by Krock » Post

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
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: Multicolor lighting

by azekill_DIABLO » Post

just stop saving light in maps. that the worst idea i've ever seen.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: Multicolor lighting

by TumeniNodes » Post

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
61+omJbeigL._UX522_.jpg (7.81 KiB) Viewed 673 times
A Wonderful World

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

Re: Multicolor lighting

by azekill_DIABLO » Post

Sure! bring me 2!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Multicolor lighting

by Sires » Post

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
I don't have anything important to say.

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

Re: Multicolor lighting

by Byakuren » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests