Open sirdoombox opened 4 years ago
I'll let @Endebert answer properly, but i had to analyse this part of the calculation in Endebert's code.
Short answer : the SDK maps are already proportional in pixels to their real size in game, you have to calculate the ratio between your canvas where you draw the map and the image file.
For my fork of this project (https://github.com/sh4rkman/MSMC) i drawed a 250px*250px canvas, and applied to every distance calculated the ratio 250/map.height
I managed to find a slightly more consistent and accurate way in Post Scriptum (seeing as the SDK isn't out yet and the map image files are all 4096x4096) with training mode + commands
AppData\Local\PostScriptum\Saved\Logs\PostScriptum.log
1 unreal unit = 1cm
(however in one of the maps so far it's been 2 unreal units = 1cm
but common sense can help you figure it out)It's extremely labour intensive, but without the SDK it seems like it's the only way. As for incorporating heightmap data I don't think that's really doable as it stands, whether or not it has any meaningful impact I've yet to test.
Thanks for wanting to contribute! Here's my methodology:
x*px = y*100m
Of course, this isn't perfect. In this example, 1px = ~3,601m, so the estimated map size might be off +-4m, which I think is acceptable.
Now heightmaps are a different league, and can only be extracted with the Squad SDK. But we don't have that for Post Scriptum (I think; I don't own the game), so no height offsets for that game unfortunately.
@sh4rkman nice fork!
I'd like to contribute, but I have precisely 0 idea on how you go about making accurate map size calculations for Post Scriptum, is there a resource for the methodology available somewhere?