[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: 601
Joined: Thu Oct 13, 2016 10:45
Location: DE

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).
 

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)
 

User avatar
paramat
Developer
 
Posts: 3580
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: 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: 1353
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

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: 54
Joined: Sun Oct 02, 2016 01:18
Location: Far Far Away
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
(987.66 KiB) Not downloaded yet
G84mU6AQ9dKaNhxn6dq8P5C0y5r8NssE
 

User avatar
Napiophelios
Member
 
Posts: 993
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 1 guest