Problem - Ambient Light Persists After Light Source Removed

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

Problem - Ambient Light Persists After Light Source Removed

by LazyJ » Sat Sep 29, 2012 21:31

I'm developing an underground area. Using worldedit I put searchlights (lights mod) across the entire ceiling.

But then I wasn't able to place any nodes/blocks on the floor. When I tried the node would disappear. The only way to place a node was to fly up and punch a section of searchlights off.

I got tired of doing this so I used worldedit again to replace the searchlights with the default torches.

OK, now I can place nodes on the floor. However, I noticed something curious during the transistion between searchlights and torches - even though the light source was gone the ambient light persisted.

To further test this I removed all the lights from the ceiling.

The underground area should have gone pitch black but instead it was bright as day. Also, the stone ceiling now has a checkerboard light effect.

I've tried replacing the stone ceiling with different nodes, even air, but the ambient light and the checkerboard effect still persist.

I've attached a screenshot to help better illustrate.

(NOTE: I turned the "smooth lighting" option off in the settings for a bump up in speed. Turning smooth lighting off and on didn't fix the problem.)

Any ideas?

Thanks.

Image
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sat Sep 29, 2012 21:47

lighting is not updated on light source changing, but on node changing.

Restart the game, or place some nodes around there
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Sat Sep 29, 2012 22:09

Same problem in my walking-light mod. I had to remove the light node, replace it with a non-transparent node (cobble) and replace that with air.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sat Sep 29, 2012 22:32

should be two new lua functions added.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.force_update(pos) -- does all the active block stuff at pos

minetest.force_update_light(pos) -- re-does light rendering in that zone
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Sep 30, 2012 07:57

+1
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Tue Oct 02, 2012 13:15

rubenwardy wrote:should be two new lua functions added.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.force_update(pos) -- does all the active block stuff at pos

minetest.force_update_light(pos) -- re-does light rendering in that zone



Added to the walking_light mod or as a seperate init.lua file?

I copy/pasted the lines (as is) into the walking_light mod's init.lua and Minetest refused to run when it tried to load that mod.

I don't understand Lua well enough yet to implement this myself. If you wouldn't mind, please post where and how these lines are to be added.

Thanks.
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Oct 02, 2012 13:37

LazyJ wrote:
rubenwardy wrote:should be two new lua functions added.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.force_update(pos) -- does all the active block stuff at pos

minetest.force_update_light(pos) -- re-does light rendering in that zone



Added to the walking_light mod or as a seperate init.lua file?

I copy/pasted the lines (as is) into the walking_light mod's init.lua and Minetest refused to run when it tried to load that mod.

I don't understand Lua well enough yet to implement this myself. If you wouldn't mind, please post where and how these lines are to be added.

Thanks.

The functions dont exist. Its a feature request from rubenwardy.
 

User avatar
GloopMaster
Member
 
Posts: 213
Joined: Wed Aug 01, 2012 18:03

by GloopMaster » Tue Oct 02, 2012 14:06

uh... you people do know you can directly call nodeupdate(pos), right...?
Meow.

That is all.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Oct 02, 2012 14:20

GloopMaster wrote:uh... you people do know you can directly call nodeupdate(pos), right...?

Thats only for falling nodes (make falling nodes fall): https://github.com/celeron55/minetest_game/blob/master/mods/default/init.lua#L1727
Last edited by PilzAdam on Tue Oct 02, 2012 14:20, edited 1 time in total.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 10 guests

cron