Questions tagged [perspective]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
25 views

A fresh perspective confusion about a paragraph

I am trying to re-implement the paper "A fresh perspective" In this paper there is one paragraph on secion 2 that reads: Usually, $z_s = z$ is the depth value of the point $P$, unchanged by ...
  • 1,564
1 vote
0 answers
41 views

Inverting perspective projection doesn't yield frustum?

I have a cube with 8 vertices representing the $[-1,1]^3$ cube vulkan uses for device coordinates. The perspective projection matrix takes a frustum and maps it onto this cube. It thus makes sense ...
  • 1,564
2 votes
0 answers
44 views

Can anyone tell me why my projection perspective matrix isn't working?

I'm a beginner in WebGL and graphics programming in general. I'm trying to render procedurally generated terrain. My first stab at this seemed to work and I get the following result. I want to add ...
1 vote
0 answers
18 views

Mapping a box to an inverse frustum

I have a non AA, non cubic, box living happily in 3D. I have a frustum defined by 2 squares. one square is the square defined by [-1, 1]^2 and the other square can have any size, there is also a ...
  • 1,564
0 votes
0 answers
34 views

Camera Perspective of 2D X/Y Plane

I'll start with the coordinate system I'm trying to use: If I were standing on the ground, facing north, the x axis is a line moving from the west to the east (positive X is east). Positive y is ...
  • 101
0 votes
1 answer
49 views

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

I'm trying to render some objects but apparently X and Y coordinates need to be really small in-order to get something on screen. See this example of 2 lines The world space coordinates for these ...
3 votes
1 answer
55 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
38 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,564
0 votes
1 answer
184 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 ...
  • 115
3 votes
1 answer
315 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
104 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
113 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
121 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+...
  • 191
0 votes
0 answers
54 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
231 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 ...
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 ...
user avatar
1 vote
2 answers
196 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 ...
user avatar
1 vote
1 answer
679 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(...
user avatar
0 votes
1 answer
130 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
137 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
209 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 ...
4 votes
1 answer
284 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 ...
  • 115
0 votes
1 answer
148 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
208 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
1k 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
38 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
135 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
228 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,445
0 votes
2 answers
156 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
161 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
1k 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,941
3 votes
2 answers
518 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 ...
  • 33
1 vote
1 answer
230 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
122 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
88 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
1k 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
407 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
64 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
351 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
98 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
141 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
1 vote
1 answer
188 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 ...
  • 11
5 votes
1 answer
620 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
128 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,564
1 vote
0 answers
176 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
224 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
80 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