Page 1 of 1
[posila][0.16] Artillery shell shadow mismatches turret shadow
Posted: Mon Dec 18, 2017 2:11 pm
by Mooncat
Bug:
The shadow of artillery shell doesn't match the shadow of the artillery turret that shot the shell.
Steps to reproduce:
1) Start a game.
2) Place an artillery turret and give it some artillery shells.
3) (Optional) Slow the game down with /c game.speed = 0.1
4) Use artillery targeting remote to command the artillery turret to shoot.
5) Zoom in and observe the turret.
- Artillery Shell Shadow.gif (3.67 MiB) Viewed 5053 times
- Artillery Shell Shadow.png (97.5 KiB) Viewed 5053 times
Expected:
The shell should be shot from the cannon.
By the way, I love the infinity chest. Thanks!
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Mon Dec 18, 2017 8:27 pm
by orzelek
Tbh I would be a bit more concerned that bullet flies like rocket not like artilliery shell
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Mon Dec 18, 2017 8:55 pm
by posila
I am concerned about both
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Tue Dec 19, 2017 10:48 pm
by TruePikachu
My theory as to the cause of this bug is from how the lighting is set up in the render process -- it is configured to act as a point source, which causes distortion on the cast shadow. In effect, the artillery shell and cannon are being lit by two different light sources, which causes their misaligned shadows.
The proper fix to this would involve reconfiguring the entire render setup to use "sun" light sources (parallel beams) instead of "lamp" light sources (radiant beams), followed by ensuring that entity shadows are correctly aligned.
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Wed Dec 20, 2017 12:13 am
by Rseding91
TruePikachu wrote:My theory as to the cause of this bug is from how the lighting is set up in the render process -- it is configured to act as a point source, which causes distortion on the cast shadow. In effect, the artillery shell and cannon are being lit by two different light sources, which causes their misaligned shadows.
The proper fix to this would involve reconfiguring the entire render setup to use "sun" light sources (parallel beams) instead of "lamp" light sources (radiant beams), followed by ensuring that entity shadows are correctly aligned.
It's nothing near that complex. The cannon is one entity and the shell is something else with its own fake height of 3 tiles. It just doesn't line up with the fake height of the cannon because it was never meant to have a visible shell coming out of the cannon but someone thought it would be a good idea to add one last minute
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Wed Dec 20, 2017 1:10 am
by Ranakastrasz
Also the shell clearly turns like 30.degrees as soom as.it leaves the barrel.
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Wed Dec 20, 2017 8:05 am
by posila
That's what I thought orzelek means by flying like a rocket.
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Wed Dec 20, 2017 12:49 pm
by Ranakastrasz
posila wrote:That's what I thought orzelek means by flying like a rocket.
I was thinking it was homing like a rocket vs a grenade myself.
Re: [0.16] Artillery shell shadow mismatches turret shadow
Posted: Wed Dec 20, 2017 8:30 pm
by orzelek
Ranakastrasz wrote:posila wrote:That's what I thought orzelek means by flying like a rocket.
I was thinking it was homing like a rocket vs a grenade myself.
It's the trajectory.
It's very un-artilliery like. It's more like railgun with the exception that it turns.. thats more like homing missile
Re: [posila][0.16] Artillery shell shadow mismatches turret shadow
Posted: Tue Jan 16, 2018 1:03 pm
by posila
The shadow will be aligned properly in 0.16.17
I'll look into trajectory of the projectile ... sometime in future