# Tagged Questions

The tag has no usage guidance.

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 ...
848 views

### Rotate around a 3d Object (Software Renderer)

I have a simple 3d software renderer (SDL / C++) which can load a 3ds Model and render it (shaded) and rotate it around X Y Z - Axis. Now I would like to rotate / move around the object, meaning, the ...
55 views

### Control frustum near and far clip plane sizes in a Projection Matrix

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 ...
84 views

### Replicating a worldspace sphere on screen space

I have quite some struggle with a post processing shader that I'm working on. I use Unity, and I have a shader in which I want to, in screen space as part of post processing, render a sphere that ...
31 views

### How to use GetViewProjMatrix().TransformVector(LineDirection) in UE4?

I try to project a 3D vector (a direction, not a position) in screen space, but it does not return satisfying results: FVector LineDirectionOnScreen = EdMode->ViewMatrices.GetViewProjMatrix()....
38 views

### Construction of perspective matrix

Is it possible to Construct a perspective matrix by multiplying a perspective transformation with a parallel projection ? I want a perspective projection in 2D space which is calculated by ...
34 views

### Perspective projection math help?

I have points X,Y,Z and have a camera at Cx,Cy,Cz. Assuming the camera is not rotated and is facing the -Z direction and is at 0,0,0. What would the math be for projecting the X,Y,and Z values onto ...
336 views

### XNA draw 3d graphics in 2d game

I am programming a simple pool game in XNA. I am using Farseer for simple 2d physics but I want to use 3d graphics. My problem is I can't get the rendering to work. I have one model for the ball and ...
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....
639 views

### How do 3D games create the illusion of depth?

How do libraries like OpenGL convert three dimensional coordinates into the two dimensional pixels we see on our screens? I'm not talking about the 3DS or games that require 3D glasses, but rather the ...
84 views

### Projection Matrix Breaks My Rectangle

This is my vertex shader, shown below. #version 330 core in vec3 a_position; in vec4 a_colour; // FOV = 70, near plane = 0.1, far plane = 1000 const mat4 u_projection = mat4( 1.428148, 0.0, 0.0,...
57 views

### Projection type used in videogames

I'm trying to create a web application, to display 3D objects on canvas. To represent the 3D object I'm using an array of Points (from application's point of view, a Point - is just an object ...
660 views

### Computing Field-of-View from window dimensions

I'm looking into computing the vertical Field-of-View (FOVy) based on the projection parameters of my camera. From this source, I've found an equation that seems to work. float FOVyForProjection(...
187 views

### How do you create a 2d world then view it in 3d?

I have been learning OpenGL for a while now and have a pretty good understanding so far. What I would like to know is if I create a 2D game in Orthographic Projection, is it possible to switch to a ...
120 views

### Which is the right way to build a OpenGL Projection Matrix

This time I'm trying to learn the core of matrix transformations. I dont like the idea to using a Math library and dont understand what is hapening on background, because this I'm having some ...
269 views

### Keeping raycast on the same level

I want my raycast to end at certain height(red line). But as the game is 3D and the camera rotates I can't use a fixed magnitude. What I thought was a stroke of genius, I figured I'd project the ...
653 views

### Ways to “invert Z-axis” in shader-based core-profile OpenGL?

In my hobbyist shader-based (non-FFP) GL (3.2+ core) "engine", everything in world-space and model-space is by design "left-handed" (and to stay that way), so X-axis goes from -1 ("left") to 1 ("right"...
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 ...
24 views

### How to find a point of taking into account the distortion of the projection

I can not find the material that will help me to implement the algorithm of coordinate transformation based on the distortion of the projection. I am creating a code recognition algorithm (similar ...
68 views

### Issue creating a dynamic seemless cube map

I have a function for building a cube map, given a location in space. I also have a system for displaying cubemaps (either loaded from images or given as a texture handle), and they work fine and are ...
93 views

### 3d projection help?

I've been wanting to know how to do 3d projections. Can someone explain how i can use this to find the position for x and y on the 2d plane that is 600 * 600 pixels.
245 views

### How to draw 2d above 3d scene?

I have an OpenGL(3.3)+GLEW application. I want to draw a black vertical rectangle at the left side of the window for writing some information on it, like fps (I use GLEW function for drawing text). ...
424 views

### Distortion problem with perspective projection

For various reasons – partly educational, partly technical – I'm writing a 3D game engine from scratch, using OpenGL 3.0; aiming for Core Profile, eventually, so of course I'm using a custom matrix ...
160 views

### Perspective Projection - Drawing Lines

So I sort of understand the math behind projecting 3d points onto a 2d plane. It's just some simple dividing and multiplication of distances. However I can't seem to wrap my head around projecting ...
177 views

### GameObject is only rendered when it has a negative z scale

I have an orthographic camera that looks like this: I create 2d polygonal meshes that have uniform z values in their vertices. I use Camera.ViewportToWorldPoint() to map these viewpoint vertices to ...
116 views

### Scaling world - projection, view or separate matrix?

I am currently writing a simple 3D space visualisation program. Things get loaded into it from a simple XML file, which contains positions and sizes of objects in space, so you can put basically any ...
1k views

### Projective texturing and falloff

I quite understand how projective texturing works. I implemented successfully a shader for that following nvidia doc. The major problem I'm facing is that with that implementation the projector ...
49 views

### Rotate final image with projection matrix

I'm trying to use space in my shadow (depth) maps in a more efficient way. If I could freely rotate the final image I get with projection matrix I could save a lot of pixels, but I don't know if it is ...
210 views

### Perspective projection computation

I'm learning OpenGL from arcsynthesis and I don't understand something about perspective projection (http://www.arcsynthesis.org/gltut/Positioning/Tut04%20Perspective%20Projection.html). When the ...
38 views

### Quad not rendered correctly after window resize

I have a orthographic camera. With the help of this camera i'm able to render a quad onto the screen using screen-cordinates. Using the camera i perform the zoom in/out on specific mouse position ...
45 views

### glOrtho and VBO

I'm trying to send triangles to OpenGL using screen coordinates. Using the deprecated glBegin and glEnd I could just set up an orthographic projection and use screen-space coordinates as the triangles/...
24 views

### Projection type/camera angle in Alien Soldier

I am trying to build a 2D game similar to Alien Soldier from oldies (Sega Genesis). The problem I am having is with assets. What kind of projection/camera angle does the Alien Soldier use for it's ...
59 views

### Perspective projection

I'm studying Perspective projection in a computer graphics course and i'm really confused about a detail. The study material says there are 3 cases: Case 1: View plane parallel to the xy plane and ...
54 views

### Projectile Shoot three at a time

In my game there is a bird flying and on touch it throws different artifacts projectile downwards. And these artifacts should hit the containers moving right to left on the screen. Now if user keeps ...
110 views

### Perspective Projection Far Plane Not Clipping?

I've just discovered that far away objects in my world don't seem to clip like they should with a perspective projection matrix. When I fly far away from my main landscape, so that I am much more ...
167 views

### Mesh Generation In Code [closed]

My camera looks like this: I am trying to add 2D polygons to the screen based on the percentage that they take up of a 1920x1080 pixel canvas. Therefore, I calculate this and then use Camera....
163 views

### Change 2D Angle Into Isometric Angle

i Rendered My Sprite With 72 Angles In Isometric View. Rendered Frame Number 0 And Angle 0 Is When My Sprite Looking Right And And I Rendered My Sprite Every 5 Angle. In My 2D Game My Sprite Moving ...
63 views

### Rasterizing euclidean planes

I'd like to visualize a BSP tree. To do this, I need to project an arbitrary euclidean plane onto a projection plane. I was thinking about calculating the intersections of the plane with the viewing ...
101 views

### XNA Rendering vertices that only appear within the cameras view

I'm making a game in XNA and I recall hearing that professionally made games use a technique to only render the polygons that appear within the cameras projection. I've been trying to find something ...
739 views

### Projecting world coordinates to screen coordinates issue - points disappear when origin not in view

I am trying to implement a 2d line drawing effect on a 3d mesh using Ogre. In order to do so, I perform silhouette detection on the lines of the object (this works) and then project these lines from ...
239 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 ...
383 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 ...
988 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 "...
186 views

### Pinhole matrix problem

I made a program to represent a 3D world. I use the projection matrix we can find on wikipedia. For viewing a scene it's very nice but when I straff in the scene, everything behind the camera go on ...