[Solved] How to enlarge torch range?

User avatar
yawin
Member
 
Posts: 18
Joined: Fri Dec 30, 2016 17:09
In-game: Yawin

[Solved] How to enlarge torch range?

by yawin » Fri Dec 30, 2016 17:13

Hi everyone!

I'm creating a torch for a mod I'm doing. I would like it to illuminate a huge block radius. Changing "light_source" only changes the intensity of light, the range of that light, however, remains. How can I change that range so that the torch illuminates as much distance as I want?
Last edited by yawin on Wed Jan 18, 2017 00:13, edited 1 time in total.
dynamic_cast<Signature*>(me→signature)
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: How to enlarge torch range?

by hajo » Fri Dec 30, 2016 17:56

There are only 4 bits for the light-level, i.e. 0-15. Completely dark is 0.
The sun has max light, at 15, everything else can only have max 14.

Stepping down the lightlevel by 1 with every block of distance,
and you see why there is a max range for lightsources.

So, just set the time of day to get the sun out (see light-switch in tutorial).
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
yawin
Member
 
Posts: 18
Joined: Fri Dec 30, 2016 17:09
In-game: Yawin

Re: How to enlarge torch range?

by yawin » Fri Dec 30, 2016 22:21

hajo wrote:There are only 4 bits for the light-level, i.e. 0-15. Completely dark is 0.
The sun has max light, at 15, everything else can only have max 14.

Stepping down the lightlevel by 1 with every block of distance,
and you see why there is a max range for lightsources.

So, just set the time of day to get the sun out (see light-switch in tutorial).


I can't use that because if I want to illuminate a cave, the sunlight does not get inside.
dynamic_cast<Signature*>(me→signature)
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: How to enlarge torch range?

by paramat » Mon Jan 02, 2017 16:20

You can't, in Minetest light range is limited to 16 nodes.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: How to enlarge torch range?

by twoelk » Wed Jan 04, 2017 04:09

+ some time ago I created a cave with sunlight inside


Just recently after seeing some science fiction film about living in an ice age, I had thought of a game where plantlife would only be possible around large light sources as the sun wouldn't be light enough for that job, just as on some of the planets (or large moons) farther from the sun. This could be a technical device or some plant like them large trees at the beginning of the Silmarillion in Valinor as described by Tolkien. For this to work though the light these sources could spread should reach a lot farther than 16 nodes. If I let a tree grow 100 nodes high the light should spread farther than the tree is high. Right now it would probably not reach the ground from the bottom most leaves.
Being able to use an alternative large light source that lights a considerable area as part of some special game design would be usefull indeed. Not only for fantasy themes but also for science fiction and mining related themes.
 

User avatar
yzelast
Member
 
Posts: 43
Joined: Sun Oct 02, 2016 01:18
GitHub: yzelast
In-game: yzelast

Re: How to enlarge torch range?

by yzelast » Thu Jan 05, 2017 04:51

For this problem I imagined something like this:

X = torch
B = invisible light block
r = light

The default torch

r r r r r r r r r r r
r r r r r X r r r r
r r r r r r r r r r r

A "stronger torch"

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r
r r r r r B r r r r r r r r r r B r r r r r r r r r r B r r r r r r
r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r
r r r r r B r r r r r r r r r r X r r r r r r r r r r B r r r r r r
r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r
r r r r r B r r r r r r r r r r B r r r r r r r r r r B r r r r r r
r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

I'm almost sure it will be much more heavier to run,but i think that will "simulate" a larger torch.

But there is another problem: a stronger torch will need to illuminate a higher and lower height, so a single "strong " torch would need a lot of light blocks.
Attachments
screenshot_20170105_023246.png
Example of brigher torch
screenshot_20170105_023246.png (987.66 KiB) Viewed 1314 times
Have a free time? So check it out my mods: Real Trees and Wood Plus
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: How to enlarge torch range?

by Napiophelios » Thu Jan 05, 2017 10:39

yawin wrote:Hi everyone!

I'm creating a torch for a mod I'm doing. I would like it to illuminate a huge block radius. Changing "light_source" only changes the intensity of light, the range of that light, however, remains. How can I change that range so that the torch illuminates as much distance as I want?


you need a mini sun source
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 52 guests

cron