What can cause these shadows?

User avatar
paramat
Developer
 
Posts: 3550
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: What can cause these shadows?

by paramat » Mon May 23, 2016 03:07

burli what changes have you made to the v6 branch?

This may be worth trying in non-mgv6 mapgens:

vm:calc_lighting({x = minp.x, y = minp.y - 1, z = minp.z }, {x = maxp.x, y = maxp.y + 1, z = maxp.z})
 

User avatar
qwertymine3
Member
 
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: What can cause these shadows?

by qwertymine3 » Mon May 23, 2016 03:26

paramat wrote:burli what changes have you made to the v6 branch?

This may be worth trying in non-mgv6 mapgens:

vm:calc_lighting({x = minp.x, y = minp.y - 1, z = minp.z }, {x = maxp.x, y = maxp.y + 1, z = maxp.z})


You need to change set_lighting too - as is setting lighting in the emerge area, which is not being re-calculated
Avatar by :devnko-ennekappao:
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: What can cause these shadows?

by burli » Mon May 23, 2016 04:39

Slow down guys, I just get out of bed :-D

I already fixed the bug with vector.add(). There were large caves in the sky. I fixed this and banned them to -100 and below. I also fixed some other bugs. But nothing removed the shadows

I made the caves visible by replacing cobble and wood instead of air. See this screenshots
viewtopic.php?f=9&t=14494&start=25#p217803

I will try your suggestions later
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: What can cause these shadows?

by burli » Mon May 23, 2016 06:01

qwertymine3 wrote:burli, change set_lighting and calc_lighting to:

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)


Tested with fun caves, no issues seen in my test senario


That's it. Great job. No more shadows here too. Thank you guys
 

User avatar
duane
Member
 
Posts: 1611
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: What can cause these shadows?

by duane » Mon May 23, 2016 10:59

That's interesting. Burli, what happens if you just remove the set_lighting call altogether? I did that with fun_caves/master since it didn't seem to be necessary anyway, and (perhaps coincidentally) haven't seen any shadows afterward. set_lighting seems to be a waste of cpu time unless you're actually changing ground level.
Believe in people and you don't need to believe anything else.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: What can cause these shadows?

by burli » Mon May 23, 2016 11:07

duane wrote:That's interesting. Burli, what happens if you just remove the set_lighting call altogether? I did that with fun_caves/master since it didn't seem to be necessary anyway, and (perhaps coincidentally) haven't seen any shadows afterward. set_lighting seems to be a waste of cpu time unless you're actually changing ground level.

Still no shadows after a short test. Have not much time. Will try a more detailed test later
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: What can cause these shadows?

by burli » Mon May 23, 2016 20:50

Ok, I played a while and made some other tests with the mod. Never saw any unwanted shadows.

I guess this will help future modders
 

User avatar
paramat
Developer
 
Posts: 3550
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: What can cause these shadows?

by paramat » Wed Jun 01, 2016 21:17

Interesting.

> set_lighting seems to be a waste of cpu time unless you're actually changing ground level.

If you use the mapgen flag 'nolight' then you don't need 'set lighting 0, 0', otherwise it's essential to remove the previous light values calculated for the core mapgen terrain.
if a mod alters a world then lighting needs to be set to 0 in the volume before running 'calc_lighting' in that volume.
 

User avatar
duane
Member
 
Posts: 1611
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: What can cause these shadows?

by duane » Sun Jun 05, 2016 09:38

paramat wrote:Interesting.

If you use the mapgen flag 'nolight' then you don't need 'set lighting 0, 0', otherwise it's essential to remove the previous light values calculated for the core mapgen terrain.
if a mod alters a world then lighting needs to be set to 0 in the volume before running 'calc_lighting' in that volume.


In the cases I've been working with lately, I'm changing things underground, with the (mapgen) cave generation turned off, so I think the game is setting the lighting to zero anyway, since it spawns nothing but stone and ore.
Believe in people and you don't need to believe anything else.
 

User avatar
paramat
Developer
 
Posts: 3550
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: What can cause these shadows?

by paramat » Sun Jun 05, 2016 11:57

Yeah. Just mese block glows so that's the only subtle glow that will linger.
 

Previous

Return to Problems



Who is online

Users browsing this forum: Google [Bot] and 4 guests