Questions tagged [camera-matrix]
The camera-matrix tag has no usage guidance.
45 questions
0
votes
0
answers
18
views
Projection Matrix to Intrinsic parameters
I want to convert a Projection Matrix in the following form:
Where:
f = fov
a = aspect ratio = width / height
F = far plane
N = near plane
to the Intrinsic parameters matrix:
s = skew
(fx, fy) = ...
-1
votes
1
answer
34
views
Projecting Vectors (3D to 2D) Using Homogeneous Coordinates, With Known Camera Calibration
Suppose I have vectors in a 3D space (their starting points, dx, dy, and dz), and I would like to project them onto a camera, which I already have as a 3x4 projection matrix.
I can of course project ...
0
votes
1
answer
47
views
Why does Zooming in does not work with Projection Matrix but works in Real Life?
My goal is to project 3D bounding boxes to an image. For those who are not familiar with what 3 Dimensional Bounding Boxes are, they are basically boxes defined by eight corners encapsulating an ...
0
votes
1
answer
66
views
Generate camera trajectory with cameras' lookat following shape
I am trying with no avail to create a camera path that follows a lemniscate shape as shown in the figure.
I do it in 3D but just set the vertical dimension (y) to a fixed number so really is 2D. the ...
0
votes
0
answers
95
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.
...
0
votes
0
answers
138
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 ...
1
vote
1
answer
68
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 ...
1
vote
0
answers
29
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
vote
0
answers
74
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
vote
0
answers
101
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 ...
0
votes
0
answers
80
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 ...
0
votes
1
answer
55
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 ...
2
votes
0
answers
230
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
0
answers
225
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:
...
3
votes
1
answer
85
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
3
answers
721
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 ...
2
votes
1
answer
284
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.
2
votes
1
answer
268
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 ...
0
votes
1
answer
302
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'...
0
votes
0
answers
344
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 ...
1
vote
1
answer
292
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 ...
1
vote
1
answer
366
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:
...
0
votes
1
answer
4k
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 ...
0
votes
1
answer
2k
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 ...
0
votes
1
answer
859
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 ...
0
votes
2
answers
365
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 ...
2
votes
1
answer
2k
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 ...
3
votes
1
answer
897
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, ...
0
votes
1
answer
933
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 ...
1
vote
0
answers
658
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 ...
4
votes
1
answer
953
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 ...
5
votes
1
answer
938
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 ...
4
votes
1
answer
307
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 ...
0
votes
1
answer
690
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
1
answer
85
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:
...
0
votes
1
answer
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 ...
4
votes
1
answer
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:
...
1
vote
2
answers
305
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, ...
3
votes
0
answers
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 ...
2
votes
0
answers
169
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 ...
3
votes
2
answers
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 ...
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 ...
3
votes
1
answer
608
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 ...
4
votes
2
answers
181
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 ...
2
votes
1
answer
629
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 ...