paulwedeck / settlers-remake

A Remake of "The Settlers III" for Windows, Linux, Mac and Android
MIT License
116 stars 18 forks source link

Amazon Stock shadow seems to mix in windmill #54

Open HiranChaudhuri opened 2 years ago

HiranChaudhuri commented 2 years ago

The Amazon stock shadow is not related to the building elements. It looks more like the windmill animations were reused as shadows.

Screenshot from 2022-06-15 16-47-47

Here is some data about my system:

OS: Linux 5.13.0-48-generic
JVM: OpenJDK 64-Bit Server VM 16.0.1+9-Ubuntu-120.04
Settlers Remake: Workflow Run 195
paulwedeck commented 2 years ago

Yes, it has the wrong shadow. There is a mechanism to correct the shadows. Just look at the ShadowMapping interface

HiranChaudhuri commented 2 years ago

Apparently, the DAT File viewer is no help for finding shadows. So I had to have a look at the exported graphics.

It seems the file found in graphics/43/settlers/014/000_shadow.png is the best match for the Amazon stock. But I would not know how to perform a change similar to what you have done for the other mappings. So let's check on.

The shadows for the mill are also wrong. Currently they remind me of the tower?

Screenshot from 2022-06-16 08-32-09

And the tower - umm, yes.

Screenshot from 2022-06-16 08-33-39

The building editor is proving it's value. :-)

HiranChaudhuri commented 2 years ago

With that patch it is better than before. Now it looks strange that

How can that be fixed?

paulwedeck commented 2 years ago

search for MILL in MapObjectDrawer

HiranChaudhuri commented 2 years ago

It seems like this line limits to displaying a single image as shadow.

Now regardless of what I tried to render the sequence images' shadows I still do not get a good result. Hence I believe I need to better control the sequence and shadow loading mechanism - can you provide some help there?

paulwedeck commented 2 years ago

Has every frame of the mill animation a proper shadow? If yes, then you should just draw the images with draw and remove the shadow part.

HiranChaudhuri commented 2 years ago

No, just a few frames seem to have shadows attached. The animation is too fast for me to really see them. I took the effort to check the latest release 6.0.1 alpha. In there the mills do not spin their shadows anyway - across the civilizations. So we can consider that to be a different issue, and the solution I have so far is an improvement already.

HiranChaudhuri commented 2 years ago

I have extended the BuildingCreator with functionality so it can (rudimentally) show an animation. Now it becomes evident that the mill shadows in the game do not rotate at all but they could/should.

For the roman mill it looks ok (although I am puzzled watching the show). The asian one seems to rotate in contradiction to it's shadow. The egyption is ok. The amazon one is lacking shadows.