opensoldat / polyworks

Map editor for the game OpenSoldat
https://forums.soldat.pl/index.php?topic=35195.0
MIT License
25 stars 8 forks source link

Support for 4K HD textures #6

Open ExHunter opened 8 years ago

ExHunter commented 8 years ago

If anyone knows, what exactly needs to be done here, please comment. Otherwise I will try to figure it out by myself.

urraka commented 8 years ago

When you create triangles it automatically calculates their texture coordinates with the assumption that 1 pixel = 1 map-unit. That was "alright" for the old 128x128 textures but the new ones end up too big and there's no easy way to adjust them. Currently, the workaround is to design the map using a smaller texture and then just switching to the high resolution one. This works because texcoords are normalized values, so texture size doesn't matter once they are calculated.

So, what we need is some way to configure a default texture scale or pixel ratio that is used when creating triangles (and by the "fix texture" tool). Ideally there would also be a tool for scaling the texture coordinates of any selected triangles.