Page 1 of 1

Why is it impossible to farm underground?

PostPosted: Sun Jan 25, 2015 08:46
by yyt16384
There are many people saying that you can't farm underground because you can't achieve 13 light level without sunlight, and that seems to be right after some experiment.
But I still don't understand the reason. I think it is possible to have 13 light level by placing a torch next to the wheat. The torch has 14 light level so the wheat has 13 light level. I didn't find anything against this in the source code, so where am I wrong?

Re: Why is it impossible to farm underground?

PostPosted: Sun Jan 25, 2015 09:06
by Krock
The super glow glass from moreblocks works fine to farm. Give it a try.

Re: Why is it impossible to farm underground?

PostPosted: Sun Jan 25, 2015 09:16
by RHR
torches have LIGHT_MAX - 1 which is 13. So the first block next to them has only 12 and wheat and cotton need at least a light level of 13 to grow, so it is impossible to grow in minetest_game without changes.
The easiest thing would be to use a mod which adds a light source with 14 e.g. super glow glass from "moreblocks" Or you have to lower the minlight of wheat and cotton or you can to higher the light level of the torch.
torch
wheat

Re: Why is it impossible to farm underground?

PostPosted: Sun Jan 25, 2015 11:53
by Jordach
Some subgames make plants require light levels 10 or higher (don't quote me on this), as it makes farming with torches or weaker light sources to generate light much easier and less resource requiring.

Re: Why is it impossible to farm underground?

PostPosted: Sun Jan 25, 2015 14:38
by yyt16384
RHR wrote:torches have LIGHT_MAX - 1 which is 13. So the first block next to them has only 12 and wheat and cotton need at least a light level of 13 to grow, so it is impossible to grow in minetest_game without changes.
The easiest thing would be to use a mod which adds a light source with 14 e.g. super glow glass from "moreblocks" Or you have to lower the minlight of wheat and cotton or you can to higher the light level of the torch.
torch
wheat

OK. I misread the code and thought LIGHT_MAX was 15. Super glow glass is great, though.

Re: Why is it impossible to farm underground?

PostPosted: Mon Jan 26, 2015 14:49
by Wuzzy
The assertion that it is impossible to farm underground is false.

A possible solution for underground farming which does not involve any modifications or additions to minetest_game is this:

To the places where you wish to have sunlight, build a long vertical shaft (at least of radius 1×1) directly above the spot where you wish light. I call these “light shafts”. If the sun is shining, the full sunlight will go vertically through the shaft. To my knowledge, it does not matter how deep your shaft is. But you have to make sure the shaft does not contain any light-blocking block and it must be perfectly vertical.

You may place glass at the upper and lower end of the shaft, to avoid people falling inside. Glass does not reduce the brightness of the light, so it is save to use.

Re: Why is it impossible to farm underground?

PostPosted: Mon Jan 26, 2015 15:03
by ExeterDad
Wuzzy wrote:The assertion that it is impossible to farm underground is false.

A possible solution for underground farming which does not involve any modifications or additions to minetest_game is this:

To the places where you wish to have sunlight, build a large vertical 1×1 shaft directly above the spot where you wish light. I call these “light shafts”. If the sun is shining, the full sunlight will go vertically through the shaft. To my knowledge, it does not matter how deep your shaft is. But you have to make sure the shaft does not contain any light-blocking block and it must be perfectly vertical.

You may place glass at the upper and lower end of the shaft, to avoid people falling inside. Glass does not reduce the brightness of the light, so it is save to use.

So your saying that if I dig a 1 x 1 shaft straight down. Even to the point of it being dark. If I place a dirt block at the bottom, and plant. That plant will grow? That really messes with my mind!

Re: Why is it impossible to farm underground?

PostPosted: Mon Jan 26, 2015 15:17
by Wuzzy
The point is, no matter how deep you dig, the sunlight does not become darker, you will still have full sunlight at the bottom.
Here is proof:

Image

The glass is an ordinary glass, it is NOT a glow glass! No torches were used, it is all sunlight. Sam is standing at Y=-101.5.

Note that the other plants don't seem to ever outgrow size 1, only the plant directly below the shaft grows to full size. It looks like that every spot needs its own 1×1 light shaft. So underground farming is possible, but very limited. If you were to dig out the full shaft for every plant in the screenshot, it is probably not really underground anymore … unless you fill the shafts with glass or something. ;-)

Re: Why is it impossible to farm underground?

PostPosted: Mon Jan 26, 2015 18:39
by ExeterDad
Thanks for the demonstration! I never would of guessed it was possible.

Re: Why is it impossible to farm underground?

PostPosted: Tue Jan 27, 2015 18:53
by Krock
ExeterDad wrote:Thanks for the demonstration! I never would of guessed it was possible.

Yes but it's too easy to make the light disappear. Lamps/Glow glasses are definitely the better soulation.

Re: Why is it impossible to farm underground?

PostPosted: Sat Feb 07, 2015 20:34
by Hybrid Dog
What happens if l override minetest.get_node_light() to always return 15?

Re: Why is it impossible to farm underground?

PostPosted: Mon Feb 16, 2015 13:19
by yyt16384
Hybrid Dog wrote:What happens if l override minetest.get_node_light() to always return 15?

If I read the code correctly LIGHT_MAX is 14, and the max light level for growing is LIGHT_MAX, so you should return 14. And this may break some mod...