Dead Hackers Society
Other BBSes »

Silly Venture 2023 WE

GERP 2024

Sommarhack 2024
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
3D backface culling 3rd
Posted by: ROGer Jul,02.2022-19:19 

My question would be about 3D backface culling and in particular about the reverse transformation of the camera(location vector). As far as I've understood you have to treat your camera the opposite way as compared to your object.

If you e.g. rotate your object around the axes like that:
z 30 deg, y 40 deg, x 20 deg

then the order and angles for the rotation of the camera should look like that:
x -20 deg, y -40 deg, z -30 deg

For using an ordinary 12muls 3D rotation it's obvious how the reverse transformation can be achieved. But how would it work and look like for a 3x3 3D rotation matrix? Would it be simply to combine the separate rotation matrices around the axes in the opposite order?
For example, if you created your 3x3 3D rotation matrix for the object by combining the separate rotation matrices around the axes (M1 = z rotation matrix, M2 = y rotation matrix, M3 = x rotation matrix) like that:

M1*M2 = A
A*M3 = B -> final 3x3 3D rotation matrix for object

would the reverse transformation for the camere work like that?:

M3*M2 = A
A*M1 = B -> final 3x3 3D rotation matrix for camera

(I guess I am too naive?!)

Though, if I think about it, the creation of a separate 3x3 3D rotation matrix and its usage for rotating a single point (-> the camera) would consume more muls than an ordinary 12 muls 3D rotation.
Anyway, would be cool to know how the reverse transformation of a 3x3 3D rotation matrix can be achieved.

[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
3D backface culling ROGer Jul,02.2022-18:59
  3D backface culling 2nd ROGer Jul,02.2022-19:15
    3D backface culling 3rd ROGer Jul,02.2022-19:19
      Re: 3D backface culling 3rd tat Jul,04.2022-10:15
        Re: 3D backface culling 3rd ROGer Jul,05.2022-13:58

Reply to this message
Anti-troll code:


What's the anti-troll code?
That's your personal code to be able to add comments and messages on the site.
Don't have a code or forgot it? Fix it here.
© 1994-2023 Dead Hackers Society Contact: Anders Eriksson