What can cause these shadows?
What can cause these shadows?
Sometimes Minetest generates shadows without any obvious reason. Currently I try to fix this in the lua version of the v6 cavegen.
If I fly above these shadows the wield hand gets dark. If I fly up the shadow ends always exactly at 44.0 or at 124.0
I have disabled caves, dungeons and decorations and I use vanilla mc game 0.4.14 with valleys mapgen. The only installed mod is the lua version of v6 caves.
Any idea what can cause these shadows?
If I fly above these shadows the wield hand gets dark. If I fly up the shadow ends always exactly at 44.0 or at 124.0
I have disabled caves, dungeons and decorations and I use vanilla mc game 0.4.14 with valleys mapgen. The only installed mod is the lua version of v6 caves.
Any idea what can cause these shadows?
- Attachments
-
- screenshot_20160521_160837.jpg (318.6 KiB) Viewed 680 times
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: What can cause these shadows?
Did you forget to update the lightening like this in the Lua code?
Code: Select all
vm:set_lighting({day=0, night=0})
vm:calc_lighting()
vm:write_to_map(data)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: What can cause these shadows?
No. Check this code.
https://github.com/duane-r/fun_caves/blob/v6/mapgen.lua
I fixed some bugs, but I didn't touch this. And yes, debug is set to false
https://github.com/duane-r/fun_caves/blob/v6/mapgen.lua
I fixed some bugs, but I didn't touch this. And yes, debug is set to false
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: What can cause these shadows?
That's strange because it updates the light after writing the node data. Does anything change when you add "vm:update_map()" after "vm:write_to_map()"?burli wrote:No. Check this code.<snip>
You misunderstood the main topic. It is about fixing the lightening bug in a Lua mod.KCoombes wrote:This will fix it.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: What can cause these shadows?
No, it wont. It removes the shadows, but does not fix the bug. I don't want to run mapfix evey minute
But I get closer. The shadows always appear in the corners of a mapchunk. And I think the size is 16x16 nodes
But they thend to appear on water, but also on solid nodes
Even larger shadows an at a chunk border
I think it has something to do with the overgeneration of some mods. The extra 16 nodes around the chunk. The v6 cavegen use this, and I think moretrees also use this
Will try something with moretrees tomorow
- Attachments
-
- screenshot_20160521_225422.jpg (113.36 KiB) Viewed 680 times
-
- screenshot_20160521_223303.jpg (44.42 KiB) Viewed 680 times
-
- screenshot_20160521_222701.jpg (80.71 KiB) Viewed 680 times
- kaadmy
- Member
- Posts: 706
- Joined: Thu Aug 27, 2015 23:07
- GitHub: kaadmy
- IRC: KaadmY
- In-game: KaadmY kaadmy NeD
Re: What can cause these shadows?
I think I've had shadows like that with <16x16 sizes. might be wrong though.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: What can cause these shadows?
The 'fun caves' mod is for use with singlenode mapgen.
Re: What can cause these shadows?
1: it's the "original" fun caves. It is the lua version of the v6 cavegenparamat wrote:The 'fun caves' mod is for use with singlenode mapgen.
2: Duane added surface to the new fun caves
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: What can cause these shadows?
Ok, contact the mod author in the mod thread.
Re: What can cause these shadows?
I don't think it is a mod problem. Moretrees has the same problem and I think I saw them in vanilla minetest too, but very rarelyparamat wrote:Ok, contact the mod author in the mod thread.
Re: What can cause these shadows?
Ok, I forgot that the moretree bug is "a little bit" different oO
Re: What can cause these shadows?
I still think it is an engine problem similar to moretrees, probably caused by the same issue. Both mods work with v6, but have problems with v7 based mg's.paramat wrote:Ok, contact the mod author in the mod thread.
- StepDevelop
- Member
- Posts: 75
- Joined: Mon May 02, 2016 21:11
- GitHub: StepDevelop
Re: What can cause these shadows?
Worldedit bugs ;) Me too returns this bug. it is the fault of deleted nodes, they remain invisible and you can select and generate shadows in the game. If not installed mods, Minetest works wonders! but without mods, are you doing a little :)
I hope I was helpful. The Worldedit bug I could not solve it.
I hope I was helpful. The Worldedit bug I could not solve it.
Re: What can cause these shadows?
I never used Worldedit.
Hm, generated and deleted nodes... The cavegen only generates air which should not cause shadows
Hm, generated and deleted nodes... The cavegen only generates air which should not cause shadows
- StepDevelop
- Member
- Posts: 75
- Joined: Mon May 02, 2016 21:11
- GitHub: StepDevelop
Re: What can cause these shadows?
burli wrote:I never used Worldedit.
Hm, generated and deleted nodes... The cavegen only generates air which should not cause shadows
Hi burli. Can you tell me that mods do you use? I make "accurate testing" of Minetest. If you let me know the mods you use, I see to clarify your problem. Thank you :)
And an air block problem, which are selected (node selection appears), I found this bug using "worldedit" and the "more trees".
Re: What can cause these shadows?
As I said in the first post
The mod is a rewrite of the v6 cavegen in Lua to make the v6 caves avalible for other mapgens. It was originally convertet by duane, but I made some bugfixes.burli wrote:I have disabled caves, dungeons and decorations and I use vanilla mc game 0.4.14 with valleys mapgen. The only installed mod is the lua version of v6 caves.
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: What can cause these shadows?
This seems to be an engine issue, I can re-create these shadows with this code
Also I can reproduce ~100% of times by loading a map in a specific way.
Hopefully not terrain dependent:
Look forward when loading terrain.
When all chunks loaded, look backwards.
When all chunks loaded, look left or right.
When all chunks loaded, look backwards.Tested at (2381,50-60,3004)
Reloading was done by deleting map.sqlite
Lighting issues will appear in different places each load.
Issue seems to be with light updates in the extended emerge area where the chunks are already loaded, as I can see the light issues forming on already loaded chunks.
Code: Select all
minetest.register_on_generated(function(minp,maxp,seed)
vm,emin,emax = minetest.get_mapgen_object("voxelmanip")
vm:set_lighting({day=0,night=0})
vm:calc_lighting()
vm:write_to_map()
end)
Hopefully not terrain dependent:
Look forward when loading terrain.
When all chunks loaded, look backwards.
When all chunks loaded, look left or right.
When all chunks loaded, look backwards.
Spoiler
chunksize = 5
mg_biome_np_heat = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 50
persistence = 0.5
scale = 50
seed = 5349
spread = (750,750,750)
}
mg_biome_np_heat_blend = {
flags = defaults
lacunarity = 2
octaves = 2
offset = 0
persistence = 1
scale = 1.5
seed = 13
spread = (8,8,8)
}
mg_biome_np_humidity = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 50
persistence = 0.5
scale = 50
seed = 842
spread = (750,750,750)
}
mg_biome_np_humidity_blend = {
flags = defaults
lacunarity = 2
octaves = 2
offset = 0
persistence = 1
scale = 1.5
seed = 90003
spread = (8,8,8)
}
mg_flags = notrees, nocaves, dungeons, noflat, light, decorations
mg_name = v7
mgv7_cave_width = 0.3
mgv7_np_cave1 = {
flags = defaults
lacunarity = 2
octaves = 4
offset = 0
persistence = 0.5
scale = 12
seed = 52534
spread = (96,96,96)
}
mgv7_np_cave2 = {
flags = defaults
lacunarity = 2
octaves = 4
offset = 0
persistence = 0.5
scale = 12
seed = 10325
spread = (96,96,96)
}
mgv7_np_filler_depth = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 0
persistence = 0.7
scale = 1.2
seed = 261
spread = (150,150,150)
}
mgv7_np_height_select = {
flags = defaults
lacunarity = 2
octaves = 6
offset = -8
persistence = 0.7
scale = 16
seed = 4213
spread = (500,500,500)
}
mgv7_np_mount_height = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 256
persistence = 0.6
scale = 112
seed = 72449
spread = (1000,1000,1000)
}
mgv7_np_mountain = {
flags = defaults
lacunarity = 2
octaves = 5
offset = -0.6
persistence = 0.63
scale = 1
seed = 5333
spread = (250,350,250)
}
mgv7_np_ridge = {
flags = defaults
lacunarity = 2
octaves = 4
offset = 0
persistence = 0.75
scale = 1
seed = 6467
spread = (100,100,100)
}
mgv7_np_ridge_uwater = {
flags = defaults
lacunarity = 2
octaves = 5
offset = 0
persistence = 0.6
scale = 1
seed = 85039
spread = (1000,1000,1000)
}
mgv7_np_terrain_alt = {
flags = defaults
lacunarity = 2
octaves = 5
offset = 4
persistence = 0.6
scale = 25
seed = 5934
spread = (600,600,600)
}
mgv7_np_terrain_base = {
flags = defaults
lacunarity = 2
octaves = 5
offset = 4
persistence = 0.6
scale = 70
seed = 82341
spread = (600,600,600)
}
mgv7_np_terrain_persist = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 0.6
persistence = 0.6
scale = 0.1
seed = 539
spread = (2000,2000,2000)
}
mgv7_spflags = mountains, ridges
seed = 3965213387771378814
water_level = 1
[end_of_params]
mg_biome_np_heat = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 50
persistence = 0.5
scale = 50
seed = 5349
spread = (750,750,750)
}
mg_biome_np_heat_blend = {
flags = defaults
lacunarity = 2
octaves = 2
offset = 0
persistence = 1
scale = 1.5
seed = 13
spread = (8,8,8)
}
mg_biome_np_humidity = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 50
persistence = 0.5
scale = 50
seed = 842
spread = (750,750,750)
}
mg_biome_np_humidity_blend = {
flags = defaults
lacunarity = 2
octaves = 2
offset = 0
persistence = 1
scale = 1.5
seed = 90003
spread = (8,8,8)
}
mg_flags = notrees, nocaves, dungeons, noflat, light, decorations
mg_name = v7
mgv7_cave_width = 0.3
mgv7_np_cave1 = {
flags = defaults
lacunarity = 2
octaves = 4
offset = 0
persistence = 0.5
scale = 12
seed = 52534
spread = (96,96,96)
}
mgv7_np_cave2 = {
flags = defaults
lacunarity = 2
octaves = 4
offset = 0
persistence = 0.5
scale = 12
seed = 10325
spread = (96,96,96)
}
mgv7_np_filler_depth = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 0
persistence = 0.7
scale = 1.2
seed = 261
spread = (150,150,150)
}
mgv7_np_height_select = {
flags = defaults
lacunarity = 2
octaves = 6
offset = -8
persistence = 0.7
scale = 16
seed = 4213
spread = (500,500,500)
}
mgv7_np_mount_height = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 256
persistence = 0.6
scale = 112
seed = 72449
spread = (1000,1000,1000)
}
mgv7_np_mountain = {
flags = defaults
lacunarity = 2
octaves = 5
offset = -0.6
persistence = 0.63
scale = 1
seed = 5333
spread = (250,350,250)
}
mgv7_np_ridge = {
flags = defaults
lacunarity = 2
octaves = 4
offset = 0
persistence = 0.75
scale = 1
seed = 6467
spread = (100,100,100)
}
mgv7_np_ridge_uwater = {
flags = defaults
lacunarity = 2
octaves = 5
offset = 0
persistence = 0.6
scale = 1
seed = 85039
spread = (1000,1000,1000)
}
mgv7_np_terrain_alt = {
flags = defaults
lacunarity = 2
octaves = 5
offset = 4
persistence = 0.6
scale = 25
seed = 5934
spread = (600,600,600)
}
mgv7_np_terrain_base = {
flags = defaults
lacunarity = 2
octaves = 5
offset = 4
persistence = 0.6
scale = 70
seed = 82341
spread = (600,600,600)
}
mgv7_np_terrain_persist = {
flags = defaults
lacunarity = 2
octaves = 3
offset = 0.6
persistence = 0.6
scale = 0.1
seed = 539
spread = (2000,2000,2000)
}
mgv7_spflags = mountains, ridges
seed = 3965213387771378814
water_level = 1
[end_of_params]
Reloading was done by deleting map.sqlite
Lighting issues will appear in different places each load.
Issue seems to be with light updates in the extended emerge area where the chunks are already loaded, as I can see the light issues forming on already loaded chunks.
Avatar by :devnko-ennekappao:
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: What can cause these shadows?
> Both mods work with v6, but have problems with v7 based mg's.
The overgeneration used in non-mgv6 mapgens does cause lighting problems.
The overgeneration used in non-mgv6 mapgens does cause lighting problems.
Last edited by paramat on Mon May 23, 2016 00:53, edited 1 time in total.
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: What can cause these shadows?
I've just realised, mgv6 cavegen can overgenerate by up to 16 nodes.
At https://github.com/duane-r/fun_caves/bl ... n.lua#L539 try:
vm:calc_lighting({x = minp.x - 16, y = minp.y - 16, z = minp.z - 16}, {x = maxp.x + 16, y = maxp.y + 16, z = maxp.z + 16})
or:
vm:calc_lighting({x = minp.x - 16, y = minp.y - 16, z = minp.z - 16}, {x = maxp.x + 16, y = maxp.y, z = maxp.z + 16})
These may not work though.
At https://github.com/duane-r/fun_caves/bl ... n.lua#L539 try:
vm:calc_lighting({x = minp.x - 16, y = minp.y - 16, z = minp.z - 16}, {x = maxp.x + 16, y = maxp.y + 16, z = maxp.z + 16})
or:
vm:calc_lighting({x = minp.x - 16, y = minp.y - 16, z = minp.z - 16}, {x = maxp.x + 16, y = maxp.y, z = maxp.z + 16})
These may not work though.
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: What can cause these shadows?
I see that you have missed my post...paramat wrote:I've just realised, mgv6 cavegen can overgenerate by up to 16 nodes.
At https://github.com/duane-r/fun_caves/bl ... n.lua#L539 try:
vm:calc_lighting({x = minp.x - 16, y = minp.y - 16, z = minp.z - 16}, {x = maxp.x + 16, y = maxp.y + 16, z = maxp.z + 16})
Also it doesn't over generate when above ground, the mod doesn't replace air/ignore nodes.
Also that code causes even worse light errors, shortly before crashing minetest.
Avatar by :devnko-ennekappao:
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: What can cause these shadows?
I saw your post.
Didn't think this would work.
Large caves do replace air, they have to when flooded with liquid.
My guess is overgenerating large caves spreading darkness.
Still not sure how core mgv6 avoids these lighting bugs.
Didn't think this would work.
Large caves do replace air, they have to when flooded with liquid.
My guess is overgenerating large caves spreading darkness.
Still not sure how core mgv6 avoids these lighting bugs.
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: What can cause these shadows?
Over generating the caves does cause some lighting issues, however the ones which burli is talking about are not related.
burli, try changing the call to set_lighting to
EDIT: Fixes the shadows you are talking about, but cuts off mountain shadows @ mapchunk border...
Probably would also cause cave lighting issues...
burli, try changing the call to set_lighting to
Code: Select all
vm:set_lighting({day=0,night=0},minp,maxp)
Probably would also cause cave lighting issues...
Last edited by qwertymine3 on Mon May 23, 2016 02:25, edited 1 time in total.
Avatar by :devnko-ennekappao:
- paramat
- Developer
- Posts: 3700
- Joined: Sun Oct 28, 2012 00:05
- GitHub: paramat
- IRC: paramat
- Location: UK
Re: What can cause these shadows?
https://github.com/duane-r/fun_caves/bl ... n.lua#L296
local p1 = vector.add(orpi, veci, this.of, this.rs / 2)
This can't add 4 values, this would cause the heightmap checks to fail, causing shadows. Try fixing that.
Here's now vector add works https://github.com/minetest/minetest/bl ... or.lua#L86
We had a similar problem in core mgv6, overgenerated large caves were being generated above ground and the dark air was causing lighting bugs:
https://github.com/minetest/minetest/issues/1190
https://github.com/minetest/minetest/pull/2410
local p1 = vector.add(orpi, veci, this.of, this.rs / 2)
This can't add 4 values, this would cause the heightmap checks to fail, causing shadows. Try fixing that.
Here's now vector add works https://github.com/minetest/minetest/bl ... or.lua#L86
We had a similar problem in core mgv6, overgenerated large caves were being generated above ground and the dark air was causing lighting bugs:
https://github.com/minetest/minetest/issues/1190
https://github.com/minetest/minetest/pull/2410
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: What can cause these shadows?
burli, change set_lighting and calc_lighting to:
Tested with fun caves, no issues seen in my test senario
Code: Select all
vm:set_lighting({day=0,night=0},{x=minp.x,y=emin.y,z=minp.z},maxp)
vm:calc_lighting({x=minp.x,y=emin.y,z=minp.z},maxp)
Last edited by qwertymine3 on Mon May 23, 2016 03:19, edited 5 times in total.
Avatar by :devnko-ennekappao:
Who is online
Users browsing this forum: No registered users and 2 guests