kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
428 stars 21 forks source link

Converter seems to be working incorrectly #122

Closed Aidoneus closed 4 years ago

Aidoneus commented 4 years ago

Test case 1 Encountered on a different custom world, but here I've managed to reproduce the bug with simple height/material maps. I've included in the archive both the source maps and the resulting output.vmp. In the game I'm unable to pass under the "bridge", as if it was not there – and indeed there is none, when I am converting the resulting output.vmp back into images. I see an area of stripes on the lower level. Upper one somehow disappeared upon convertation.

Test case 2 Another archive with source images and resulting output.vmp. The problem here is that even though I am using two completely identical material maps, which are filled with single color, resulting world somehow have more materials, which can easily be seen if you convert the output.vmp back. As far as I've noticed – this only happens in places, where there are two layers.

So maybe these two bugs are somehow connected?

kvark commented 4 years ago

Thank you for filing this with great detail! I believe this is fixed with 1293df69f737f3e9e7f41b0596234c52874dbcfd

Screen Shot 2020-08-18 at 00 27 47

Please re-open without hesitation if you see more issues!

Aidoneus commented 4 years ago

Yeah, the "bridge" from the first example is functional now, thanks!

But now the issue described in the second case arises here. Bridge's upper level now have material 0 after conversion, for some reason. And there are a few areas of material 3, even though the source material images were filled with single color – that of material 1. Here I've uploaded an archive with the same source materials and what I've got after converting it back – which is what I see in the original game as well.

kvark commented 4 years ago

Thank you, I'll have a look! Note that you can attach zip files by just drag-and-dropping them into the comments.

kvark commented 4 years ago

Sorry, I made a small typo earlier. Things convert back and forth fine now in master. I added the roundtrip test in https://github.com/kvark/vange-rs/commit/79d53b2ace321bfa4a0423681d0c03f641f165bc make sure this isn't regressed.