Questions tagged [projection-matrix]

234 questions
1
vote
0 answers

Trying to implement a projection matrix but doesn't seem to work

So I'm trying to make 3d engine and I'm getting pretty close to making it work but, the project formula I'm using which looks like this: ( axis = axis / (z / 10 * tan(fov * 0.0175) + 0) * 40; isn't cutting it. I tried to implement a projection…
user18504606
1
vote
0 answers

Projections of points from 3D to 2D using Hololens 2

I used PhotoCapture to obtain an object of type PhotoCaptureFrame from which I was able to extract the extrinsic matrix. Everything works when I hold the Hololens completely still, but if I try to rotate or translate it I can't get good results. …
1
vote
0 answers

2D image coordinate to 3D space coordinate through camera matrix

I am trying to get a grasp of how to project 2D coordinates into a 3D space through my camera matrix, but I can't for the love of it, understand it. So I am hoping that someone here can point me to a guide or something that can help me. Here is what…
1
vote
0 answers

Difference between 3d projection matrix found in wiki and the glm's matrixx

So, I found This(3d projection matrix) in wikipedia, and I am curious about the difference between it and the approach in glm(glm::perspective * glm::lookat). Also I have seen people use the way in the wikipedia to optain the "front" and "right"…
Eddie38
  • 31
  • 6
1
vote
1 answer

Given camera parameters, how do I find the transform from view space to pixel coordinates? What is wrong with my matrix?

For a specific image containing a known 3d obj model, I have the corresponding model matrix and the camera parameters fx,fy,cx,cy. Having applied the model matrix to the 3d model vertices, I want to find the projection matrix that will project the…
1
vote
0 answers

Whats wrong with this projection (matrix)

Ive got this python code. It should project 8 cube corners. It doesn't tho: import math def setProjectionMatrix(angleOfView, near, far): scale = 1 / math.tan(angleOfView * 0.5 * math.pi / 180) M = [[scale, 0, 0, 0], [0, scale, 0,…
1
vote
0 answers

Finding tight frustum around an AABB

How do I build a tight-fitting view frustum around an AABB and a particular camera position? Basically, I'm implementing frustum-traced shadows and reprojecting view samples to the point-light's view frustum. I want to optimize the light's…
Jofo
  • 41
  • 2
1
vote
2 answers

Oblique projection in xna

Im trying to achieve oblique projection ( http://en.wikipedia.org/wiki/Oblique_projection ) in the xna framework: float cos = (float)Math.Cos(DegreeToRadian(45)) * -1; float sin = (float)Math.Sin(DegreeToRadian(45)) * -1; Matrix obliqueProjection…
Samuel Müller
  • 1,167
  • 1
  • 10
  • 12
1
vote
1 answer

Transforming 2D image point to 3D world point where Z !=0

the below code transforms a detected 2D-image point to it's 3D location on a defined plane Grid in 3D-world. This mean Z=0, and taking into account that the Extrinsics and Intrinsics are known, we can compute the corresponding 3D_point of the…
Khaled
  • 555
  • 1
  • 6
  • 26
1
vote
1 answer

How to change ortho matrix size in shader

I tried scaling orthogonal projection matrix but it seems it doesn't scale its dimensions.I am using orthogonal projection for directional lighting. But if the main camera is above ground I want to make my ortho matrix range bigger. For example if…
aramok
  • 35
  • 1
  • 1
  • 6
1
vote
0 answers

How to implement plane curves in Flutter?

The movie screen in the following image is similar to a curved display. The Transform widget in Flutter allows doing various 3D perspective implementations. Is there any way to achieve this plane curve effect? Using the following code, I was able…
Smarak Das
  • 534
  • 1
  • 7
  • 8
1
vote
2 answers

Understanding the Projection Matrix

I am trying to understand what the value range of projected vectors is. It seems at odds with what MSDN says. The code below outputs a colored triangle. The triangle is fully visible. I would expect that after the verticies have been projected, the…
TheFogger
  • 2,399
  • 1
  • 20
  • 22
1
vote
1 answer

Find ViewPort Rectangle in 3D world Space (Opengl)

I need help about the matrix Transformation to find the corners of my viewPort in 3d coordinates(World Space). I have done some test but i cannot find the solution. Step 1: I have Projection and Model Matrix avaible (ViewPort size too). To find the…
1
vote
1 answer

How does 2d to 3d projection work when depth is taken from a central point?

I'm looking at 2d (depth / rgbd) to 3d point cloud projection. Having spent the past few days reading up I have a vague understanding of projection matrices and looking at the functions provided by open3d I believe 2d > 3d projection can be done…
Lloyd Rayner
  • 1,009
  • 2
  • 7
  • 10
1
vote
1 answer

What would be the issue with my projection matrix in it causing a cube to disipear entirely?

I have been following a Game Engine tutorial series curated by YouTuber 'thebennybox' and have ran into an issue. A cube mesh is supposed to be displayed on the screen and in this specific episode the goal is to fix streaching of the object because…
Triston
  • 23
  • 4