Skip to main content

Questions tagged [projection-matrix]

Filter by
Sorted by
Tagged with
0 votes
0 answers
52 views

I just need to draw a flat mesh (say a 2d graph) on top of everything. What could be easier? create an object, adding it a mesh precalculated in homogenous (-1,+1) coordinates to match ...
Apatity's user avatar
0 votes
1 answer
92 views

I have a green circle: Inside the circle, the white frame moves to wherever P, the projection of the targets 3D position into a 2D point, is. However, outside the circle, the frame will move to the ...
KING MOOSE's user avatar
0 votes
1 answer
254 views

I'm trying to set up perspective projection in OpenGL but it doesn't work ...
DDD's user avatar
  • 11
0 votes
0 answers
133 views

I have been searching around for a solution to this but still haven't been able to use it or find it, the thing is i need the Screen Position of an object that is being seen, for this i have three ...
user57129's user avatar
  • 133
1 vote
0 answers
52 views

I have a 3D scene with a camera. Between the camera and the scene, I have a plane with arbitrary orientation. This plane obscures a portion of the scene from the camera’s perspective (anything behind ...
John's user avatar
  • 131
2 votes
1 answer
691 views

From what I can tell Godot uses Projection for 4x4 matrixes, but I see no way to generate a localtoworldmatrix from a given transform in Godot, how do I do this?
Ethan's user avatar
  • 145
2 votes
0 answers
138 views

I want to rotate a 2D orthographic projection around the centre point of my view. However, something is off (it looks like a translation) but I'm not sure what. To put some concrete values on the ...
junglie85's user avatar
  • 123
0 votes
1 answer
1k views

When I use glm::perspectiveFov(90.0f,512.0f,512.0f,1.0f,256.0f) I receive a working perspective projection with 90° in both x and y, as seen below (camera is in ...
Raildex's user avatar
  • 812
0 votes
0 answers
68 views

I have found this code where they use a cubemap for pointlight shadow and they don't need to retrieve the faceindex and the projection matrix. This greatly improve the FPS. I was wondering if this ...
philB's user avatar
  • 333
1 vote
2 answers
455 views

I have a standard 3D rendering pipeline. Let's say I have a camera looking down at a flat plane that represents the floor. (in my game, z = height, so this is a plane where z == 0), and for ...
Tom Davies's user avatar
0 votes
5 answers
2k views

I'm making my own game engine as an exercise and I've gotten really confused with what I've read so far. When I want to move my camera do I simply just move the world or move the position of the ...
MiguelP's user avatar
  • 103
0 votes
1 answer
68 views

I know the bare minimum to do matrix multiplication and have implemented them from scratch a few times for various purposes, but every time I do, I make sure to be very clear to myself about where are ...
kale hops's user avatar
0 votes
1 answer
432 views

We know that in Oblique Parallel Projection Point (x,y,z) is projected to position (x_p,y_p) on the view plane.Projector (oblique) from (x,y,z) to (x_p,y_p) makes an angle alpha. with the line (L) on ...
S. M.'s user avatar
  • 117
1 vote
0 answers
334 views

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
2 votes
1 answer
7k views

Say we do this: glm::mat4 View = glm::lookAt(glm::vec3(4,3,-3), glm::vec3(0,0,0),glm::vec3(0,1,0)); And after printing to the console with glm tostring (column ...
Ian's user avatar
  • 71
1 vote
1 answer
324 views

I'm trying to port ShaderToy VR shaders to WebXR (the new browser API for AR/VR devices). ShaderToy VR shaders expect two extra parameters: ray origin (view translation) and ray direction (unit vector ...
kaoD's user avatar
  • 1,935
0 votes
0 answers
53 views

Projection matrix? Renderer? Where is the error? I recently started studying NDK to create better performing android games ... but ... An error I didn't expect to deal with appeared a few weeks ago ...
Yuu's user avatar
  • 21
0 votes
1 answer
654 views

I was having this problem with OpenGL where I'd have all my textures being rendered upside down. I did the most logical thing I could think of and tried reversing the order of the mapping and that ...
Bruno Giannotti's user avatar
1 vote
0 answers
114 views

Whenever I multiply my transformation matrix, which is passed to the shader via constant buffer, my triangle disappears. Here is the code for the passed matrix: ...
Marcin Poloczek's user avatar
1 vote
1 answer
442 views

I'm trying to make a custom GPU particle solution on Unity to fullfill some needs on my project, using compute shaders and custom shader + Graphics.DrawProceduralNow() to draw them. While I managed ...
JingleSpell's user avatar
0 votes
1 answer
114 views

My projection matrix was buggy, I'm not great at mathematics, but I checked it against the the songho tutorial, and the broken one seems correct to me but switching nearplane to farplane seems to ...
eternalNoob's user avatar
6 votes
1 answer
3k views

So I've been scratching my head at this problem for over a week now, and would love some insight from anyone who might know a bit more. In my game I have the floor flat on the X/Z plane with walls/...
Shervin's user avatar
  • 131
7 votes
1 answer
1k views

I have a camera, and I have a rectangle drawn in an arbitrary plane. I need to change the projection matrix of the camera so that the rays along the edges of the camera's frustum always hit the ...
OC_RaizW's user avatar
  • 1,480
1 vote
0 answers
103 views

Is it a convetion ? What we achieve with this ? I am reading about how the perspective and orthographic matrix is getting calculated and everyone is trying to normalize the homogenous coordinates to [...
ItsYou's user avatar
  • 11
1 vote
0 answers
203 views

In rendering tutorials for perspective projection the assumption is that the rendering surface is perpendicular to the sight line. As shown here: How to accommodate for a screen that is tilted ...
JeffV's user avatar
  • 185
2 votes
1 answer
714 views

I'm trying to extract frustum planes from the camera. The algorithm is simple: create clip to world space matrix (inversed projection * inversed view) multiply clip point by clip to world matrix ...
some rand's user avatar
  • 128
0 votes
1 answer
1k views

I'm trying to create the correct projection and model view matrix for rendering without a camera. _orthoCamera is a camera I set up in the scene view. Using the <...
David H's user avatar
  • 11
0 votes
1 answer
2k views

There are generally three functions to create a perspective matrix in DirectXMath, XMMatrixPerspective{L,R}H, ...
tkausl's user avatar
  • 1,870
0 votes
0 answers
268 views

I'm trying to figure out a way to provide such a perspective projection matrix to a shader that the "near" plane wouldn't necessarily be orthogonal to the camera vector. More specifically, I'm ...
user3139876's user avatar
0 votes
1 answer
529 views

I'm trying to set up an orthographic projection so I can draw a rectangle using screen coordinates, but even if I draw a rectangle using the width/height of the window, it only fills a quarter of the ...
user124367's user avatar
1 vote
1 answer
5k views

I'm making a 2D game and I want the user to be able to position an object in the world using mouse input. After a while I found an answer to 'OpenGL Math - Projecting Screen space to World space ...
SWdV's user avatar
  • 113
0 votes
2 answers
261 views

I have a 3d camera that is viewing a character that is moving. As the character is moving i want the camera to adjust itself so as to keep the character in the left third of the camera view. I ...
SRG's user avatar
  • 101
0 votes
1 answer
97 views

I am able to use a camera class to change the view and rotation of a simple quad, so I know it works, but when I move on to a more advanced geometry, such as a mesh, I am unable to affect the ...
adrotter's user avatar
  • 125
1 vote
2 answers
3k views

I've followed the advice in this post to handle world/screen coordinates, but I'm getting results I don't quite understand, as I'm not terribly good in math. So, when I use this code: ...
mkkekkonen's user avatar
1 vote
1 answer
530 views

I have a QT canvas and I'm using shaders to build my scence. I've set the camera image plane at some position, and would like to view object from the image plane to infinity. How do I set the zfar and ...
Mercury's user avatar
  • 111
3 votes
1 answer
6k views

I am working on a small game in Unreal Engine 4.15 using blueprints only and encountered a behaviour I don't understand. The game is based on the Top Down Example. As I'd like to teleport an actor ...
nmnd's user avatar
  • 31
2 votes
1 answer
393 views

I'm trying to double check my math in my projection matrices. I'm thinking about "unit tests" when I ask this. I'm looking for 4 or 5 unit tests that would be appropriate to give one confidence that ...
101010's user avatar
  • 209
0 votes
1 answer
774 views

I am trying to calculate the 2D screen point of a 3D world position. For this I use the multiplication ViewMatrix * ProjectionMatrix. But I am not getting good ...
Steffen Brem's user avatar
9 votes
1 answer
184 views

SOURCE : http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Mitchell_LightShafts.pdf This process is part of creating light draft effect. And I am suggested to do the described process in ...
Blue Bug's user avatar
  • 1,112
3 votes
1 answer
209 views

I'm trying to troubleshoot a problem with my simple OpenGL test program, which I've written in C. I've written some math routines to do the matrix manipulation, but even after copying known working ...
Brian's user avatar
  • 151
4 votes
2 answers
2k views

I want to make a 360 degree video of my OpenGL game. Concerning the rendering: Is it enough to render it in OpenGL with a specific projection matrix? If yes, which one? Or can I render it into a cube ...
woidler's user avatar
  • 91
1 vote
0 answers
79 views

I have a box (non-rectangular cuboid?) and would like to convert it to a matrix such that when a point inside the box is multiplied by the matrix, a vector is returned that describes the relative ...
Zachary Burns's user avatar
3 votes
1 answer
5k views

I am very confused about camera matrices and I don't know where to start my studying. Maybe I have to study OpenGL, but I don't know C++ ... Ok so I have a camera, Box2d world and a Box2d body. <...
Sharpirate's user avatar
2 votes
0 answers
2k views

This question is related to (How to calculate the initial velocity of projectile motion by a given distance and angle from point A to B) question. Details In the below image is the graphical ...
ronscript's user avatar
  • 501
1 vote
1 answer
134 views

I'm trying to get the world coordinates out of a mouse click. Currently I'm doing the following: ...
João Alves's user avatar
0 votes
1 answer
299 views

How calculate camera target position, if I have front/back planes, camera transformation matrix and camera lens length?
SomeGenericNameto_Display's user avatar
-1 votes
1 answer
1k views

I'm trying to implement a very simple ray tracing function but I have a problem with projecting the camera ray (from camera to pixel) to the world space. In the screen coordinates have the pixel ...
Zick's user avatar
  • 99
0 votes
1 answer
128 views

I was just recently adding the ability for my in-game entities to have their own Frustums, with the intentions of making them able to see enemies later down the road of my development cycle. My custom ...
Krythic's user avatar
  • 800
3 votes
0 answers
676 views

I'm trying to achieve a dolly zoom effect. My first try was the obvious one, the original "zoom in & dolly out" technique, which works nicely. Except that there are cases which this is not ...
NemoStein's user avatar
  • 389
1 vote
1 answer
155 views

A position v and normal n are given in world coordinates. Also there is a view matrix V for ...
Marcin Kaczmarek's user avatar