Tag Info

New answers tagged

0

Inside makeLookAt contains your error: Vector3f f = Util::normalize(center - eye); Vector3f u = Util::normalize(up); Vector3f s = cross(f, u); u = cross(Util::normalize(s), f); s is not normalized. It should be: Vector3f f = Util::normalize(center - eye); Vector3f u = Util::normalize(up); Vector3f s = Util::normalize(cross(f, u)); u = cross(s, f); // no ...


0

With rect_coordinate ranging from -1 to 1 and assuming sin/cos functions take radian as inputs, for each pixel in the rectangular texture do: color CubeToRectangle(vec2 rect_coordinate) { vec3 cube_map_coordinate; cube_map_coordinate.x = cos(rect_coordinate.x * PI * 2) * cos(rect_coordinate.y * PI); cube_map_coordinate.y = sin(rect_coordinate.y ...


1

You can look into the Perspective n Point problem. I think that's what this issue is officially called.


0

Well, getting 2d orientation from 3d points can be done by multiplying it with the world, view, and projection matrices. You could reverse these calculations. The thing is, you donĀ“t know depth. What you get is a line inside the viewing frustum , between the near and far clipping plane of the camera, that tells you where you see this point. But there is no ...


1

If You subdivide the line into CE and ED and the projection of the 2 lines combined will be the projection of the full line. Using that we split the line where it intersects the screen then EC' will be the resulting line and you ignore the ED part of the line. Current day graphics pipelines will do this automatically using frustum culling with the near ...


0

My meshes were being generated correctly. However they were not rendering to the camera. I had to change the mesh's scale's z value to any value less than 0f for it to render. I am closing this question and opening another to figure out why exactly this is.


0

You can make objects appear smaller or larger simply by moving the camera further or closer to them, so you will need to change the view matrix. However, since the numbers you are dealing with are potentially large, be sure to also fix the projection matrix for the near and far clipping plane values. Finally, note that astronomy pictures are often taken ...



Top 50 recent answers are included