# Tag Info

Accepted

### Does a sphere projected into 2D space always result in an ellipse?

Assuming a perspective projection and a view point external to the sphere, then the 'boundary' formed by the view point and the circle on the sphere which forms the horizon WRT the view point, will be ...

### Does a sphere projected into 2D space always result in an ellipse?

This is more like a long comment to @SimonF's answer that I'm trying to make somewhat self contained. All cuts of cone are possible, hyperbola, parabola and ovals. This is easy to test by drawing ...

### Does a sphere projected into 2D space always result in an ellipse?

Projection systems are used to convert a 3D shape to a planar (2D) shape. According to the type of projection system, different results and shapes like rectangles, pies, ellipses, circles, ... can be ...
Accepted

### How am I able to perform perspective projection without a near plane?

The near and far planes of a viewing frustum aren't needed for simple 3D→2D projection. What the near and far planes actually do, in a typical rasterizer setup, is define the range of values for the ...

### Does a sphere projected into 2D space always result in an ellipse?

SimonF's reasoning basically convinced me, but I decided to do a sanity check. I loaded up a UE4 level that happens to have some spheres, like this one: I set the camera FOV up to 160 degrees to give ...
Accepted

### What's the difference between orthographic and perspective projection?

Orthographic projections are parallel projections. Each line that is originally parallel will be parallel after this transformation. The orthographic projection can be represented by a affine ...
Accepted

### Perspective Correct Texture Mapping

You are on the right track but what you need to do is to calculate u/w and v/w, and also 1/w for each vertex, which you interpolate linearly in screen space in your rasterizer. Then for every pixel ...
Accepted

### Is my perspective math correct?

Identifying your axes in both figures and adding the camera position to your first figure would help you understand what's going on. You could also have a single variables for all your points, ...

### How am I able to perform perspective projection without a near plane?

In this case, the geometry of similar triangles ABC and ADE is used to determine the height of D via the solution of DE. It is obvious that if the near plane is at 0 (AE=0), then a division by 0 ...
Accepted

### Render with camera perspective off-center

Yes, you can use an off-axis projection matrix. This is what I use in my code (note: I shift the centre upwards, not left as you do in your example.) ...
Accepted

### Calculate aspect ratio from 2D shape in 3D space

The ratio is with a quick and dirty visual measurement $665:501$ which is approximately $5:4$. You can measure it by taking the ratio of the vanishing angles $\alpha/\beta$ (see picture 1) because we ...
Accepted

### Why is the back of a perspective frustrum larger than the front?

It might help to think of it this way: Both the near plane and the far plane are the size that will fit onto the screen you are viewing on. The further away something is, the bigger it can be and ...

### What is this triangle sub-division scheme called?

Instead of subdividing until reaching certain edge length on screen, you should look into GPU Gems 2 article "Adaptive Tessellation of Subdivision Surfaces with Displacement Mapping" by Michael ...
Accepted

### Why does this gl_FragDepth calculation work?

What you are missing is, that in OpenGL's NDC space (i.e. clip space after division by w) all 3 coordinates are in the range $[-1,1]$. So ...
Accepted

### Supporting multiple camera types in a deferred renderer without specializing the shaders or in the shaders

Projective transformations (represented by 4×4 projection matrices) are invertible. You can go from NDC coordinates back to view space using the inverse of the projection matrix, in the same way that ...
Accepted

### Is placing z value of vertex in w enough to achieve perspective projection in OpenGL?

The projection matrix distorts the view frustum (the volume the camera can see) into a unit cube. So everything with all coordinates in the range -1 to 1 after projection is potentially visible, and ...
Accepted

### Perspective correct interpolation z-buffer

Yes, that's correct. Perspective-correct interpolation works by (for some quantity $u$ to be interpolated) calculating $u/z$ and $1/z$ at each vertex, linearly interpolating those values in screen ...
Accepted

### OpenGL - How to increase view space coordinate range in X and Y axis

I was converting the angle to radians twice guys. Moral of the story is to take breaks when coding.

### Why is the back of a perspective frustrum larger than the front?

It is bigger because it fills the same view and it ts further away. It would be smaller if it wouldn't fill the same view but then it wouldn't fill the camera view and it wouldnt work. So the inverse ...
Accepted

### Computing perspective directly

Copying this from another thread where i posted this as the answer but as Wyck suggested, the correct answer is the first one. There is the whole derivation of it but I'll be discussing a brief ...
Accepted

### Do straight lines always remain straight when projected with a perspective camera?

"A not so simple approach". I may have messed a little bit too much with grouping the terms, do forgive my elementary math skills, it's a side effect of using tools like wolfram and mathematica too ...
Accepted

### Interpolate vertex attributes with $z$ AFTER homogeneous divide

The $Z$ of NDC space is related to $1/Z_\text{view}$ but not the same. With a typical projection matrix, they're related by an affine remapping, $$Z_\text{NDC} = a \, \frac{1}{Z_\text{view}} + b$$ ...
Accepted

### Why perspective division ( div by w) when applying the inverse to a perspective transformation?

The way homogeneous coordinates (x, y, z, w) work is that if you multiply the vector by any nonzero value, it still represents the same point in 3D projective space. These different xyzw ...

### Rendering Hypercentric Perspective

You can approximate the view of a hypercentric camera with an ordinary 3D perspective camera if you are able to manipulate the projection matrix, and/or reverse the direction of the depth test. In a ...
Accepted

### Existence of vanishing point

My first question is how we can say it doesn't exist, but when we see real image of railway track they intersects at X? Because human vision only sees a perspective on reality. It may appear to cause ...
Accepted

### Perspective correct interpolation of normal values

Perspective correct interpolation of normals works just as it does any color or coordinate or other linearly varying attribute. Each component of each varying vector is interpolated independently as ...
Accepted

### Calculate vanishing point

Here's a hint to get you started: Parallel lines include the line through the camera. So really all you need is the direction from the camera to the vanishing point on the view plane. Then create ...
Accepted

### Getting from the default view volume to an image on the screen

The mapping from NDC space to screen space is orthographic. The x is mapped linearly from [-1, 1] to [0,viewport width], same with y and viewport height. This mapping happens after the projection ...