Replace "glow" for entities, and "light_source" for items, with something more versatile and with glowing nodes #14717
Labels
@ Client / Audiovisuals
Feature request
Issues that request the addition or enhancement of a feature
@ Script API
Problem
The
glow
parameter in object properties is used to visually brighten the entire texture of an entity. However, this is crude and brightens the entire texture by the same amount; you can't make some parts of the texture glow and others not.The
light_source
parameter in node and item definitions gives the amount of light emitted by a node, but for some reason also acts likeglow
for dropped items. Because the two are linked as such, there is no way to make a node appear brightened without it emitting light.(I'm particularly interested in this problem because I'm working on a version of Subnautica in Minetest - and of course that game depends heavily on "bioluminescence", almost all fauna and flora have some glowing parts and without them it's harder to play and loses so much of the atmosphere. I do think this change would benefit other games as well, though mostly aesthetically, such as Mineclonia which would be able to make its entities and nodes glow more easily.)
Solutions
The second problem (nodes not glowing) may be dealt with alone by splitting it into two properties:
light_source
which would only define light emitted, andglow
which would define the glow for both nodes and dropped items, and would default tolight_source
if unspecified, to stop old code from breaking.However, with the first problem (all of the texture having to glow the same amount) I believe a better solution, perhaps to be used in conjunction, would be to add some sort of glow layer in one of the following ways:
glow
property would then only affect this and not the main texture. For nodes you could use the already-existingoverlay_tiles
which is used for separate coloring.[glow:<value>
. This would be the most versatile, allowing layering and combining with other non-glowing textures, but I don't know if it's possible to do it that way.You could make the value just true or false - is there even any use for intermediate glow levels that can't be replaced with making it glow fully and altering the color?
Alternatives
Currently the only way I know of to approximate a solution to the first problem is to add another attached entity; this is what Mineclonia uses to make the endermen's and spiders' eyes glow. However, when an entity has lots of bones with glowing pixels this quickly becomes ridiculous and prone to error; it would be much simpler to have dedicated glow textures as suggested above.
The second problem may also be faked by using entities instead of nodes, but this would also be prone to error as well as causing lag if there's lots of these fake nodes in the world.
Additional context
No response
The text was updated successfully, but these errors were encountered: