# Questions tagged [camera-matrix]

The tag has no usage guidance.

43 questions
Filter by
Sorted by
Tagged with
10 views

### Quaternion.toAxisAngle to glmatrix rotation

Any suggestion . What ever i try i got some defect in visual presentation of rotation. This is source. ...
• 101
44 views

### Rotating a set of cameras to look at a rotated object

I'm trying to use Instant NGP on a synthetic image dataset. I have image sequences of a moving object with the following information: I have the object's xyz and the camera's xyz positions in a void. ...
• 1
84 views

### Is it possible to scale a view matrix?

My world has the base unit of 1024. Each tile is 1024x1024 units. When the camera is at the center of a tile, the tile ranges from -512 to 512 in view space (no rotation). Does it make sense (and is ...
• 173
28 views

• 151
1 vote
67 views

### Unknown array of floating point numbers. View matrix?

I want to control the camera in an old game using head tracking (TrackIR, opentrack, etc.), such control was not provided by the game engine. I'm trying to find the camera coordinates and rotation ...
• 13
1 vote
26 views

### A fresh perspective confusion about a paragraph

I am trying to re-implement the paper "A fresh perspective" In this paper there is one paragraph on secion 2 that reads: Usually, $z_s = z$ is the depth value of the point $P$, unchanged by ...
• 1,706
1 vote
63 views

### Inverting perspective projection doesn't yield frustum?

I have a cube with 8 vertices representing the $[-1,1]^3$ cube vulkan uses for device coordinates. The perspective projection matrix takes a frustum and maps it onto this cube. It thus makes sense ...
• 1,706
1 vote
85 views

### Mapping a box to an inverse frustum

I have a non AA, non cubic, box living happily in 3D. I have a frustum defined by 2 squares. one square is the square defined by [-1, 1]^2 and the other square can have any size, there is also a ...
• 1,706
61 views

### Camera Perspective of 2D X/Y Plane

I'll start with the coordinate system I'm trying to use: If I were standing on the ground, facing north, the x axis is a line moving from the west to the east (positive X is east). Positive y is ...
• 101
51 views

### 3D projection Axis inversion problem (Java/Processing)

Unfortunately, I always had problems with math and was never good at it. I'm currently trying to combine math with my knowledge and my passion for programming. Brief introduction: In math, we have ...
157 views

### Finding Camera projection matrix from known input and output

Lets say I have a rectangle with known coordinates in 3D scene, and I'm projecting it using pin point camera to the plane (screen). You can imagine it deforms on the screen per camera transformation ...
1 vote
202 views

### Understanding camera of a CPU raytracer from "Ray tracer challenge"

I am following a book "Ray tracer challenge" by Buck, but it doesn't explain anything. The code works, but I don't properly understand, why. The code is as follows: ...
• 121
79 views

### Camera model for rendering the viewport as a window frame?

I want to render as if someone is looking at a landscape through a window, adjusting for the viewer's head position. The landscape is easy enough (just a distant plane), but I'm not sure how to ...
1 vote
393 views

### What projection matrix and world transformation do I need to have an isometric projection?

I'm doing my own engine in college to display a wireframe on screen with an isometric projection but I literally can't find any literature about maths behind doing it by hand just for game engines ...
• 111
248 views

### Is it possible to make a projection matrix to not project in the center?

I have the following projection matrix: and I need to make a hole in the center of my matrix, something like that: (I don't want to project a custom W and H) Is that possible ? Thanks.
234 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 ...
237 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'...
• 137
234 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 ...
• 101
1 vote
250 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 ...
• 111
1 vote
305 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: ...
3k 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 ...
• 103
1k 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 ...
772 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 ...
272 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 ...
1k 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 ...
• 121
751 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, ...
• 1,706
824 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 ...
• 103
1 vote
565 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 ...
837 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 ...
810 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 ...
• 53
275 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 ...
• 41
673 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 ...
1 vote
84 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: ...
• 27
1k 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 ...
2k 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: ...
• 143
1 vote
288 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, ...
215 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 ...
• 131
168 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 ...
• 121
7k 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 ...
• 166
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 ...
• 41
571 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 ...
• 156
169 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 ...
• 321