Is it possible to transform a vector from 1 model space to another model space without transforming it to world space first?

138 Views Asked by At

Normally, I would transform a vector from a model space back to world space with a matrix, then transform the resulting vector from world space to the other model space. I am wondering if it is possible to skip world space and transform the vector directly from one model space to another.

1

There are 1 best solutions below

0
On

Yes, though how easy it is depends on what you mean by "world space".

Is the transformation from the first model space to the world space is linear, and the second transformation is also linear, then this will be easy.

Suppose that you get from model space 1 to world space by multiplying by a matrix A. And then you get from world space to model space 2 by multiplying by a matrix B. Then the math looks like this:

\begin{align} w &= A v_1 \\ v_2 &= B w \\ &= B( Av_1) \\ &= (BA) v_1 \end{align}

So you see you can get from model space 1 to model space 2 by multiplying by the matrix $BA$.