Hi, i have some doubts about pretty easy stuff like transformations. So, here is my questions.:

I have one light vector (0.5, 0.0, -1.0) in world space and i have one object that is placed at (0.5, 0.0, -3.0). To transform the light vector(world space) to objec space i’m doing this:

(Tx, Ty, Tz) = (0.5, 0.0, -3.0) - (0.0, 0.0, 0.0) resulting in (0.5, 0.0, -3.0) which is the object coordinates. Now i build a matrix like this:

Tx = 0.5;

Ty = 0.0;

Tz = -3.0;

1 0 0 Tx

0 1 0 Ty

0 0 1 Tz

0 0 0 1

and then i mutiply the light vector(in world space) with that matrix.

The new(transformed) light vector should be one “line” from object space to ligth coordinates, if so than the new(transformed) light vector should be (0.0, 0.0, 2.0) and doing that transformation with the matrix this isn’t the result.

Anyone to get me clear with this please ?

Thanks