What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Questions tagged [projection]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
21
votes
5answers
18k views

Do I need the 'w' component in my Vector class?

Assume you're writing matrix code that handles rotation, translation etc for 3d space. Now the transformation matrices have to be 4x4 to fit the translation component in. However, you don't actually ...
4
votes
1answer
4k views

How do I create a decal system?

I'm currently given the task to design & create a simple decal-system in C++/DirectX. Does anybody know a great tutorial, article or paper to start with? (Especially the part about 2D-texture to ...
6
votes
4answers
1k views

Why are 3d projections on a 2d screen not like what the human eye sees?

Firstly, I'm sorry if this question doesn't make much sense or is poorly written - I have almost no experience with programming, and none at all with game development. I'm also not sure it's an ...
3
votes
1answer
463 views

How to render multiple projections of an object?

I want to display multiple projection of an object on the same screen. The projection should also change as the body rotates, kind of a dynamic projection of the body. I am trying to make a character ...
5
votes
1answer
1k views

How to do perspective projection “parallax” but without changing the scale or offset of objects?

Hello everyone I have this problem that I have tried everything I could think of. The problem: I am making a 2D game with parallax effect but I am using 3d space so am not simulating the parallax but ...
22
votes
3answers
4k views

Are there 3D projections other than orthographic and perspective? [closed]

The question is pretty much in the title. Are there notable 3D projections other than orthographic and perspective that could be used in a 3D system such as OpenGL? In particular, are there any that ...
11
votes
1answer
2k views

Downprojecting an imaginary 4D mesh to the screen

As a mental exercise, I'm trying to imagine projecting an arbitrary 4D mesh onto the screen (2D). I'm guessing a single 4D triangle would still consist of only 3 points, however each of those 3 ...
8
votes
1answer
1k views

Projected trajectory of a vehicle?

In the game I am developing, I have to calculate if my vehicle (1) which in the example is travelling north with a speed V, can reach its target (2). The example depict the problem from atop: There ...
6
votes
0answers
215 views

How to set the camera projectionmatrix so that it's 4 rays always exactly hit the corners of a defined plane?

I have a camera, and I have a plane. The plane has 4 corner points. I need to find out how to change the projection-matrix of the camera so that the projection-rays of the camera always hit the ...
3
votes
1answer
7k views

Using gluUnProject to transform mouse position to world coordinates (LWJGL)?

I have a little LWJGL application and I have been trying to figure out how to successfully use the GLU.gluUnProject function in order to transform a given point on the screen (mouse position) to world ...
2
votes
2answers
2k views

How do I convert screen coordinates to between -1 and 1?

I'm writing a function that allows me to click on my tiles. The origin for my tiles is the center, however, the mouse's origin is the top left. I need a way to transform my mouse coordinates into my ...
1
vote
1answer
259 views

How do I take 2D ballistic trajectory planning and apply it to 3D?

I am currently using this formula speed = sqrt((gravity.y*target.x^2)/(2*cos^2(angle)*(target.y - target.x*tan(angle))) provided by DMGregory as an answer for my ...
0
votes
1answer
3k views

How would you design a transformation matrix to project absolute coordinates to any orthographic projection desired?

I am attempting to make an RTS based on AoE II HD Edition. I want to have ease of control by designing a transformation matrix given any style of projection I want. This is a good example of what I ...
7
votes
2answers
875 views

Portal Projection

Ok ok I admit, I'm bored and toying with a portal script like the one on steam. I've figured out the following: relative positioning of the mirrored cameras render to texture for the portal (the ...
4
votes
1answer
1k views

Perspective projection with 90 degrees between X-Y axis?

I'm trying to create a game that mimics Tibia's projection style: (source: mmoginfo.com) , As you can see, a 3d point is mapped to 2d like this: So I've downloaded Three.JS and a lib to create a ...
2
votes
1answer
2k views

Restoring projection matrix

I am learning to use FBOs and one of the things that I need to do when rendering something onto user defined FBO, I have to setup the projection, modelview and viewport for it. Once I am done ...
2
votes
1answer
538 views

Problems with converting from Screen Space to World Space

I have an unproject function I've written, which takes in x and y values between -1 and 1, and a z value between 0 and 1 (0 is near plane, 1 is far plane). I create a vector off of this, and multiply ...
1
vote
1answer
2k views

Why are there different ways of building projection matrices?

Matrix.PerspectiveFovLH documentation page says that this method uses the following formula to build a perspective projection matrix. ...
1
vote
3answers
261 views

Understanding how to go from a scene to what's actually rendered to screen in OpenGL?

I want something that explains step by step how, after setting up a simple scene I can go from that 'world' space, to what's finally rendered on my screen (ie, actually implement something). I need ...
0
votes
1answer
354 views

Scanline filling of polygons that share edges and vertices

In the image below (a perspective projection of an icosahedron), the scanline (red) intersects that vertex at the top. In an icosahedron each edge belongs to two triangles. From edge a, only one ...