Questions tagged [matrix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
77 views

Pre and Post Multiplication World Space Transform Matrix ambiguity

I'm currently studying about world space transformation matrices and encountered some confusion regarding their application in different matrix orders (row major vs column major). Context In row major ...
makra's user avatar
  • 1
2 votes
1 answer
114 views

How can I determine ideal NURBS surface control points for a multi-patch sphere?

I would like to know how to "parameterize" the control points for the 6 faces of the commonly used NURBS mutli-patch sphere ("Cobb sphere"), for an arbitrary-size control point ...
Chaosoahc's user avatar
0 votes
1 answer
48 views

What are the exact math steps to convert sRGB (D65) to Lab (D50) colorspace?

I've been struggling to implement the correct steps (matrices, white-points, etc) to convert some sRGB (RGB) values (already in 0-1 range) to Lab/CIELAB color space. I've tried following guides on ...
Pedro Ribeiro's user avatar
0 votes
0 answers
46 views

4x4 matrix to scale only one axis depending on another axis

I am trying to scale the value of the input vector along one axis depending on the value of the input vector along another axis, while leaving everything else unchanged. Given (pseudocode): ...
Beta Carotin's user avatar
0 votes
0 answers
55 views

Computer Graphics Previous Year Question asked in UGC NET 2021

What is the transformation matrix M that transforms a square in the x-y plane defined by (1, 1)T (-1, 1)T (-1, -1)T (1, -1)T to a parallelogram whose corresponding vertices are (2, 1)T (0,1)T (-2, -1)...
Rajesh Prajapati's user avatar
1 vote
1 answer
169 views

Move the camera in orthographic 3D

I'm trying to figure out how to move a camera in orthographic 3D. The scene is orthographic in the sense that an object looks the same regardless of position. The only thing that may affect the size ...
Candleout's user avatar
  • 127
1 vote
1 answer
136 views

Matrix form of an open uniform cubic b-spline

I'm trying to find the matrix form for the equation of a cubic b-spline. More specifically, the "middle" part, S_i(t), is pretty straightforward and available everywhere: ...
fruity's user avatar
  • 11
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
0 answers
46 views

How to display real time 3-D orthogonal vector rotations?

I'm an embedded developer here with very little experience in computer graphics. I'm currently working on a GUI that can display a calculated inertial solution at run time. I have hardware that can ...
Henry Gilbert's user avatar
1 vote
1 answer
81 views

convert right handed matrix into left handed forward/up/right vectors

I have an openGL style matrix (column major, right handed ) that needs to be converted into two vectors (forward and up) I've managed to find, in a weird way, a solution that matches the the ...
ytrox's user avatar
  • 31
0 votes
2 answers
196 views

Why are the transformations of an object calculated on CPU?

If I understood correctly this is the process of rendering an object: Array of 4d vector defining points 3d points(with the fourth component 1) representing object's vertices in object/local space: <...
Bogdan Floareș's user avatar
2 votes
1 answer
77 views

Trouble transforming vectors from view space to screen space using a perspective projection matrix

I can't for the life of me figure out how to use a perspective projection matrix. My understanding is that, once objects are in view space, the the perspective transform uses the z-coordinate to ...
John Gietzen's user avatar
0 votes
1 answer
49 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
0 votes
0 answers
103 views

Previous frame reprojection fails for camera translation

I'm trying to perform forward pixel projection based on previous frame depth. Using UV, I'm reading prevDepth for given pixel and based on that I'm recreating worldPos in camera space (where (0, 0, 0) ...
DirectX_Programmer's user avatar
0 votes
0 answers
74 views

Alternate projections in shader

I have a projection calculation which maps points from 3D space to pixel (image) space, and I want to use it as instead of the standard MVP projections in a vertex shader. In the image below the lower ...
Roman's user avatar
  • 3
1 vote
2 answers
565 views

How to determine transformation matrix for an object given a graph?

I am given this image: and asked to determine the transformation matrix that took me from ΑΒΓΔΕ(let's call it ABCDE for convenience) to Α'Β'Γ'Δ'Ε' (A'B'C'D'E'). I am also given the solution, so as to ...
riverwastaken's user avatar
0 votes
1 answer
242 views

Convert one triangle to another in matrix4x4?

The context openGL instances learning. I want to transform a reference triangle to another one. So final goal is to have one triangle and the instance being a transformation of that initial triangle. ...
Kroma's user avatar
  • 103
1 vote
3 answers
331 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
238 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
0 votes
0 answers
126 views

How to interpolate between two MVP setups?

I am currently writing an AR experience. I have a Camera View Matrix, A Camera Perspective matrix and the Model Matrix of the content I display. The AR content should can be switched to "2D",...
user avatar
0 votes
1 answer
166 views

Simulate projection matrix deformation in two camera setup

For educational purposes I'm trying to simulate what a scene would look like with a perspective matrix deformation (before everything is brought to NDC) but I'm unsure how to do this. I'd like to do ...
Cattani's user avatar
0 votes
1 answer
294 views

Rotate a Bitmap with Shearing

I am rotating a bitmap using the three shear algorithm documented in these articles [1][2]. From about 0-90°, the quality is acceptable, but beyond that it gets progressively more distorted until it's ...
Dr. Pontchartrain's user avatar
3 votes
0 answers
97 views

Bezier curve : Problem deriving control points from matrix form

This is my first post on this website so i have put in a lot of research to get my point across to everyone as clearly as possible. Based on a question i posted on stack overflow i have successfully ...
Sync it's user avatar
  • 169
1 vote
0 answers
239 views

Model View Projection Matrix Multiplcation Order

I'm working on a simple software renderer and have a working implementation so far. I'm curious as to why it's actually working since I would expect the multiplication ordering for my world, view and ...
user13873040's user avatar
0 votes
0 answers
311 views

Matrix transforming with translation/rotation/scale at center of screen

I'm trying to create a camera using matrix transforms, the gist as follows: ...
Pooper's user avatar
  • 1
0 votes
1 answer
2k views

THREEjs: updating an object's matrix doesnt change it's position and rotation params

I want to set a transformation matrix to an object upon creation and then control it by position, rotation and scale, but while changing the matrix does change the object in world space, it's position ...
Roman's user avatar
  • 3
0 votes
1 answer
752 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
1 answer
414 views

Perspective projection near plane not in world coordinates

I have a camera I have placed zunits away from a billboarded rect. My goal is to discard all other geometry that is closer to the camera/in front of this rect. With ...
J.Doe's user avatar
  • 1,445
0 votes
0 answers
192 views

Crystal ball rotation - I don't get why the code works

For context: I'm absolutely new to graphics programming and I've always had trouble getting the math. I had the task to write code for a crystal ball interface using OpenGL. There's an object in the ...
user avatar
0 votes
0 answers
77 views

Compose ViewMatrix and ProjectionMatrix

As the title says, you are able to compose the ViewMatrix and the ProjectionMatrix into one instead of multiplying a vector by the individual matrices. Instead of doing this at run time for each item: ...
Nixcc's user avatar
  • 33
3 votes
2 answers
836 views

Which perspective projection matrix to use

I've seen two different perspective projection matrices being used but I want to know which one of them is the best. I think that they both output the same but I'm not sure. So if anyone can help me ...
Nixcc's user avatar
  • 33
0 votes
1 answer
2k views

Why do we call it TRS and MVP, instead of SRT and MVP or TRS and PVM?

Here's something that's been bothering me while learning graphics. We have two core concatenated matrix sets: "TRS" for transforms, and "MVP" for moving everything into the canonical view volume. TRS ...
Thomas's user avatar
  • 1
1 vote
2 answers
623 views

Do I need a normal matrix if I calculate lighting in an objects space?

As a quick reminder, here is what normal matrix is and why do we need it. Now the question - if I take the light position and transform it into an object space than I don't need the normal matrix at ...
nikitablack's user avatar
1 vote
0 answers
541 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
1 vote
1 answer
351 views

Camera position in vertex shader

in the vertex shader I have the vertex position vpos which is in object space and I want to get the vector going from the camera to ...
Voko's user avatar
  • 269
0 votes
0 answers
83 views

How to find matrix that projects 3d points into 2d plane centered in the origin?

I have a list of 3D points defined by Cartesian coordinates, i.e. [(x1,y1,z1), (x2,y2,z2), ..., (xn,yn,zn)]. I want to project them to a 2D plane which has origin in the center (0,0,0) but which is ...
slobodan.blazeski's user avatar
8 votes
4 answers
2k views

Why does opengl use 4d matrices for everything?

What I managed to figure out is that the first 3*3 is used for rotation and scale and the 1*3 at the end is used for position, but what is the bottom row used for? is it only for clipping related ...
Yoris's user avatar
  • 81
2 votes
1 answer
163 views

My 2D translation matrix causes the box to be off screen when it shouldnt be

Now I know this isn't the way this is normally done so please bear with me. I am doing this this way so I know I have a solid conceptual understanding of everything that goes beyond example code. I ...
J.Doe's user avatar
  • 1,445
0 votes
1 answer
665 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
0 votes
3 answers
733 views

Rotation of a random unit vector at a point in 3D space by an angle

I have a scenario where I need rotate a vector ( unit vector) at a point in space by an angle along Z-axis. Is it possible to help me to understand a procedure to achieve this. I'm using vb.net ...
Raghav's user avatar
  • 9
1 vote
0 answers
481 views

How to apply scale, translate, rotate with different origin and get new rectangle coordinates

I was reading other questions in this topic but I couldn't apply any viable solution to solve my use case. I have a crop area described with two dimensions (cropWidth, cropHeight) I can easly compute ...
Jacek Pudysz's user avatar
2 votes
1 answer
53 views

Correctness or otherwise of the procedure for generating an orbiting camera in WebGl

I have to create a orbiting camera. I created the model of sun (a sphere) around (0,0,0) , triangulated and Phong shaded it. I would have a camera that goes around the sun thus an orbiting camera and ...
Nick's user avatar
  • 321
3 votes
1 answer
4k views

How do I build my tangent space matrix?

I'd like to understand how the process of building the "tangent space" matrix for normal mapping works. I'm following several tutorials, and other stackexchange questions, but I'm unfamiliar with the ...
Narrateur du chaos'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
1 answer
634 views

Inverse matrix order of operation

If I have a rotation, $A$, and a translation, $B$, which I multiply like so $C = AB$ Does the inverse of $C$ not only inverse the magnitudes of $A$ and $B$ but also become the reverse of operations? ...
SuperJumbo's user avatar
2 votes
1 answer
15k views

How to derive a perspective projection matrix from its components?

This has been haunting me for several days now. I want to find the component that makes up of this 4x4 perspective projection matrix, with $l$(left), $r$(right), $b$(bottom), $t$(top), $n$(near), $f$(...
Manh Nguyen Huu's user avatar
3 votes
2 answers
150 views

Modulo vs Scaling vs Capping when performing filters

I'm currently taking a graphics course and we've recently covered cross-correlation with regards to using a filter matrix that is applied to a region of pixels in a sort of continual raster-type scan ...
zoombini's user avatar
5 votes
1 answer
960 views

why is translating in 3D space the same as shearing in 4D space?

I was reading "3D Math Primer for Computer Graphics and Game Development" and there was something the author had said that I thought was particularly interesting, he stated It is important to ...
MatriXcel's user avatar
2 votes
2 answers
7k views

Screen space coordinates to Eye space conversion

I'm trying to figure out how to reverse Eye space -> projection -> clip(divide by w) -> screen space conversion. Basically, I want to get Screen space (still have z value for z-buffer) -> undivide? ...
hans-1795's user avatar
1 vote
1 answer
174 views

Why inverse of an allignment matrix is the same as its transpose?

$A_{v}^{-1}$ = $A_{v}^{T}$ $A_{v}$ = Allignment matrix that alligns vector v with z axis $=$\begin{bmatrix} \frac{\lambda}{|v|} & \frac{-ab}{\lambda|v|} & \frac{-ac}{\lambda|v|} &...
Bhattacharjee's user avatar