# Tagged Questions

The tag has no usage guidance.

484 views

### Unproject mouse position to tile — extremely jumpy position?

I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is... ...
7k views

### 2D camera perspective projection from 3D coordinates — HOW?

I am developing a camera for a 2D game with a top-down view that has depth. It's almost a 3D camera. Basically, every object has a Z even though it is in 2D, and similarly to parallax layers their ...
589 views

### Orthographic unit translation mismatch on grid (e.g. 64 pixels translates incorrectly)

I am looking for some insight into a small problem with unit translations on a grid. Update and Solved I solved my own issue. See below for details. Everything in this part of the post turned out to ...
978 views

### If I project a sphere in 3D will it be a circle?

Assuming I have infinite vertices to represent the sphere, if I project the sphere from any position/scale in 3D to 2D, will it be a circle? I know it will not be a circle on the screen, because of ...
240 views

### Scanline filling of polygons that share edges and vertices

In this picture (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 triangle ...
385 views

### Greiner-Hormann clipping problem

I have a set of planar polygons in 3D space defined by their vertices in counterclockwise order. Let's define the 'positive face' as being the face of the 3D polygon such as when observed, the ...
167 views

### Orthogonal projection and world transform

I'm reading about projection matrix. Needs of perspective projection is obvious, but I'm not sure about orthogonal projection. Because orthogonal projection effect looks possible with only world ...
968 views

### Off center projection

I'm trying to implement the code that was freely given by a very kind developer at the following link: http://forum.unity3d.com/threads/142383-Code-sample-Off-Center-Projection-Code-for-VR-CAVE-or-...
1k views

### Game Engine which can provide 360 degree projection for PC [closed]

I'm searching Game engine which can provide 360 degree real-time projection. I've already achieved this by using VBS2 Game Engine. (Ref.: http://products.bisimulations.com/products/vbs2/vbs2-multi-...
1k views

### Draw a 3D object at specific coordinates on the screen

I'm creating an application which allows the user to manipulate 3D models. I would like to draw 3 axis representing the world coordinate system in 3D in order to give the user an idea where he is. ...
2k views

### How do I convert a cube map to an equirectangular projection?

I have a cube map texture showing a surrounding area, which I want to pass to a program that only works with latitude/longitude maps. How can I do this? In other words, I need to turn this: …...
649 views

### Trouble with SAT style vector projection in C#/XNA

Simply put I'm having a hard time working out how to work with XNA's Vector2 types while maintaining spatial considerations. I'm working with separating axis theorem and trying to project vectors onto ...
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

### Silly question about perspective correct texture mapping

OK, I'll admit, the math on a perspective projection matrix is quite hairy for me, but I get the general gist of it: morph the object so that it looks... perspective-ish. But there is one thing which ...
275 views

### What is the connection between an isometric angle and scale

I am trying to work out an isometric projection matrix for a custom angle. In the engine I'm using there's a projection matrix defined like so: projection.rotate(45 * (Math.PI / 180) ); scale = 1....
995 views

### Easy way to project point onto triangle (or plane)

I have a mesh of triangles (navigation mesh), and a point in 3d space. This point should be "over" one of the triangles all the times. I'm trying to determine which triangle is the one the point is "...
663 views

### How to compute the 2D equations of 3D circular arcs?

I'd like to obtain these equations for the ellipses produced by the perspective projections of (3-dimensionally transformed) circles. This is useful for rendering in 2D contexts which provide curve ...
1k views

### How would I achieve diablo like 2D isometric projection?

I am in the process of coming up with an idea for a game, and I would like it to be isometric like Diablo. The problem is I have no idea how it achieves the effect of height like in the following ...
995 views

### Draw a projection of a mesh on a surface

I have a mesh looking almost like a cylinder, the cylinder goes through a mesh and continues on the other side. What I want to do is to draw the projection of the cylinder on the mesh. So if you look ...
879 views

### Keystone Correction using 3D-Points of Kinect

With XNA, I am displaying a simple rectangle which is projected onto the floor. The projector can be placed at an arbitrary position. Obviously, the projected rectangle gets distorted according to the ...
143 views

### Finding furthermost point in game world

I am attempting to find the furthermost point in my game world given the player's current location and a normalized direction vector in screen space. My current algorithm is: convert player world ...
2k views

### Screen space to world space

I am writing a 2D game where my game world has x axis running left to right, y axis running top to bottom, and z axis out of the screen: Whilst my game world is top-down, the game is rendered on a ...
299 views

### Project rendering onto a polygon in the scene

I have a function that renders a simple OpenGL scene. I want to display this scene on a polygon within another scene, without the function having to know about it. For example, to display the scene on ...
1k views

### Arbitrary projection matrix from 6 arbitrary frustum planes

A projection matrix represent a tranformation from the camera view space to the rendering system clip space. In other words, it defines the transormation between a 6-sided frustum to the clip cube. ...
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 ...
631 views

### Does the projection matrix flip winding order in right handed systems?

I am using a right handed coordinate system for my world coordinates (so, positive x goes right, y is up, and z is towards you). However, after projection and the w divide, nomalised device ...
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 ...
1k views

### What's a pre-multiplied 4x4 matrix?

I'm using a 3d game engine, that uses a 4x4 matrix to modify the camera projection. The matrix is in the regular 4x4 format: r r r x r r r y r r r z - - - zoom The description for the ...
547 views

### How to calculate FOV with four-walled tiles?

I'm working on a 2D tile-based game. I'm trying to calculate FOV and I've implemented walls so they don't take up an entire tile. Instead, they just take up a side of each tile. Similar to: class ...
630 views

### How can I calculate where my camera can be to avoid showing something outside a region?

I have a landscape model, which goes from the coordinate -45, -45 to 90, 90. The edge of the model just cuts off and i would like to somehow stop the screen from ever passing these points. Basically ...
378 views

Pre. Having these matrix transformations: var scale = Matrix.CreateScale(50f); var eye = new Vector3(0, 0, 10.0f); var view = Matrix.CreateLookAt(eye, Vector3.Zero, Vector3.Up); var projection = ...
2k views

### Can a 4x4 matrix describe a camera's perspective?

I'm working with a closed-source 3D engine, and it only allows you to set the view projection via a 4x4 matrix. Can this matrix describe the camera's translation, rotation & perspective? I turned ...
816 views

### How to create projection/view matrix for hole in the monitor effect

Lets say I have my XNA app window that is sized at 640 x 480 pixels. Now lets say I have a cube model with its poly's facing in to make a room. This cube is sized 640 units wide by 480 units high by ...
2k views

### How should I calculate world and projection matrices in this scenario?

I'm trying to understand transformation matrices. Suppose I use the camera from this StackOverflow answer, this is how my view matrix would look: Matrix.Identity * Matrix.CreateTranslation(-Position....
3k views

### Faking isometric graphics in a 2D space game

First off, I know exactly what my drawing problem is, and I have various ideas on how to approach solving it. I am here to figure out how to adjust which frame is drawn so that the isometric "illusion"...
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 ...
4k views

### What is the name of perspective of Age of Empires II?

One would describe Age of Empires 1's "perspective" as a 2D sprite game (screenshot). Below is a screenshot of Age of Empires II. How would you describe the "perspective"? Is it also a 2D sprite game?...
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 ...
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 ...
552 views

### Is a dynamic enviroment map using pincushion curvilinear perspective projection possible?

I'm wondering if it is possible to generate a dynamic spherical environment map using a single frame render using a pincushion curvilinear perspective projection matrix (phew, that's a mouthful)? I'...
699 views

### XNA - Non perspective projection?

For a section of my game, instead of having a perspective projection, i would like to display an isometric view of an object. So i don't want things to appear smaller if in a distance, etc. ...
5k views

### Help understanding gluLookAt()

I am fairly new to openGL( 3 months ) and am asking for assistance in understanding the fundamentals behind gluLookAt(). Currently I have spent most of my time with openGL modeling scenes with fixed ...
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 ...
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 ...