Questions tagged [perspective]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
34 views

Camera model for rendering the viewport as a window frame?

I want to render as if someone is looking at a landscape through a window, adjusting for the viewer's head position. The landscape is easy enough (just a distant plane), but I'm not sure how to ...
0 votes
0 answers
32 views

What do the symbols in a fisheye projection stand for?

The wikipedia page on fisheye lenses provides multiple formulations: Stereographic Equidistant Equisolid angle Orthographic $f=\frac{r}{k \tan(\theta / k)}$ $f = \frac{r}{\theta}$ $f = \frac{r}{2 \...
  • 1,449
0 votes
1 answer
70 views

Where exactly is the image plane / plane of projection

Perspective projection matrices we use map 3D coords onto some imaginary image plane in front of the cameras pinhole position by casting a ray directly from the eye position to that 3d coordinate and ...
  • 105
2 votes
1 answer
159 views

How to derive Field of View (FOV) angles from a 2D projection

I'm looking for some guidance. I'm not sure if this is possible, and I'm not sure where to start. I need to measure the FOV angles of a first-person, 3D game using only gameplay screenshots. I'm bound ...
0 votes
1 answer
58 views

How to translate screen coordinates of a 3d point as the viewport size changes assuming camera state remains constant?

Okay, so let's say I have a point in 3d. And I have a camera state. That is, I know the camera position, the camera target and the camera up vector. I am using the perspective projection to get the ...
2 votes
0 answers
91 views

physics/math of lighting gradient of a 3D object

Consider a monochrome ball. The colours of the pixels is a function of the point height, the light intensity, the light angle, and the surface material (reflection). What is the simplest formula ...
  • 131
-1 votes
1 answer
101 views

Why we calculate z buffer value from plane equation $AX+BY+CZ+D=0$?

Suppose in perspective projection $(x, y, z)$ coordinate projects to point $(x_p, y_p, z_{vp})$ in projection plane $AX+BY+CZ+D=0$ where projection plane kept at $z_{vp}$ position. And the plane $AX+...
0 votes
0 answers
47 views

Using Perspective Rendering To Render A 3D Point

I am wondering how I can use perspective rendering to render a point onto a screen. An image showing perspective rendering: Say I have a 3d point (with x, y, and z coordinates), a point for the ...
0 votes
1 answer
199 views

Perspective transformation is perspective projection? [duplicate]

I know that ( Reference )in transformation source and destination has same coordinates dimensions. But in projection destination coordinate system has fewer dimensions than the source coordinate ...
's user avatar
1 vote
5 answers
1k views

Existence of vanishing point

Consider the following example of perspective projection: I have one railway track with two parallel lines meeting at the point $X$ at infinity which is the theoretical approach. This X is called the ...
's user avatar
1 vote
2 answers
170 views

Difference between perspective and parallel projection [closed]

We know that in orthographic Projection Projectors (projection vectors) are perpendicular to the projection plane. And in Perspective Projection Object positions are transformed to the view plane ...
's user avatar
1 vote
1 answer
451 views

Why are vanishing point and centre of projection the same [closed]

We know that in perspective projection object positions are transformed to the view plane along lines that converge to the projection reference (center) point like this: But many websites say that COP(...
's user avatar
0 votes
1 answer
103 views

How do I perform a perspective transform on a straight line?

I'm trying to make a software renderer, but I want to avoid creating extra triangles with clipping. For this I want to transform lines which compose triangles, instead of individual points. However I'...
2 votes
1 answer
114 views

Deriving formula for perspective correct interpolation

I am trying to derive the formula for perspective correct texture interpolation on my own while implementing my own software rasterizer (projecting an arbitrarily rotated triangle in camera space on ...
  • 162
5 votes
2 answers
179 views

Rendering Hypercentric Perspective

I came across some Non-Euclidean Games which involve Hyperbolic Spaces, Spherical Spaces, Portals, etc. And, I noticed that they give quite deep feel of what Non-Euclidean Spaces feel like. So, I was ...
3 votes
1 answer
191 views

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

For example, when you want to compute the world space position of a fragment in the fragment shader, you can construct the fragment's NDC coordinates, then multiply by the inverse of whatever ...
  • 105
0 votes
1 answer
118 views

Simulate projection matrix deformation in two camera setup

For educational purposes I'm trying to simulate what a scene would look like with a perspective matrix deformation (before everything is brought to NDC) but I'm unsure how to do this. I'd like to do ...
0 votes
1 answer
174 views

How does 3D graphic software adjust for distortion inherent in perspective projection?

As this question and its answers point out, projecting a sphere on a flat picture plane, with perspective projection, may result in a ellipse, not a circle, and my understanding is that the only way a ...
1 vote
1 answer
817 views

What is principal vanishing point in perspective projection?

I am unable to visualize what is principal vanishing point w.r.t to x axis ,y axis z axis do someone can post some simple diagram to understand what is it? Also I have question in my text book ' ...
1 vote
1 answer
33 views

Does angular diameter to FoV ratio equal object's image to total image ratio?

If we have an object at certain distance D in front of a camera. The object has a horizontal diameter d, giving us an angular diameter theta (2*arctan(d/2D)) of 50 degrees (converted from radians). ...
  • 115
4 votes
0 answers
119 views

Project grid on 2d plane based on camera perspective

Unsure if this is the right network to post this, but maybe someone can help... I'm working on a personal project where, with the help of AI, I want to automatically estimate the perspective of a ...
  • 41
0 votes
1 answer
172 views

Perspective projection near plane not in world coordinates

I have a camera I have placed zunits away from a billboarded rect. My goal is to discard all other geometry that is closer to the camera/in front of this rect. With ...
  • 1,365
0 votes
2 answers
134 views

Shear(?) matrix projection along Z (depth) axis

I'm creating a primarily 2d game (platformer perspective) with 2d background parallax layers. The parallax effect falls out of the fact that I'm positioning a bunch of layers in 3d and using a ...
3 votes
1 answer
150 views

Interpolate vertex attributes with $z$ AFTER homogeneous divide

Usually, if we want to interpolate some vertex attributes, say $A_1$, $A_2$ and $A_3$, we have to first divide them by their corresponding $z$ in view space, then we interpolate them using barycentric ...
4 votes
1 answer
750 views

Perspective correct interpolation z-buffer

While I was deriving expressions for perspective-correct linear interpolation on triangles, I reached the conclusion that the interpolation may be kept linear only if view-space $Z$ is available. ...
  • 1,901
2 votes
1 answer
428 views

Which perspective projection matrix to use

I've seen two different perspective projection matrices being used but I want to know which one of them is the best. I think that they both output the same but I'm not sure. So if anyone can help me ...
  • 23
1 vote
1 answer
176 views

Is there a general rule with regard to using the inverse of the "camera" to world when using a homogeneous transform matrix?

Not sure if this is just specific to this article but it says: We learned how to convert points from world to any local coordinate system. If we know the local-to-world matrix, we can multiply the ...
  • 113
1 vote
0 answers
42 views

How to get "Equal" (saturation, brightness) Red and Green Colours in a Web-based Application?

I am looking for a red and a green hue that are equally discernable against a gray background on any PC monitor, using HTML/CSS-based application. There are many possible solutions to balance these ...
0 votes
1 answer
108 views

Apply Projective Transformation 2D Rectangle

I want to write code from scratch about Projective Transformation in order to apply this transformation to 2d rectangular. I searched about this transformation, but I could not figure out completely. ...
0 votes
1 answer
77 views

Keep constant number of visible circles in 3D animation

I have created a 3D animation with a perspective projection of white circles moving randomly in a fake 3D space projected on a 2D computer screen (GIF 1). Since I need to keep the same number of ...
  • 113
0 votes
3 answers
991 views

perspective matrix derivation

Now there has already been an answer here in this stackexchange, but I don't understand certain aspects of it. The author has MORE DETAILED DESCRIPTION HERE(#1) but the problem is he doesn't describe ...
  • 117
0 votes
0 answers
338 views

how is zooming done in computer graphics

Since a projection plane and a center of projection is used for achieving perspective projection, the shape of the view frustum doesn't change changing the focal length(which is the distance from the ...
  • 117
2 votes
0 answers
55 views

Project a Square as rectangle in projection plane using perspective projection

Consider a square S with vertices (1,1,0), (1,-1,0), (-1,-1,0) and (-1,1,0) and a plane P defined by $z=1$. Let the perspective projection of S on P is denoted by S'. What coordinates of the Center ...
  • 21
2 votes
1 answer
305 views

Rasterizing spheres?

I want to start developing a hybrid renderer: it first applies a rasterizer, then stores for each pixel the surface pointer, normal vector, and distance to the camera. Then it raytraces reflections, ...
  • 284
0 votes
0 answers
86 views

Issue with perspective projection

I have the following problem. Perspective projection is often referred to when talking about camera models. I don’t think I understand it very well though this concept is taught when I was at junior ...
1 vote
1 answer
131 views

Change of speed but no change of size after OpenGL Perspective Projection

I am new to OpenGL and I am trying to code un optic flow with dots appearing from the background and moving towards the viewer. As a consequence of a perspective projection, the dots are faster and ...
  • 113
0 votes
1 answer
176 views

WebGL Can't render anything, wrong projection?

I'm trying to understand and learn WebGL and computer graphics from the bottom up, that is why I started to work on my own little library for that. I've spent a couple of days looking for a right ...
  • 1
5 votes
1 answer
556 views

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

If I have a straight line in 3D space and I use a camera matrix to do a perspective projection into a 2D plane/screen will the resulting line always be straight too? If I project the start point and ...
  • 53
2 votes
1 answer
126 views

Computing perspective directly

Assume the screen is axis aligned with origin at 0 and there is absolutely no view transformation. in other words we will simply try to project the model onto the screen plane following perspective. ...
  • 1,449
1 vote
0 answers
169 views

How to calculate solid angle subtended by a pixel?

How is the solid angle subtended by a pixel calculated? both in perspective and fish eye lens.
  • 700
2 votes
0 answers
220 views

Using GPU instead of CPU in Scala

I wrote a program that displays points expressed in 3D in a 2D canvas, using perspective projection. The aim is to display a cube. Each face of the cube is drawn by linearly interpolating the points ...
4 votes
1 answer
1k views

Inverse value in a Perspective Matrix

I am a new leaner of computer graphics. I'm trying to understand a code I found online and I got stuck in the following formula: ...
  • 143
4 votes
1 answer
2k views

Why does this gl_FragDepth calculation work?

I am raytracing in GLSL. My gl_FragDepth calculation wasn't right, so I did some hunting and found this solution (P is the world-...
  • 279
0 votes
1 answer
76 views

Determining slopes of lines in perspective projection

Suppose I have parallel lines running along the ground (into the horizon). If I have a camera and I know its tilt angle, is there a way to calculate the slopes of the lines as projected to the 2D ...
  • 101
2 votes
2 answers
2k views

Changing the projection reference point in Open GL

By default, the eye an the projection reference point PRP are in (0,0,0). I can change the eye position with gluLookAt(), but how can I change the PRP (i.e., the convergence position for a set of ...
  • 123
3 votes
1 answer
362 views

Determining Vanishing Points of edges of Triangle using given Point

Due to perspective foreshortening, the projections of parallel lines (1D geometric objects) meet in their vanishing point (a 0D geometric object). Higher dimensional geometric objects also has higher ...
2 votes
1 answer
435 views

How to calculate camera distance so that after projective transformation a quad is filling the whole screen

First of all, I'm using OpenGL and GLM. Now, I have a square perpendicular to the z-axis and centered around it. Let's say that it has Z-value (offset along the Z-axis) X. Now, I want to set up a ...
1 vote
0 answers
43 views

3D reconstruction using 2D matched points

I have 2 images, called left and right images. I have some matched points $[c_l,r_l]$ and $[c_r,r_r]$ in both of them (these points are in pixel coordinates). For a 3D point in the real world, they ...
  • 11
2 votes
1 answer
1k views

Why is the line from the camera to vanishing point parallel to the other parallel lines?

When trying to find the vanishing point of an image, why is it that the vector from the center of the camera to the vanishing point is parallel to the parallel lines of the image? What's the ...
3 votes
2 answers
102 views

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

Perspective Camera A (row-major) perspective transformation matrix has the following format: $$\begin{align} \mathrm{T} &= \begin{bmatrix} \mathrm{T}_{00} &0 &0 &0 \\ 0 &\...
  • 1,024