Questions tagged [perspective]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 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 ...
0
votes
2answers
54 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
1answer
57 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
1answer
87 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. ...
2
votes
1answer
67 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 ...
1
vote
1answer
24 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 ...
1
vote
0answers
29 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
1answer
60 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
1answer
53 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 ...
0
votes
3answers
294 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 ...
0
votes
0answers
118 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 ...
2
votes
0answers
34 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 ...
2
votes
1answer
141 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, ...
0
votes
0answers
57 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
1answer
49 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 ...
0
votes
1answer
114 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 ...
4
votes
1answer
214 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 ...
2
votes
1answer
119 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
vote
0answers
126 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.
2
votes
0answers
213 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 ...
5
votes
1answer
881 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: ...
3
votes
1answer
1k 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-...
1
vote
1answer
66 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 ...
2
votes
2answers
1k 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 ...
4
votes
1answer
294 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 ...
3
votes
1answer
262 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
0answers
40 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 ...
3
votes
1answer
573 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 ...
4
votes
2answers
92 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 &\...
3
votes
1answer
246 views

Creating a vanishing point perspective shader

I have done my due hour of research before asking this question, it's a simple question, but I have found no hint at an answer online. I want the ability to extend an object infinitely in one ...
4
votes
3answers
669 views

Point of view and rotation

Two questions which cross over maths/3D imaging/computer science. I'm trying to describe a point of view of an item in a 3d space and subsequently its rotation in a paper I'm writing. Versions I've ...
5
votes
1answer
620 views

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

I have been learning about projection matrix in OpenGL and I am finding it really hard to understand. All I know is that there are other configurations in the projection matrix besides placing z in w ...
5
votes
3answers
606 views

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

I'm following this tutorial on the perspective projection. Question: If the point of a perspective projection is to create the perspective effect (where objects faraway appear to be smaller): then ...
7
votes
2answers
1k views

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

I'm learning about 3D computer graphics, but I'm having a hard time understanding why the near plane of a viewing frustum can not be placed at z position $0$ (right at the camera). I can understand ...
5
votes
1answer
1k views

Render with camera perspective off-center

So ordinarily we have this But I'm after this! Is it possible to do this? Ideally by changing the projection matrix? The reasoning is kinda interesting - I am developing for mobile VR, and I have ...
3
votes
1answer
32 views

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

I don't completely understand the last part of the MVP matrix (projection). In orthographic projection we simply scale the view volume into the default view volume (+-1 on all axis). In perspective ...
3
votes
0answers
180 views

Calculate Camera parameters and HandEyeCalibration

I'm trying to calculate camera paramters and a hand eye calibration (Transformation from camera to eye (display) coordinates) for rendering on a see-through HMD. I have already calculated a ...
1
vote
0answers
173 views

image warping, given the rotations/translations

in OpenCV there is functions to warp any 2D image using a homography matrix (3x3), e.g. cv2.warpPerspective. These matrices are generally constructed using point ...
4
votes
0answers
56 views

Is it possible to create a forced focus with a dual layer of images in order to Avoid eye strain with Virtual and Augmented Reality?

Would eye tracking allow for the alignment of a dual layered image (a google glass like device and a screen or projection) to provide a way to force the focus of the eyes into to a real life ...
7
votes
1answer
152 views

What is this triangle sub-division scheme called?

I have thought of a triangle sub-division for the purpose of smooth triangulation (no popping) over time on the fly. I think it is very likely the scheme is already invented and has a name but I can´t ...
8
votes
1answer
3k views

Perspective Correct Texture Mapping

So I'm trying to correctly map my textures in my software renderer using the u, v coordinates but I can't seem to get it working. I got affine texture mapping working. This is what I can produce using ...
6
votes
1answer
505 views

Perspective correct interpolation of normal values

I'm currently writing a software rasterizer and I'm at the point where I can draw arbitrary triangles with vertex colors and perspective correct texture mapping. I do point and directional lighting by ...
2
votes
0answers
219 views

How to project a view frustum in an orthographic cuboid?

I know that OpenGL uses a projection matrix to project the view frustum directly into the canoical volume [-1, 1]^3. But how would I project the frustum into an orthographic cuboid, which would then ...
2
votes
0answers
59 views

Perspective Translation Of Quadrilateral

I have mapped four rectangular point(R1->R4) to four quadrilateral points(Q1->Q4) to generate a perspective view. Now I have to translate quadrilateral in x and y direction while maintaing perspective ...
6
votes
0answers
419 views

Perspective-Correct Texture Mapping

I am working on a small rendering engine for a personal project and I am having issues with the texture mapping part of it. It seems to work for some cases, but not for others. For example, when one ...
3
votes
1answer
4k views

Calculate vanishing point

In perspective projection, group of parallel lines have the same vanishing point. I am interesting about the reverse calculation: Getting the group of parallel lines equations that their vanishing ...
2
votes
0answers
75 views

Bilinear Transformation not working

I implemented this algorithm to fit given image to specified quadrilateral but the output is blank. I implemented it in C# as follows ...
10
votes
1answer
15k views

What's the difference between orthographic and perspective projection?

I have been studying computer graphics, from the book Fundamentals of Computer Graphic (but the third edition), and I lastly read about projections. Though, I didn't exactly understand what's the ...
8
votes
1answer
572 views

Calculate aspect ratio from 2D shape in 3D space

Given the 4 coordinates of a 2D shape in a 3D space I want to calculate its aspect ratio. The 3D space is created with 2 vanishing points. The 4 coordinates - marked blue - are the 2D coordinates on ...
24
votes
1answer
821 views

Is my perspective math correct?

I've got a homework in which I have to calculate and plot some points using a pespective transformation, but I'm not sure my results are correct, since the 3d plot using Camera coordinates looks very ...