# Rotations and Scaling to Translations

Status
Not open for further replies.

#### SVT2002

Level 2
Hello,
Mdlvis can transform all the non-linear translations, rotations and scalings to linear.
My question is:can I transform all the linear rotations and scalings to linear translations?

#### GhostWolf

Level 29
Your question doesn't really make sense - rotating and scaling something is not the same as translating it, since the former changes orientation.

If you are looking for a way to change this so that the vertices move to the same relative offset, but don't change orientation, then you can rotate and scale an x axis unit vector [1, 0, 0], and add the resulting vector to your vertices (no clue how this will help with anything though).

#### SVT2002

Level 2
If i have a bone,what is described as a b vector,the rotation of the vector by alpha degrees over t frames is an alpha/t rotation per frame.I want to convert these unit rotations to translations of each frame.
For example, if I want to rotate b with 90 degrees over 3 frames,I must rotate 30 degrees per frame(because I use linear rotation).
I want to find that translations for frame 1,2,and 3,which when I use to translate the vectors endpoint,I become the same vectors at the end of the frames,as when I rotate.

Last edited:

#### GhostWolf

Level 29
Yes, that's the axis unit vector thing. Take the vector (1, 0, 0), rotate it and scale it however you want, and then add the result to all of your vertices.
This of course translates the whole mesh, and will not change the orientation.
Again, I have no clue in what context this helps you.

#### SVT2002

Level 2
My goal is to replace the rotations and scalings with translations,to change the orientation with translating with special vectors.

On the first picture,I translate the b bone over 3 frames with 90 degrees.The b'1 vector is generated after the first frame,the b'2 vector after the second,and the b' vector is generated at the end.

On the second picture,instead of rotating it,I translate the b vector with v1,v2,and v3 vectors.At the end of frame one,there is a b'1 vector,what is described as b + v1,and is equal with the b'1 vector on the first image.
The second frame add v2 to b'1,instead of rotating it with 30 degrees,and the third adds v3 to b'2.
And at the end,b vector is rotated with 90 degrees over 3 frames without using rotations.
The goal is to find these v1,v2,v3 vectors,and replace the rotations with translations with them.

#### GhostWolf

Level 29
I already told you twice how to do this, and you still didn't explain why you need this (just out of curiosity).

If however you need what you just described, then simply take the results of your rotations, and the difference between each one and the previous is your translation.
JASS:
``````b'1_translation = b'1_rotation - b
b'1 = b + b'1_translation

b'2_translation = b'2_rotation - b'1_rotation
b'2 = b + b'1_translation + b'2_translation

...``````

Last edited:

#### SVT2002

Level 2
JASS:
``````b'1_translation = b'1_rotation - b
b'1 = b + b'1_translation

b'2_translation = b'2_rotation - b'1_rotation
b'2 = b + b'1_translation + b'2_translation

...``````
I understand,what you described. My question was inexact: is there any program what do it automatically? Sorry

In response to your question : My first idea was,if I want a simply and fast interpreter for a high number of models,it would be not so nice, but fast to use only linear translations.And the program would be more simply.But the model size would be incredibly large, so I was only curious.
And one more question: where can I use your model viewer? I red a lot of topics but all the links I found was wrong.

#### GhostWolf

Level 29
I didn't get it, is the point to reduce calculations by avoiding the more expensive rotations?
If that's the case, then again, translating is not the same as rotating - the latter changes the orientation of your vertices.
There probably isn't any tool that does this, because I can't understand how it's useful.

As to the viewer, there is the public version used by the hive, which you can get to by clicking the "View in 3D" button on model pages.
There is a development version available, but I didn't update it in a while (and so far it doesn't support some of the things the old one does for MDX models specifically).
My github has the most updated code if you care.

#### SVT2002

Level 2
Thanks for your help

Status
Not open for further replies.

Replies
8
Views
1K
Replies
5
Views
1K
Replies
1
Views
491
Replies
2
Views
1K
Replies
0
Views
550