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
1 answer
22 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 ...
user avatar
  • 334
0 votes
0 answers
36 views

Reprojecting a 1024x512 texture to an equirectangular cylindrical projection

I have recently been spending a lot of time with procedural texture generation. However that quickly came to a halt when I was trying to get the textures to map to a sphere. I am required to use an ...
user avatar
1 vote
1 answer
50 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 ...
user avatar
1 vote
2 answers
48 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 ...
user avatar
  • 173
1 vote
0 answers
50 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 ...
user avatar
  • 231
0 votes
1 answer
74 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 ...
user avatar
  • 119
0 votes
1 answer
64 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 ...
user avatar
  • 119
2 votes
2 answers
64 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 ...
user avatar
  • 141
-1 votes
1 answer
90 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. ...
user avatar
0 votes
1 answer
105 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 ...
user avatar
-1 votes
2 answers
127 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 ...
user avatar
0 votes
1 answer
75 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 ...
user avatar
1 vote
0 answers
131 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 ...
user avatar
  • 11
1 vote
0 answers
27 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 ...
user avatar
  • 11
0 votes
0 answers
41 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 ...
user avatar
2 votes
0 answers
79 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 ...
user avatar
1 vote
0 answers
27 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 ...
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 ...
user avatar
  • 1,048
1 vote
1 answer
116 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 ...
user avatar
  • 119
0 votes
1 answer
123 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 ...
user avatar
  • 1
0 votes
1 answer
127 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 ...
user avatar
  • 103
1 vote
2 answers
443 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 ...
user avatar
1 vote
0 answers
265 views

Deferred shading - g-buffer positions, world or view space?

So, i am doing this for the first time. I have a lodded terrain that i would like shade deferred. I have built the g-buffer with positions/normals/albedo/depth and render vertices like I did before ...
user avatar
0 votes
1 answer
202 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 ...
user avatar
  • 3
0 votes
1 answer
159 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 ...
user avatar
  • 107
0 votes
1 answer
271 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 ...
user avatar
  • 3
0 votes
0 answers
436 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 ...
user avatar
3 votes
2 answers
393 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 ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
3 votes
1 answer
284 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 ...
user avatar
1 vote
1 answer
705 views

Perspective projection and ultrawide resolution

The problem I'm going to describe did not occur to me until very recently, when I got a super ultra-wide monitor (32:9 aspect ratio) and tried playing videogames on it. TL;DR: the scenery is ...
user avatar
  • 113
3 votes
0 answers
252 views

How to convert screen to world coordinates while using gluLookAt / gluPerspective or similar matrix transforms?

I am just starting an adventure in looking under the hood of graphics for a game project I've been working on for a while, and I could use some guidance. I am using Python/Kivy (though that is not ...
user avatar
0 votes
0 answers
49 views

Libnoise bounding box - from spherical to planar

I'm trying to convert a bounding box inside a spherical map (equirectangular image as a result of Libnoise/c++) into a planar projection, but I can't find the correct algorithm for it and I'm not good ...
user avatar
1 vote
1 answer
177 views

Tiles on sphere - check visibility

I have a sphere with tiles. I need to check if a tile is visible or not. See the image. Tiles are red squares, "screen" is represented by yellow quad. Currently, I calculate coordinates of ...
user avatar
  • 1,076
0 votes
0 answers
41 views

Confused on graphics rendering

Implementing a viewport is just a rectangular space on the back buffer usually a 2d texture set to the size of the client window that we render to. However in direct3d when we describe the viewport ...
user avatar
6 votes
1 answer
279 views

How to set the camera projectionmatrix so that it's 4 rays always exactly hit the corners of a defined plane?

I have a camera, and I have a plane. The plane has 4 corner points. I need to find out how to change the projection-matrix of the camera so that the projection-rays of the camera always hit the ...
user avatar
  • 1,352
2 votes
2 answers
213 views

z ordering in directx11

Hi recently i am trying to implement z ordering system into my directx framework. So every object will have z order property(int), and this value will have higher priority than depth checking for ...
user avatar
0 votes
1 answer
2k views

Unity3d: Get a direction vector parallel to plane

I need to send a raycast from my camera which is parallel to the plane (Ground) and in the same direction of its forward vector (Represented by the black color vector) I cant use world space ...
user avatar
  • 301
1 vote
0 answers
68 views

Why projection window is between -1 and 1

Is it a convetion ? What we achieve with this ? I am reading about how the perspective and orthographic matrix is getting calculated and everyone is trying to normalize the homogenous coordinates to [...
user avatar
  • 11
0 votes
1 answer
36 views

How can spotlights be implemented with a perspective projection?

I was reading Shadow Mapping with Directional Lights and noted that spotlights are implemented by rendering with the perspective projection, stating that the spotlight worked just like the camera. ...
user avatar
-1 votes
1 answer
177 views

What is the alternative (new) 3d projection called that solves the stretching / zooming at sides of monitor?

I understand about camera's and projections etc, such that we have distortion and zooming when at the sides of the screen (exacerbated on 21:9 monitors), however a few years ago, in a Unity forum ...
user avatar
3 votes
3 answers
2k views

How to render top-down perspective in a tile-based RPG?

My question is specifically about the type of perspective that GBA Pokemon games like Fire Red/Leaf Green have: I'm not sure of the correct terms for what I'm trying to achieve. I am using SDL2 and ...
user avatar
  • 131
0 votes
1 answer
51 views

Z rotation matrix inverting object

I'm currently creating a 3d game where I need to rotate shapes. To do se, I created a rotation matrix for each axis, X, Y and Z. X and Y are giving me expected results, but not Z who kind of "inverts ...
user avatar
  • 15
1 vote
1 answer
2k views

3d isometric projection matrix?

I have 3d vectors that I want to project as 2d vectors to draw my shapes. I got a 3d vector cameraPosition, a 3d vector cameraDirection, a float renderDistance. I need to create an orthogonal / ...
user avatar
  • 15
0 votes
1 answer
140 views

Can we flip znear and zfar so that positive z values increase away from the viewer?

I am confused about the projection matrix in OpenGL. i have a habit of writing the code as follows. ...
user avatar
0 votes
0 answers
108 views

Perspective projection matrix with a non-orthogonal near plane

I'm trying to figure out a way to provide such a perspective projection matrix to a shader that the "near" plane wouldn't necessarily be orthogonal to the camera vector. More specifically, I'm ...
user avatar
0 votes
0 answers
40 views

Camera LookAt position with fixed screen position

I have a perspective "lookAt-type" camera. I'm trying to compute specific focus point of the camera, which should be placed in the middle of the screen: I also have a custom 3d point in world space, ...
user avatar
  • 1
0 votes
1 answer
259 views

OpenGL orthographic projection rendering quarter of screen

I'm trying to set up an orthographic projection so I can draw a rectangle using screen coordinates, but even if I draw a rectangle using the width/height of the window, it only fills a quarter of the ...
user avatar
1 vote
1 answer
2k views

Difference between two perspective projection representations

When researching perspective projections on the web, I've come across two different representations. One is unrelated to OpenGL and the other is strictly associated with it. What is the relation of ...
user avatar
0 votes
0 answers
72 views

Why does this work in the fragment shader but not in the vertex shader?

I'm doing some model view and projection transforms in the vertex shader and I want to determine whether the current vertex will end up on the viewport or not. After searching a bit I found that ...
user avatar

1
2 3 4 5