Questions tagged [camera-matrix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Transformation matrix for non-pinhole/orthographic camera from point correspondences

I have two sets of 4 points each in world space, basically corners in the near plane and far plane of a virtual camera (correspondences known) , and I have the NDC cube stretching from/to [-1,1] in x/...
user avatar
  • 125
2 votes
1 answer
103 views

Is there a better, more elegant way of translating/rotating my camera in my 3d raymarched world or am I stuck with trigonometry?

What I am trying to achieve So I'm a fractal enthusiast and decided to build a 2D/3D fractal generator in WebGL using raymarching, with Typescript as scripting language. I've been a C#/Typescript dev ...
user avatar
0 votes
1 answer
81 views

How do I perform a perspective transform on a straight line?

I'm trying to make a software renderer, but I want to avoid creating extra triangles with clipping. For this I want to transform lines which compose triangles, instead of individual points. However I'...
user avatar
0 votes
0 answers
83 views

Mapping an image from one camera pose to another given a planar scene

I'm trying to map an image of a 3D object to another one from a different camera position. My assumption is that the pose change between two cameras is so small and the object is far enough from the ...
user avatar
0 votes
0 answers
55 views

How to get world coordinates from a 4X4 camera matrix

I have Intel T265 camera which has a camera coordinates system like following diagram: The camera system has two cameras and the center of the two cameras is the position of the camera system. The ...
user avatar
1 vote
1 answer
93 views

How to use trackball for rotating an camera matrix in eye frame

I have a QOpenGLWidget where I use camera transformation matrix(4,4), FOV and vectors Position(4), Up(4), Forward(4). I also have an ArcBall which I can use. I managed to implement zoom and pan by ...
user avatar
  • 111
1 vote
1 answer
96 views

Objects in depth buffer are always black (0.0)

My problem is exactly what titles and screenshot below says - rendered object depth value is 0.0 in depth buffer. I'm using DirectX 12. Matrices: ...
user avatar
0 votes
1 answer
373 views

Given two 3d vectors, find the rotation matrix between the two

So I am making a raytracer following the very helpful online book of Gabriel Gambetta but I stumble on the rotation matrix part. My linear algebra background is 3Blue1Brown video series "The ...
user avatar
0 votes
1 answer
374 views

Transforming a ray from camera space to world space

I am writing a Raytracer and generating rays from the camera. I have a working program but slightly confused about the linear algebra concepts involved in transforming the ray from camera space to ...
user avatar
0 votes
1 answer
334 views

How to calculate position from depth pass of the ZED camera?

I'm using the ZED 2 camera, and although the API provides a means of getting a point cloud position from a specific pixel, for my project I need to be able to perform this calculation myself from the ...
user avatar
0 votes
2 answers
113 views

Shear(?) matrix projection along Z (depth) axis

I'm creating a primarily 2d game (platformer perspective) with 2d background parallax layers. The parallax effect falls out of the fact that I'm positioning a bunch of layers in 3d and using a ...
user avatar
1 vote
0 answers
510 views

Intrinsic Matrix vs Perspective projection matrix

I was going through the camera matrix explained in the wikipedia article and understand how the matrix K \begin{bmatrix}f_x&s&x_0\\0&f_y&y_0\\0&0&1\end{bmatrix} is built. The ...
user avatar
  • 111
2 votes
1 answer
296 views

Difference between a spherical camera and a trackball camera

A spherical camera is pretty easy to define. We have an anchor point C the camera always looks at and a relative position P where the camera is, which can be expressed in spherical coordinates, ...
user avatar
  • 1,447
0 votes
1 answer
404 views

Can pixels on the image plane be mapped to world space coordinates?

I'm trying to learn the fundamentals of 3d computer graphics by writing a toy framework in WebGL. I'm currently working on mouse based camera controls. There are plenty of good resources in the ACM ...
user avatar
  • 103
1 vote
0 answers
270 views

Help with understanding the look-at function (the view matrix)

I've been reading this article about the look-at function. I don't understand the part when they're trying to inverse the matrix N. They say that R is orthogonal because all its row and column ...
user avatar
4 votes
1 answer
528 views

Camera Model View transformation in Ray Tracing

I am implementing my own simple ray tracing and I came across some sort of confusion. When defining the verticies in the world I multiply them by the modelView transformation system (the matrix ...
user avatar
5 votes
1 answer
515 views

Do straight lines always remain straight when projected with a perspective camera?

If I have a straight line in 3D space and I use a camera matrix to do a perspective projection into a 2D plane/screen will the resulting line always be straight too? If I project the start point and ...
user avatar
  • 53
4 votes
1 answer
173 views

Modify camera matrix so that it renders a "chunk" of the frustum

Given a perspective projection matrix. How can one from it derive a set of matrices representing "chunks" of the viewport? So that the rendered chunks can be "stiched" to form an image "chunk times ...
user avatar
  • 41
0 votes
1 answer
540 views

Translate an arcball camera upwards or left-right

This problem is giving me a really hard time. I'm always looking at the origin and have a camera that moves around it in an arcball mode. That part works beautifully: I'm calculating the camera ...
user avatar
1 vote
1 answer
78 views

`worldViewProjection` doesn't work for a single component

I have implemented a couple of classes which are drawn using shaders where the vertex position is always calculated the same way: ...
user avatar
0 votes
1 answer
585 views

How to rotate a camera?

So I am doing a simple FPS camera with openGL. I store the camera as 4 vector, a position vector, a lookAt vector, an up vector and a right vector. When the user presses a key, I create a rotation ...
user avatar
4 votes
1 answer
1k views

Inverse value in a Perspective Matrix

I am a new leaner of computer graphics. I'm trying to understand a code I found online and I got stuck in the following formula: ...
user avatar
  • 143
1 vote
2 answers
238 views

Is there something wrong with a column camera matrix?

I am writing a simple ray tracer. I was working on my camera matrix when I encountered a problem. When I changed the look vector, so that it headed down, the image, which was supposed to go up, ...
user avatar
3 votes
0 answers
203 views

Calculate Camera parameters and HandEyeCalibration

I'm trying to calculate camera paramters and a hand eye calibration (Transformation from camera to eye (display) coordinates) for rendering on a see-through HMD. I have already calculated a ...
user avatar
2 votes
0 answers
159 views

With OpenGL, is it correct to apply model transformation to rotate the camera?

Having taken a basic CG course, I remember that transformations are relative, so rotating the camera is identical to rotating the view in the opposite direction. Right now I want to implement camera ...
user avatar
3 votes
2 answers
6k views

Correcting my "look-at" matrix so that it works on non-camera objects?

I'm familiar with the "look-at" matrix and the goal of being able to rotate a Camera at a specific location towards a specified target. When I tell the ...
user avatar
3 votes
2 answers
2k views

My perspective projection is messed up?

So I've been messing with perspective projection matrices recently. I used numpy and GTK/Cairo to make a very small Python renderer. I'm very confused with the results I'm getting though. I took this ...
user avatar
  • 41
3 votes
1 answer
473 views

Inverted yaw angle in the view matrix

I'm trying to construct a FPS view matrix for my OpenGL renderer using yaw and pitch angles instead of the typical LookAt view matrix. The view matrix is the ...
user avatar
  • 156
4 votes
2 answers
140 views

Correctness of logical steps for create the matrix of viewing transformation

In general, I understand the creation of viewing transformation matrix, but I have my doubts. For example, let's say that a world coordinate (called $A$) has a center at $(1,1,1)$, and the view ...
user avatar
  • 321
2 votes
1 answer
357 views

Building a lookat camera matrix

I was reading this article and found something that caught my attention. They say they are using column-major for their matrices so, in the code they have under the section Look At Camera they ...
user avatar
  • 909