Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Terrain lighting opposite of sun location #4749

Closed
wzdev-ci opened this issue Feb 15, 2018 · 20 comments
Closed

Terrain lighting opposite of sun location #4749

wzdev-ci opened this issue Feb 15, 2018 · 20 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by Berg


take your pick on which is wrong trucks shadow or terrainb


Issue migrated from trac:4749 at 2022-04-16 13:03:26 -0700

@wzdev-ci
Copy link
Contributor Author

Berg uploaded file shadows.png (286.7 KiB)

showing shadows
shadows.png

@wzdev-ci
Copy link
Contributor Author

Berg commented


Also the_cybersphinx tracked the code spot down can this be changed to suit the truck shadows
[10:04] the_cybersphinx Berg: src/display3d.cpp line 1149.

@wzdev-ci
Copy link
Contributor Author

Berg commented


It seems changing
const Vector3f theSun(225.0f, -600.0f, 450.0f);
to
const Vector3f theSun(225.0f, -600.0f, -450.0f);
it inverts the suns direction on both leaving the result opposite to what we had but also no good.

@wzdev-ci
Copy link
Contributor Author

Forgon changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Forgon changed resolution from `` to duplicate

@wzdev-ci
Copy link
Contributor Author

Forgon changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Forgon changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Forgon commented


Unfortunately, I must close this ticket. It is a duplicate of ticket #4744.

@wzdev-ci
Copy link
Contributor Author

Berg commented


This has more info leave it open

@wzdev-ci
Copy link
Contributor Author

Berg changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

Berg changed resolution from duplicate to ``

@wzdev-ci
Copy link
Contributor Author

pastdue changed type from bug to patch (an actual patch, not a request for one)

@wzdev-ci
Copy link
Contributor Author

pastdue commented


And here is a tentative patch: https://patch-diff.githubusercontent.com/raw/Warzone2100/warzone2100/pull/142.patch

Testing and feedback is appreciated.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 1, 2018

Berserk Cyborg commented


Looked through several maps and saw nothing immediately worrisome. Overall, nice job. The top of cliffs can look somewhat darker than normal, however, that existed before this patch anyway (the skirmish map Bloat(5p) shows it well).

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 1, 2018

pastdue commented


@BerSerK Cyborg: Yep, the only thing the patch modifies is the sun vector used for calculating terrain lighting / shadows. So any other terrain lighting / drawing behavior should be unchanged. Thanks for giving it a test!

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 4, 2018

Berserk Cyborg changed priority from normal to major

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 4, 2018

Berserk Cyborg changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 4, 2018

Berserk Cyborg changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 4, 2018

Berserk Cyborg changed title from shadows falling wrong way to Terrain lighting opposite of sun location

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Mar 4, 2018

Berserk Cyborg commented


Merged. It recalculates lighting when changing the sun position so I see nothing wrong here.

ec8a386f1e65246de3807f15ec510236dd652597 and c68a43790161e69abf5053ef21a9150b2d131ae2.

@wzdev-ci wzdev-ci closed this as completed Mar 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant