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.
247
questions
0
votes
0
answers
19
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 ...
0
votes
0
answers
30
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:
...
0
votes
1
answer
50
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 ...
1
vote
0
answers
39
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 ...
2
votes
1
answer
124
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 ...
2
votes
0
answers
41
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 ...
0
votes
1
answer
144
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:
...
0
votes
1
answer
100
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 ...
0
votes
0
answers
105
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 ...
0
votes
0
answers
32
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:
...
0
votes
1
answer
85
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 ...
0
votes
2
answers
77
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 (...
1
vote
2
answers
97
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 ...
1
vote
1
answer
80
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 ...
0
votes
0
answers
38
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)...
1
vote
1
answer
588
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:
...
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 ...
0
votes
1
answer
41
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 ...
1
vote
1
answer
216
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 ...
0
votes
1
answer
103
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....
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 ...
0
votes
5
answers
850
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 ...
0
votes
1
answer
54
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 ...
1
vote
1
answer
82
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 ...
1
vote
2
answers
593
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 ...
1
vote
0
answers
70
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 ...
0
votes
1
answer
268
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 ...
0
votes
1
answer
147
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 ...
2
votes
2
answers
461
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 ...
-1
votes
1
answer
161
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. ...
0
votes
1
answer
212
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 ...
-1
votes
2
answers
277
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 ...
0
votes
1
answer
85
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 ...
3
votes
0
answers
871
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 ...
1
vote
0
answers
50
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 ...
1
vote
0
answers
91
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 ...
2
votes
0
answers
149
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 ...
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 ...
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 ...
1
vote
1
answer
171
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 ...
0
votes
1
answer
179
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 ...
0
votes
1
answer
454
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
...
3
votes
2
answers
1k
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 ...
0
votes
1
answer
767
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 ...
0
votes
1
answer
352
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 ...
0
votes
1
answer
357
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 ...
0
votes
0
answers
615
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 ...
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 ...
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 ...
3
votes
1
answer
468
views
Why when I do an isometric projection do I get a "dimmetric" view?
First of all I would like to apologize for my poor English. It is not my native language.
I have some doubts about isometric projection that perhaps I do not know how to describe them and I would ...