| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 3 months |
| seen | May 18 at 13:23 | |
| stats | profile views | 0 |
|
Feb 23 |
comment |
Mapping 3D object coordinates to 2D screen coordinates with perspective projection I think the matrix multiplications are in the correct order. I'm not entirely sure but I think it has something to do with the last division of the x and y components by the z. Here's my most recent Camera3D class where I organise the matrices and render the points. Can you spot any errors that would cause the points to render in the opposite corner after passing the Z value of the camera (behind): pastebin.com/NGGHpqGv |
|
Feb 21 |
comment |
Mapping 3D object coordinates to 2D screen coordinates with perspective projection This is great but the problem I'm having is when the Z component is negative and supposedly out of the frame and behind the camera, it appears to just come back into the screen from the opposite corner of the screen. e.g. A point at coordinate 1:1:0 should be in the top right corner of the screen. If I increase its Z component it moves forward as expected, but if I decrease it, rather than moving behind the scene and not being rendered, it begins to move in from the bottom left hand corner towards the centre of the screen, in this example. |
|
Feb 20 |
awarded | Scholar |
|
Feb 20 |
accepted | Mapping 3D object coordinates to 2D screen coordinates with perspective projection |
|
Feb 20 |
comment |
Mapping 3D object coordinates to 2D screen coordinates with perspective projection Ah, it seems to be working now. Thanks to everyone for your help! Also, I'm not sure why but the X axis seems to be flipped for my coordinate system and I'm not sure why. Anyway, I'll hopefully figure out why that is. |
|
Feb 19 |
awarded | Student |
|
Feb 19 |
awarded | Editor |
|
Feb 19 |
revised |
Mapping 3D object coordinates to 2D screen coordinates with perspective projection deleted 4 characters in body |
|
Feb 19 |
asked | Mapping 3D object coordinates to 2D screen coordinates with perspective projection |