Hey everyone! Looking for some general help on calculating scale. I am using Unity for this project. I have four ship images (special thanks to @Rivaldragon). The smallest I would like to use as my 1:1. It is the Vanguard (37 meters in length). The Sabre is 26 meters, the Avenger is 19 meters, and the Hornet is 22.5 meters. Can anyone help me figure out how to do the calculations? (If you do them yourself and post that is fine, but I would like to learn how you did it as well for future reference.)

Hi @Kingdomseed,

Can you explain what it is you are trying to achieve?

For example, do you have a set of images that are all the same size, but, some should be smaller/larger based on your Vanguard specification, and you want to know by how much to scale each individual image?

Or something else?

The image that ought to be the largest scale-wise is the smallest resolution. I would like to downscale the images to match the size of the smallest image. So I want to know, is the Avenger for example, .2 or .3 the size of the vanguard, etc. @Rob

Youâ€™ll have to excuse me as Iâ€™m incredibly tired and replying on my phone, so please excuse any typosâ€¦

Based on what you have said, wouldnâ€™t the first step then be to establish how many pixels to metres in your smallest image. You didnt state the sizes, but if for example the smallest image was 100px representing the 37m length, wouldnâ€™t you divide 100 by 37â€¦

100 / 37 = 2.7 (approx)

So, each pixel represents 2.7m

Now, repeat for the next imageâ€¦ lets say its 250px for the 26m ship.

250 / 26 = 9.62 (approx)

Now.we want to make the number of metres per pixel on the second image equal that of the first;

9.62 / 2.7 = 3.56

So we would need to resize the image to be;

250px / 3.56 = 70.22

These two images would now represent their scale based on their length in metres. You would then repeat for the other images.

If you dont want to just reaize the images but scale them via Unity for example we need to determine the percentage difference between the 250px and the 70.22px.

250px / 100 = 2.5, thus 1% = 2.5px

therfore

70.22 / 2.5 = 28.09%

As a scale of 1 represents 100% of the image, set the Sabre (26m ship) to be .28

I think this will work. You will of course need to consider the other axis also so that the aspect ratio is maintained.

Hope the above is right and helpsâ€¦

Thank you so much! Will give this a shot next week when I have a little more time during the break. I really appreciate it!

Youâ€™re more than welcome - let me know if itâ€™s about right, I was almost asleep when I responded by my mobileâ€¦ so either I will feel awesome, or I will know not to respond when drowsy