Questions tagged [camera-matrix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
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. ...
Nikola Lukic's user avatar
0 votes
0 answers
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. ...
Thom's user avatar
  • 1
0 votes
0 answers
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 ...
Raildex's user avatar
  • 173
0 votes
0 answers
28 views

View system transformation by Ian Ashdown

I am reading this book about to code your own radiosity renderer by Ian Ashdown Book link There is a chapter about view-camera transformation, particularly the normalization process when he transform ...
arcollector's user avatar
1 vote
1 answer
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 ...
F4rrell's user avatar
  • 13
1 vote
0 answers
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 ...
Makogan's user avatar
  • 1,706
1 vote
0 answers
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 ...
Makogan's user avatar
  • 1,706
1 vote
0 answers
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 ...
Makogan's user avatar
  • 1,706
0 votes
0 answers
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 ...
Helpful's user avatar
  • 101
0 votes
1 answer
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 ...
mardari's user avatar
2 votes
0 answers
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 ...
Eduard Kovalets's user avatar
1 vote
0 answers
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: ...
Ave Milia's user avatar
  • 121
3 votes
1 answer
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 ...
Andrew Chatham's user avatar
1 vote
3 answers
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 ...
MiguelP's user avatar
  • 111
2 votes
1 answer
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.
Cosma Eduard's user avatar
2 votes
1 answer
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 ...
Arthur Visser's user avatar
0 votes
1 answer
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'...
user369070's user avatar
0 votes
0 answers
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 ...
Nick X Tsui's user avatar
1 vote
1 answer
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 ...
nocturne's user avatar
  • 111
1 vote
1 answer
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: ...
DirectX_Programmer's user avatar
0 votes
1 answer
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 ...
cassepipe's user avatar
  • 103
0 votes
1 answer
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 ...
Sahil Gupta's user avatar
0 votes
1 answer
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 ...
LocalStarlight's user avatar
0 votes
2 answers
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 ...
Joseph Humfrey's user avatar
2 votes
1 answer
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 ...
midi's user avatar
  • 121
2 votes
1 answer
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, ...
Makogan's user avatar
  • 1,706
0 votes
1 answer
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 ...
oorst's user avatar
  • 103
1 vote
0 answers
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 ...
tralf_strues's user avatar
4 votes
1 answer
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 ...
Abdullah Emad's user avatar
5 votes
1 answer
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 ...
Owen's user avatar
  • 53
4 votes
1 answer
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 ...
Facundo's user avatar
  • 41
0 votes
1 answer
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 ...
Marcel Hansemann's user avatar
1 vote
1 answer
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: ...
チーズパン's user avatar
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 ...
Manh Nguyen Huu's user avatar
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: ...
BossShell's user avatar
  • 143
1 vote
2 answers
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, ...
Manh Nguyen Huu's user avatar
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 ...
user2479595's user avatar
2 votes
0 answers
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 ...
iksemyonov's user avatar
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 ...
code_dredd's 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 ...
divx's user avatar
  • 41
3 votes
1 answer
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 ...
user5488's user avatar
  • 156
4 votes
2 answers
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 ...
Nick's user avatar
  • 321
2 votes
1 answer
468 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 ...
BRabbit27's user avatar
  • 969