Tagged Questions

The tag has no usage guidance.

9k 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 ...
3k 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 ...
713 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 ...
3k 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 ...
817 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 ...
901 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 ...
3k 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 ...
214 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 ...
697 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 ...
1k views

Perspective projection with 90 degrees between X-Y axis?

I'm trying to create a game that mimics Tibia's projection style: , 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 Orthographic Camera. But ...
99 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 ...
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 ...
71 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 ...
244 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 ...
1k 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. [w, 0, 0, 0] [0, h, 0, 0] [0, 0, zFar/(zFar - zNear), 1] [0, 0, -...