Jump to content

How to Scale on one dimension


Recommended Posts

You do it like this:

// --- asset parameters ---

MODEL

{

model = JonzCo/JonzCo_Fuel/jzfueltank

position = 0.0, 0.0, 0.0

scale = 0.6, 0.6, 0.6

rotation = 0, 0, 0

}

I haven't played with position or rotation but I can tell you that while scale X, Y, Z will work and will work in 1 dimension, you will need to play them about a bit because it isn't 100% one dimensional, more like 80/20...

Link to comment
Share on other sites

It's not so simple as that unfortunately.

There is a glitch that exists between MODEL{scale}, PART{scale}, and PART{rescaleFactor}

assuming:


PART{
MODEL{
scale = X[sub]1[/sub], X[sub]2[/sub], X[sub]3[/sub]
}
scale = Y
rescaleFactor = Z
}

Y is always the same value.

and F is the actual scale that you end up with (Fn where necessary)

F=Z if X=1/Z

This is simple to follow but doesn't allow for X1!=X2!=X3 so it can only be used for uniform scaling

Alternatively, if Z=1 then Xn=√Fn, or X=1 then Z=√F, but there's no advantage to the X=1 method

So say you want a part to be F=2, then you'd want X=0.5 and Z=2, keeping it nice and simple

But if you want to make a part that is twice as long but the normal width (F1=1, F2=2, F3=1), then you want Z=1, X1=1, X2=1.4142135623730950488016887242097, X3=1

putting that back into the code


PART{
MODEL{
scale = 1, 1.4142135623730950488016887242097, 1
}
scale = 1
rescaleFactor = 1
}

Obviously this is a bit problematic because as far as I can tell square root 2 goes on forever so exact sizing is effectively impossible, but you can get pretty close.

Link to comment
Share on other sites

It's not so simple as that unfortunately.

There is a glitch that exists between MODEL{scale}, PART{scale}, and PART{rescaleFactor}

It all depend both from "3dmodel tool" unit & scaling + unity scaling before the .mu you want to work with have been exported. Depending how the part has been initiailly made regarding this you can quickly get the multiplier/divider for {model ... scale = x,y,z ... } the way you want

Edited by WinkAllKerb''
Link to comment
Share on other sites

The 3D model's scaling is entirely unimportant as it is handled by PART{scale} and will not vary, this is entirely an interaction between PART{MODEL{scale}} and PART{rescaleFactor}, where PART{scale} serves to convert the model's native unit into meters.

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...