Questions tagged [projection]

Projections are several different types of geometrical mapping functions. In 3D, a projection maps three-dimensional points to a two-dimensional plane.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Dimetric Screen to World coordinates

I've got a successful projection of world coordinates to the screen, but when I try to generate a ray for screen coordinates to the world, it always generates a fixed point which is invalid. I started ...
George's user avatar
  • 101
0 votes
0 answers
53 views

When does normalization happen in the perspective projection matrix

I am currently watching this video where the instructor shows how the perspective project matrix is actually derived. There are a few things that I am still unclear of. Firstly he says we need to ...
Shaharyar Ahmed's user avatar
0 votes
0 answers
42 views

Manual calc of perspective projection and getting point on the screen

I'm need to draw the red rect on the first vertex of gray platform. To begin with, I draw a gray platform with a perspective projection and set it using gluPerspective: ...
ladno's user avatar
  • 1
0 votes
1 answer
77 views

How do I determine which pixel is under the cursor when looking at an equirectangular image through a camera?

I am working on a game. The camera is freely rotatable by the user. The background is displayed from an equirectangular image. I need to know which pixel of the background image is located under the ...
Matthew Carson's user avatar
1 vote
0 answers
44 views

How to Generate a Texture to Make an Obstructing Plane Appear Invisible in a 3D Scene?

I have a 3D scene with a camera. Between the camera and the scene, I have a plane with arbitrary orientation. This plane obscures a portion of the scene from the camera’s perspective (anything behind ...
John's user avatar
  • 111
2 votes
1 answer
208 views

Calculation of far distance plane based on yaw and pitch for a map renderer

I'm working on a vector map renderer. I want to calculate the far plane for a protective transformation, based on the yaw, pitch, roll and height of the camera above the map. Yaw (looking to the left ...
maxammann's user avatar
  • 123
2 votes
0 answers
76 views

How to correctly rotate 2D orthographic projection around a central point?

I want to rotate a 2D orthographic projection around the centre point of my view. However, something is off (it looks like a translation) but I'm not sure what. To put some concrete values on the ...
junglie85's user avatar
  • 123
0 votes
1 answer
309 views

Camera Calibration custom Model-View-Projection matrix in Unity?

Coming from this topic I have a Model-View-Projection Matrix obtained from a Camera Calibration method, from where I want to render the scene: ...
Bontempos's user avatar
0 votes
1 answer
314 views

glm::frustum vs glm::perspectiveFov

When I use glm::perspectiveFov(90.0f,512.0f,512.0f,1.0f,256.0f) I receive a working perspective projection with 90° in both x and y, as seen below (camera is in ...
Raildex's user avatar
  • 761
0 votes
0 answers
221 views

Implementing Camera Movement and Rotation in 3D Game Engine

Apologies in advance for any mistakes on terminology, I'm really really new to this I'm completely new to 3d (and it's maths) but as a personal exercise I'm doing my own game engine that displays a ...
MiguelP's user avatar
  • 103
0 votes
0 answers
37 views

Perspective projection distortions

I'm building my own engine using python and pygame however my cube model is not able to be displayed correctly. This is my result after applying translation, scaling and projection matrices: ...
Zoler1337's user avatar
0 votes
1 answer
132 views

Perspective projection not working as intended

I copied a perspective projection matrix from here (https://jsantell.com/3d-projection/) and applied it to my vertices. It looks ok but without depth. Rotation matrices also work. When I try to divide ...
Zoler1337's user avatar
0 votes
2 answers
115 views

Hybrid perspective / orthographic projection

I'm trying to figure out how to setup camera projections such that they fulfill following requirements: main scene is rendered with perspective projection camera / viewport controls allow only zoom (...
skrat's user avatar
  • 173
1 vote
2 answers
178 views

In a 3D projection, how to find 'w' for every y point on the screen

I have a standard 3D rendering pipeline. Let's say I have a camera looking down at a flat plane that represents the floor. (in my game, z = height, so this is a plane where z == 0), and for ...
Tom Davies's user avatar
1 vote
1 answer
96 views

Solving distortion with non-linear scaling in a shader

I am currently working on implementing an older paper in Unity to show the progression of some graphics technologies, and part of that involves sprites being able to cast shadows. A trivial ...
Noon's user avatar
  • 13
0 votes
0 answers
54 views

3d camera control on XY plane controlled by mouse

I am creating a 3d game with a isometric view. I have a problem implementing camera controls. I can control angles of camera, but my view is scrollable only in the XY axis (camera is always up, Z axis)...
Darek Naurecki's user avatar
1 vote
1 answer
782 views

How to project a Vector3 onto the xz plane?

I have this code that tries to check whether a lobbed grenade will head toward a teammate: ...
mLstudent33's user avatar
13 votes
2 answers
3k views

How to make backface culling work correctly in both orthographic and perspective projection?

I have a software renderer that I've been building. I just implemented backface culling with the Go code below. This works with Perspective Projection. But I plan to use orthographic projection. When ...
Adam P's user avatar
  • 233
0 votes
1 answer
42 views

Object stuck to screen no matter what eye position is used

I've run into an issue when trying to write a simple rendering program in D3D11. I'm 90% sure it's to do with some faulty matrix multiplication or generation, but I've tried debugging the values of ...
vK 3 1 RON's user avatar
1 vote
1 answer
316 views

D3D12: how to enable perspective correction when interpolating UV coordinates?

Good morning, I am currently running into a UV interpolation issue with D3D12 that looks like this: Is there something that needs to be set when initialising the pipeline so that the GPU does the ...
Mike Tearon's user avatar
0 votes
1 answer
106 views

Move player towards screen

I've got a fixed projection perspective camera with a vertical FOV of 70 deg and rotated 45deg on Y axis. Player movement is along Camera's X axis (right/left), Z axis (front/back), Y axis is set to 0....
michaeltintiuc's user avatar
0 votes
1 answer
1k views

Decal Projector equivalent in unity's standard shader pipeline

I have a script in my Unity project that creates glowing outlines around objects when highlighted in a scene. The shaders don't work properly with the URP or HDRP. However, I want to create a move ...
pocketlint60's user avatar
0 votes
5 answers
1k views

When moving the "camera" should one move the projection matrix or move the world?

I'm making my own game engine as an exercise and I've gotten really confused with what I've read so far. When I want to move my camera do I simply just move the world or move the position of the ...
MiguelP's user avatar
  • 103
0 votes
1 answer
58 views

Matrix math: How to specify camera distance so that an object with a given size is completely visible?

This is my code that draws a top down view tile based map. But Iam do not know how high the camera needs to be placed in the sky so that the map is fully visible so that nothing is cut away and I do ...
codymanix's user avatar
  • 364
1 vote
1 answer
97 views

Determine if a static mesh is lit by directional light

I want to determine if a mesh is lit by the directional light on my scene in editor to automatically disable its "dynamic shadow casting" property (let's say I have one light source in my ...
Netherwire's user avatar
1 vote
2 answers
723 views

Custom directional shadow map from sun

Due to some material features, I need to create my own directional shadow map. Everything seems to work ok, until the moment where I compare depths. First I add a camera component to the directional ...
user81986's user avatar
  • 173
1 vote
0 answers
71 views

Fast way to test whether a point is over a 3D mesh

I have a map with islands, and I need to detect whether the player is on an island or not. The player can be flying far above the island, so a fixed-distance raycast is not sufficient, and firing long ...
Robotex's user avatar
  • 251
0 votes
1 answer
314 views

Planar projection texture mapping algorithm to UV coordinates algorithm explanation

I am using an engine that uses a texture mapper where instead of providing per-vertex UV coordinates a 3D point(P) and 2 vectors(M, N) is provided, the texture coordinates can be directly computed ...
Suic's user avatar
  • 119
0 votes
1 answer
178 views

Converting UV coordinates to planar projection algorithm

I'm using an engine that implements a texture mapping technique where the texture map for each triangle is defined by a point(P) and 2 vectors(M, N) instead of per-vertex texture coordinates P defines ...
Suic's user avatar
  • 119
2 votes
2 answers
592 views

How to implement cylindrical projection?

This question (and particularly, its answer) talked about how traditional, planar projection matches most monitors... except when it doesn't. Assuming I'm a glutton for punishment, and really, really ...
Matthew's user avatar
  • 143
-1 votes
1 answer
184 views

Drawback of painters algorithm:

We know that to scan convert any polygon first we need to pass any 4 tests of Painter's algorithm. Suppose I have two polygon S1 and S2, which order is S1->S2.we see that all 4 tests are failed. ...
S. M.'s user avatar
  • 117
0 votes
1 answer
258 views

How to visualize angle of projection in Oblique Parallel Projection?

We know that in Oblique Parallel Projection Point (x,y,z) is projected to position (x_p,y_p) on the view plane.Projector (oblique) from (x,y,z) to (x_p,y_p) makes an angle alpha. with the line (L) on ...
S. M.'s user avatar
  • 117
-1 votes
2 answers
326 views

3D image projected to 2D image

We know real world images are 3D.when we projects image from real world this image projects into 2D image where Z component is constant or zero. But when capture the below image which seems to 3D(z ...
S. M.'s user avatar
  • 117
0 votes
1 answer
87 views

Painter's theorem inside and outside test [closed]

I have read from Hearn and Baker computer graphics book. I read the test#2 painter's theorem which image is given below. This image showing surface S is completely behind the surface S', by checking ...
S. M.'s user avatar
  • 117
3 votes
0 answers
1k views

How to project 3D meshes onto a 2D plane producing a 2D polygon silhouette?

I would like to project a number of separate 3D meshes onto a 2D plane and create a 2D polygon representing the outline of all the meshes. I would also like to to create multiple 2D polygons if the ...
Path's user avatar
  • 31
1 vote
0 answers
51 views

3D projection, Similar to SceneCapture2D

I would appreciate some help, I was wondering if it was possible in UE4 to do a "3D projection" of a scene, Similar to what SceneCapture2D does, but the viewer can see a 3D scene (with a ...
Nota's user avatar
  • 11
1 vote
0 answers
100 views

How to make a multiplayer game for multiple screen sizes?

I am making a 2d multiplayer game for Android, targeted to run on every device. How do I calculate the common position of an asset, independent of screen size? What size map should I assume is a ...
Abhay Kumar's user avatar
2 votes
0 answers
169 views

Approximate doom/heretic-style freelook distortion with modern graphics APIs

Currently working on a doom-like engine with fewer technical limitations, and looking into rendering techniques. I'm aware doom's a raycaster, and I want to capture a similar look but with modern ...
NotVeryMoe's user avatar
1 vote
0 answers
30 views

Perspective of a Point Light

I'm trying to calculate shadows by projecting the silhouette of each object seen by the light source. (The shadows are just going to go on planes.) To get each silhouette I take a snapshot from the ...
pointlightperspective's user avatar
8 votes
4 answers
4k views

How to determine if a 2D image represents what player sees in 3D game world?

I'm working on a game idea where the player is shown a 2D image (say, a "photo") and the player must find a spot in a 3D world where the view is about equivalent to that photo - not ...
manabreak's user avatar
  • 1,048
1 vote
1 answer
189 views

Find projecting triangle for UV mapping in RuneScape model format

I am using an old Runescape model format, also used by Thief and Quake. In this format, instead of specifying UV coordinates for each vertex ABC, we specify a second trio of vertices PMN. Those ...
Suic's user avatar
  • 119
0 votes
1 answer
197 views

Need help projecting 2D projectile motion in 2.5/isometric 2D game

So I’ve been researching this a lot and have hit a road block. I’ve read pretty much every thread on here regarding this and while I understand the concept I don’t understand how to implement it. For ...
FrankR's user avatar
  • 1
0 votes
1 answer
559 views

Convert Global Space 3D Location to Local object space?

I'm trying to find a formula that could convert my 3D global coordinates into local object space. Here are the inputs I have ...
DB3D's user avatar
  • 103
3 votes
2 answers
2k views

How to project a 3D circle/ellipse to 2D?

The 3D ellipse is represented by its center and the vectors for its major and minor axes and the 2D ellipse by its center, the length of the major and minor axes and the angle between the major axis ...
rvvermeulen's user avatar
1 vote
1 answer
1k views

How to convert from frag position to UV coordinates when my viewport doesn't cover the screen?

So, I'm implementing SSAO as part of my rendering pipeline using OpenGL/GLSL. It works pretty well when I have a camera that takes up the entire screen. However, when my camera is smaller than the ...
Danny's user avatar
  • 123
0 votes
1 answer
403 views

Isometric tiles on wrong positions if the mouse points at a negative world coordinate

I am using this approach: http://clintbellanger.net/articles/isometric_math/ Basically, you can calculate the iso coordinates based on the screen coordinates. What I am doing is, getting the actual ...
SPL's user avatar
  • 107
0 votes
1 answer
375 views

Reversing plane projection texture mapping algorithm

I found this algorithm in some old codebase, it takes two triangles from a mesh ABC and PMN, where ABC is the triangle that will be rendered and PMN is an extra triangle that is only used to generate ...
Xafib's user avatar
  • 3
0 votes
0 answers
625 views

Unity custom camera projection only working in scene editor

I've found this article on Gamasutra on a custom camera projection to make 3D look more 2D and decided to implement it to make some gameplay tests. I had to make some changes to make it work on URP(on ...
Ivan Neves's user avatar
3 votes
2 answers
1k views

How to render a field of view of over 180 degrees?

In most 3D renderings, a view frustum is used. This has the problem, that things get stretched out towards the edges. At "normal" fov (field of view) of about 60 degrees, the effect is not ...
merspieler's user avatar
0 votes
0 answers
32 views

Projecting Coordinates from one Space into another, but with "twisting"

i'm trying to generate a decal mesh kinda like this: http://blog.wolfire.com/2009/06/how-to-project-decals/ but instead of projecting the decal with a box, i need to project it with a sort of ...
Matthias's user avatar

1
2 3 4 5