Jump to content

Rescaling a cube maintaining texture aspect ratio


Message added by TopicLocker3000

This topic was automatically locked after 6 months of inactivity. If you are the topic owner, please contact a moderator to have it unlocked.

Recommended Posts

When you load a cube and give it a texture and rescaling it, it stretches the texture. Would be useful to select between stretching or mantaining aspect ratio.

I've tried using the "texture horizontal repeat" thing but I can't make things to match. I don't get the relation between scale of the cube and number of repeats.

Link to post
Share on other sites

Quote

This is why Modelbench exist, you can set a cube's size relative to the texture size, adjust the SIZE not SCALE

Well today, in Mine-imator its different. Grab your calculator and make some calculations!

On a cube/cylinder/sphere/cone, 1 scale unit = 16px, so 1px is 1/16 units, which is 0.0625 and so on.

For example, if you scale a cube on X/Y/Z axis to 1.7, then you need to set the repeat number to 1.7 aswell (if the texture is 1:1).

If your texture is not 1:1, you need to calculate the texture's ratio relative to 1.
example, 16:9 is 1.777:1 how? 16/9 = 16/9 : 9/9 = 1.777:1. then set the cube's scale to that value, e. X=1, Y=1.777.

IF somehow you can't set it to 1, you need to calculate again. yes. (gonna use that 1.777)
example, X=0.8 and Y? its 1.777 x 0.8 which is 1.4216. and you get that value once again, yep its X=0.8, Y=1.4216.
or simply parent it to a folder and set its XYZ scale to 0.8.

Spoiler

GOD DAMN. I DIDNT THINK ABOUT PARENT'S INHERITANCE WHEN I CALCULATE THESE NUMBERS

This works on texture repeat aswell.

SO SIMPLE YEAH? wait, no. Dont forget about texture offset too, if you want center the texture, its half the repeat value, idk its going + or -.

I called these 'formula' as "Mine-imator's Relativity".

get it? no? its hard to explain.

Edited by niam
Link to post
Share on other sites

On 11/13/2021 at 8:07 PM, niam said:

Well today, in Mine-imator its different. Grab your calculator and make some calculations!

On a cube/cylinder/sphere/cone, 1 scale unit = 16px, so 1px is 1/16 units, which is 0.0625 and so on.

For example, if you scale a cube on X/Y/Z axis to 1.7, then you need to set the repeat number to 1.7 aswell (if the texture is 1:1).

If your texture is not 1:1, you need to calculate the texture's ratio relative to 1.
example, 16:9 is 1.777:1 how? 16/9 = 16/9 : 9/9 = 1.777:1. then set the cube's scale to that value, e. X=1, Y=1.777.

IF somehow you can't set it to 1, you need to calculate again. yes. (gonna use that 1.777)
example, X=0.8 and Y? its 1.777 x 0.8 which is 1.4216. and you get that value once again, yep its X=0.8, Y=1.4216.
or simply parent it to a folder and set its XYZ scale to 0.8.

  Reveal hidden contents

GOD DAMN. I DIDNT THINK ABOUT PARENT'S INHERITANCE WHEN I CALCULATE THESE NUMBERS

This works on texture repeat aswell.

SO SIMPLE YEAH? wait, no. Dont forget about texture offset too, if you want center the texture, its half the repeat value, idk its going + or -.

I called these 'formula' as "Mine-imator's Relativity".

get it? no? its hard to explain.

There's always a workaround by firing up the calculator and doing some calculations, the idea is that the program does it by itself. You select a size you want work with. Then you can resize the cubes as needed and the texture aspect ratio would remain so all the different parts remain cohesive and fit in within the rest of the cubes in the same aspect ratio of the same texture, otherwise it's insanity as you need to create new instances of cubes for each part, calculate the stuff and so on.

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...