(2023-04-10, 11:00)Florentin Wrote: So you want me to read in the values like this?
Code:const splittedLine = this.splitter(line, " ", 14);
let transform = new Matrix4();
transform.set(
parseFloat(splittedLine[5]), parseFloat(splittedLine[8]), parseFloat(splittedLine[11]), 0,
parseFloat(splittedLine[6]), parseFloat(splittedLine[9]), parseFloat(splittedLine[12]), 0,
parseFloat(splittedLine[7]), parseFloat(splittedLine[10]), parseFloat(splittedLine[13]), 0,
parseFloat(splittedLine[2]), parseFloat(splittedLine[3]), parseFloat(splittedLine[4]), 1
);
I use Threejs so the set method puts in the values row first into the matrix (I assume that's how you put the values into your matrix).
That results in an also incorrect result (see pic 1).
I think your reading of the values is wrong, because this is how i learned that you multiply homogeneous matrices and points the 3d space (unless you meant column first inserting into the matrix, cause then I'd be the same as I read in the values first but well that's because I made this post ):
Code:a b c x u
d e f y * v
g h i z w
0 0 0 1 1
Different libraries have different conventions for how the matrix entries are initialized and accessed. You should be able to call the decompose function on your matrix to double check that it's working properly. The translation, scale, and rotation vectors should match what you expect if everything is working properly. I would also double check the matrix multiplication itself since A*B != B*A in general.