Jump to content

Rescale a part on two axes only?


Tassyr

Recommended Posts

So I want to change a tank to be wider radius-wise, but not thicker vertically. I figure a 2m wide, 1m tall tank would be handy for 2m landers, is all. But I can't model worth a damn, so I was hoping to just rescale a part. Anyone know if this is possible?

I did something similar with the mod manager, but I'd kinda like to do this with just a single part.

Link to comment
Share on other sites

Unfortunately do the the square/x*y=1 bug if you want to scale a part differently along any axis, rescaleFactor must be equal to 1, and MODEL{scale=x,y,z} must be the square root of the value you actually want; and because rescaleFactor is blocked off you will have to manually reset node positions if rescaleFactor was not 1 to begin with, or you want an alternate part at a different scale, as scale and MODEL{scale} only impact the size of the model itself, not the position of nodes.

So assuming your part is correctly modeled so that (in Unity and beyond) Y+ = up

MODEL{

...

scale = 1.414213562, 1, 1.414213562

}

scale = 1

rescaleFactor = 1

would give you double the width at the same length... I think... It's a complicated place for a bug to exist but basically MODEL{scale=2,2,2} scale = 1 rescaleFactor = 1, does not give you a part that is twice as big.

Edited by Greys
Link to comment
Share on other sites

If you want to get really complex with the math it should be possible to still use rescaleFactor and MODEL{}

We know two things to be true on the matter.

Assuming the following


MODEL{
...
scale = X[SUB]1[/SUB], X[SUB]2[/SUB], X[SUB]3[/SUB]
}

scale = A

rescaleFactor = Y

and the scale you want it to be = Z

You should really never be messing with A, it exists to correct models that were not modeled in meter scale because Unity assumes everything to be in meters (if you modelled your part to be 20cm wide, that value is stored as 20, and Unity reads it as 20 meters, so A = 0.01 or something)

We know that if X â‹… Y = 1, you'll get Z (X>0, Y>0)

1oFjcdb.gif

http://www.wolframalpha.com/input/?i=1%3E%3DX%3E0%2C+Y%3E%3D1%2C+X*Y%3D1

And if you assume Y = Z, it becomes nice and easy

We also know that if Y = 1, Xn=√Zn

which allows you to have differing values for X1-3

And presumably, if X = 1, Y=√Z

So given those two things there should be some formula to have a Y ≠ 1 and X1 ≠ X2 ≠ X3 ≠ etc where Z is achieved.

Link to comment
Share on other sites

Sounds complicated, I really want a lengthened version of the orbus-21d from ganians Athena pack to use as as castor 30 for my Antares replica can someone make a .cfg for it?

Give me the radius and the lenght of your tanks and the number of sides you want on them and ill make it for you.

2m wide by 1 m height with 18 sides ? Thats okay ?

Write me a list of variants you want. I can't texturize them but i can modelize it easily.

Link to comment
Share on other sites

Give me the radius and the lenght of your tanks and the number of sides you want on them and ill make it for you.

2m wide by 1 m height with 18 sides ? Thats okay ?

Write me a list of variants you want. I can't texturize them but i can modelize it easily.

Honestly that'd be PERFECT. I'm just trying to make a quick descent fuel tank, is all :)

Link to comment
Share on other sites

Unfortunately do the the square/x*y=1 bug if you want to scale a part differently along any axis, rescaleFactor must be equal to 1, and MODEL{scale=x,y,z} must be the square root of the value you actually want; and because rescaleFactor is blocked off you will have to manually reset node positions if rescaleFactor was not 1 to begin with, or you want an alternate part at a different scale, as scale and MODEL{scale} only impact the size of the model itself, not the position of nodes.

So assuming your part is correctly modeled so that (in Unity and beyond) Y+ = up

MODEL{

...

scale = 1.414213562, 1, 1.414213562

}

scale = 1

rescaleFactor = 1

would give you double the width at the same length... I think... It's a complicated place for a bug to exist but basically MODEL{scale=2,2,2} scale = 1 rescaleFactor = 1, does not give you a part that is twice as big.

Wow that does suck. And it explains the problem I'm having with some KWRocketry parts. I decided to make duplicate tanks with different fuels in them. I did this:


MODEL
{
model = KWRocketry/Parts/Fuel/KW3mtankL1/model
scale 1.0, 1.0, 1.0
}
scale = 1.0
rescaleFactor = 1.0

And I'm getting a tank that is 25% larger than the original that it's based on. I did it this way because the config is in my personal tweaks folder and I'm not sure how else to do it from outside the original parts folder. What would I put in there to scale it to its original size?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...