Skip to main content

Questions tagged [projections]

Questions about the conversions of a 3D model to a 2D model.

28 votes
5 answers
13k views

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

My intuition has always been that when any sphere is projected into 2D space that the result will always mathematically be an ellipse (or a circle in degenerate cases). In the past when I was ...
hippietrail's user avatar
17 votes
1 answer
4k views

How can I generate procedural noise on a sphere?

I would like to generate procedural noise on the surface of a sphere (e.g. to procedurally generate planets or marble-textured balls). Of course, I could just take a standard noise algorithm and map ...
Martin Ender's user avatar
  • 2,730
15 votes
1 answer
479 views

Need a reputable source for the formula for the shape of Earth's horizon

What I'm asking for I stress that I am not asking for the formula---I know the formula, and how to derive it. Several different versions of it are reproduced near the end of the post. In fact, ...
linguisticturn's user avatar
14 votes
1 answer
27k 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 ...
phong's user avatar
  • 275
10 votes
2 answers
5k views

Why do GPUs divide clip space Z by W, for position?

Background: I found that it is very easy to use a linear depth buffer, using only a slight modification to the canonical vertex transformation. The simplest method is found at the bottom of https://...
Jessy's user avatar
  • 203
9 votes
2 answers
3k 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 ...
William Breathitt Gray's user avatar
9 votes
1 answer
3k views

Why are width and height divided by 2 in the perspective projection matrix?

I'm using OpenGL to learn computer graphics. I'm trying to understand projection matrices. The following are shown in the OpenGL 'Red Book': I don't understand why the width and height are divided ...
mikeglaz's user avatar
  • 269
9 votes
2 answers
270 views

What transformations should I apply to a model to produce this 3D effect?

I saw a video on YouTube where a person uses a transparant, knotted pyramid to display "holograms" using their smartphone. (I have not been able to reproduce this yet, so I can't tell for sure if it ...
S.L. Barth is on codidact.com's user avatar
9 votes
1 answer
1k 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 ...
succcubbus's user avatar
9 votes
2 answers
912 views

How to unproject quadrilateral into rectangle?

tl;dr: Math problem in projective geometry: How does one find some 4x4 camera matrix that gives a projection as illustrated below, such that points A,B,C,D are somewhere on the edges of the unit box (...
ninjagecko's user avatar
7 votes
1 answer
4k views

Zoom in orthographic vs perspective projection

I have read through this article about perspective and orthographic projection matrices. I started playing with the perspective matrix and as expected if I either increase/decrease the field of view ...
BRabbit27's user avatar
  • 969
6 votes
1 answer
782 views

3D projection that increases objects' size as they become more distant

tl;dr Is there a name for a type of (non-physical) projection that causes objects to become larger the farther they are from a camera? With a fisheye projection, an object twice as far from the ...
Phrogz's user avatar
  • 195
6 votes
1 answer
137 views

Materials for research on spherical projection

I am currently doing a research on projection on a sphere, specifically for NOAA's project Science on a Sphere. What I'm trying to do is to find out how exactly do you create a video material for such ...
Michal Kučera's user avatar
5 votes
3 answers
756 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 ...
George's user avatar
  • 253
5 votes
1 answer
2k 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 ...
Hamish Todd's user avatar
5 votes
1 answer
230 views

Solving a problem from *Foundations of Computer Graphics*:

From Gortler's Foundations of Computer Graphics (i.e., self-study): Let $\mathbf{\vec{e}}^t = \mathbf{\vec{w}}^t E$ and let $P$ be a camera matrix that is just some arbitrary $4$ by $4$ matrix with ...
George's user avatar
  • 253
5 votes
2 answers
228 views

How to get the transform amount from a screen vector and a direction vector?

I am working on the move tool in a 3D modeling software. I need to know how much to move when the user drags an axis of the gizmo (for example along the x axis). I have the 2D vector describing how ...
arthur.sw's user avatar
  • 377
5 votes
1 answer
844 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 ...
Owen's user avatar
  • 53
5 votes
1 answer
240 views

Am I calculating perspective projection correctly?

If I have a point in world space: (wx, wy, wz) and I have a centre of projection: (cx, cy, cz) and I wanted to project that point using perspective projection would my point on the screen be ...
S.A's user avatar
  • 317
5 votes
1 answer
164 views

Where should I project a polygon corner when it is behind me?

I am creating a simple 3D engine as a learning project to get the hang on spherical trigonometry. I am using the following approach. 1. A model consists of a lot of triangular faces. 2. Each triangle ...
SE - stop firing the good guys's user avatar
5 votes
1 answer
167 views

Project quad onto ellipse in 3D

I have three points P0, P1, P2, which are located on an arbitrarily oriented ellipse in 3D space. I have a square texture map with a circle on it. I would like to render a textured quad (with the ...
Russell Borogove's user avatar
4 votes
1 answer
270 views

Projected points and screen coordinates

I'm trying to understand part of the contents of a slide, but I'm not really understanding. So, here's the interested part. I've a few questions. Are the projected points $q_1$ and $q_2$ the points ...
user avatar
4 votes
1 answer
2k 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. ...
lightxbulb's user avatar
  • 2,226
4 votes
1 answer
313 views

Creating Sparks using Code

I'm new to this area and have less knowledge. I want to create some graphics like sparks and lightning by writing some code, using my own physics. I don't want to use some engine, However I can use ...
sdfsdf's user avatar
  • 41
4 votes
2 answers
110 views

2D projection from some points

I am going through an undocumented function that takes in three points and a Z-value that projects three points on the plane defined by Z-value. I want to understand the mathematical theory behind it ...
sajis997's user avatar
  • 1,279
4 votes
1 answer
1k 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: ...
arthur.sw's user avatar
  • 377
4 votes
1 answer
8k views

understanding glm::perspective vs glm::ortho

I'm new to computer graphics. I played around with OpenGL and now am trying out Vulkan. Basically what I want to do, in 2D is have an 800x800 window, and I want that to represent 800 meters by 800 ...
mikeglaz's user avatar
  • 269
4 votes
1 answer
1k 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 ...
Brovidio's user avatar
4 votes
0 answers
177 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 ...
Chris's user avatar
  • 41
3 votes
2 answers
277 views

$(x, y, 1)$ is 2D homogenous coordinates or 3D homogenous coordinates?

We know that $(x, y, 1)$ are the homogenous coordinates of a 2D point $(x, y)$. $(x, y, 1)$ has 2 degrees of freedom. That's why we should call it 2D homogenous coordinates. But many websites say it's ...
S. M.'s user avatar
  • 211
3 votes
1 answer
2k views

How to unproject cursor with orthographic projection

With perspective projection we can unproject screen space coordinates of the cursor to the near and far plane of the frustum and calculate the direction of the ray through the cursor. ...
Lenny White's user avatar
3 votes
1 answer
2k views

Need help with change of basis (world to camera frame)

I'm reading up on coordinate systems and geometric transformations but the change of basis topic still confuses me. I found this exercise but, honestly, I wouldn't know how to begin: Given a world ...
JohnDoe's user avatar
  • 33
3 votes
2 answers
2k views

My perspective projection is messed up?

So I've been messing with perspective projection matrices recently. I used numpy and GTK/Cairo to make a very small Python renderer. I'm very confused with the results I'm getting though. I took this ...
divx's user avatar
  • 41
3 votes
1 answer
965 views

Difference between transformation and projection? [closed]

We know that world coordinates $(x_w, y_w)$ transform to viewport coordinates $(x_v, y_v)$ which are the physical device coordinates. And during projection, any point $(x, y, z)$ projects to $(x, y)$ ...
user avatar
3 votes
1 answer
859 views

Difference between 2D and 3D pipeline

2D transformation and viewing: The camera projects the 2D world co-ordinate $(x_w, y_w)$ on its projection plane which co-ordinates $(x_v, y_v)$. 3D transformation and viewing: The camera projects the ...
user avatar
3 votes
1 answer
971 views

What to reproject when doing temporal filtering in stochastic screen space reflection?

I am in the middle of implementing stochastic screen space reflection based on frostbite presentation here. On page number 39, it is stated that we need to reproject the ray intersection location ...
kevinyu's user avatar
  • 493
3 votes
3 answers
3k views

3ds max: Z-fighting when working with Large Objects

I had a z-fighting/z-clipping issue with a scene containing some very large objects yesterday in 3ds max. It can be seen in the image below: For some reason downscaling the scene significantly (a ...
Maarten -Monica for president's user avatar
3 votes
1 answer
6k views

Screen to World coordinates glm::unProject

I'm having some trouble trying to figure out how to go from a coordinate on the screen, to 3D world coordinates on a plane. My case is as seen on the picture further down. World origin is in the ...
remi000's user avatar
  • 240
3 votes
1 answer
48 views

Formula for cubemap resolution for intended equirectangular resolution

Suppose I want to render out 6 cubemap cameras (90 degree FOV etc.) with the intention of combining them together in post-production into an equirectangular (latlong, 2:1) image. Suppose I also know ...
kinkersnick's user avatar
3 votes
0 answers
98 views

Possible approach for product mockup creation including distortion created through perspective

I am not an expert in 3D nor computer graphics. Please forgive me if I use wrong wording. High level problem description: For an online shop, I would like to create mockup images of apparel (t-shirts,...
andreas's user avatar
  • 131
3 votes
0 answers
215 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 ...
user2479595's user avatar
3 votes
1 answer
513 views

A question about derivation in oblique view frustum

Problem Description: Reference: Oblique View Frustum Depth Projection and Clipping "Mathematics for 3D Game Programming and Computer Graphics" 3rd edition, chapter 5.6. M is the original projection ...
zombielei's user avatar
  • 121
2 votes
2 answers
251 views

How do I evenly subdivide the projection of a circle in 3D?

I want to draw a circle in 3D from line segments. There are plenty of examples how to do this with an even number of subdivisions in 3D space, but I want the minimum number of subdivisions to produce ...
user1387's user avatar
  • 121
2 votes
1 answer
257 views

Is it possible to make a projection matrix to not project in the center?

I have the following projection matrix: and I need to make a hole in the center of my matrix, something like that: (I don't want to project a custom W and H) Is that possible ? Thanks.
Cosma Eduard's user avatar
2 votes
1 answer
16k views

How to derive a perspective projection matrix from its components?

This has been haunting me for several days now. I want to find the component that makes up of this 4x4 perspective projection matrix, with $l$(left), $r$(right), $b$(bottom), $t$(top), $n$(near), $f$(...
Manh Nguyen Huu's user avatar
2 votes
1 answer
82 views

When fitting 3d cuboids into a box, how to find the order of drawing (in a 2D projection) so that the cuboids don't appear to overlap?

I am working on a 3D packing algorithm (MIT-licensed). The box and the cuboids it contains are displayed as a 2D projection. The order of drawing the cuboids (now represented as polygons) is important:...
developer1405's user avatar
2 votes
1 answer
220 views

$P^2$ vs projection plane

I want to explain what I understood of definition of the two things. Projection plane: The general processing steps for modeling and converting a world coordinate description of a scene to device ...
user avatar
2 votes
1 answer
131 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. ...
Makogan's user avatar
  • 1,736
2 votes
2 answers
327 views

Parallel projection is special case of perspective projection

I synchronized with @David k's first and second answer regarding perspective and parallel projection. From the first question I understand that the image on the screen is typically described in ...
user avatar
2 votes
1 answer
356 views

How is orthographic projection used in computer graphics technically classified as a projection?

I'm wondering why the orthographic projection we use in computer graphics is called a projection, if all it does is just scale and translate a mesh? According to wiki orthographic projection is ...
Lenny White's user avatar

15 30 50 per page