Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [projection]

The tag has no usage guidance.

0
votes
1answer
34 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 ...
0
votes
1answer
27 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 / ...
0
votes
1answer
42 views

I have a question about Projection on OpenGL

I am confused about the projection matrix in OpenGL. i have a habit of writing the code as follows. ...
0
votes
0answers
37 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 ...
0
votes
0answers
25 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, ...
0
votes
0answers
21 views

Drawing simple shapes in OpenGL ES 1.1

I'm having an issue getting OpenGL ES 1.1 to draw anything. All I get is a black screen every time. I have the following working OpenGL 2.1 code, which I'm trying to change over: ...
0
votes
1answer
39 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 ...
1
vote
1answer
48 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 ...
0
votes
0answers
35 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 ...
0
votes
3answers
187 views

Figuring out if two objects overlap on screen

I want to figure out if 2 3D models overlap on screen. My general idea is: Compute the bounding box of each model Transform the bounding box to the View Volume using the ViewProjection matrix Check ...
0
votes
0answers
130 views

2.5D UI, perspecitve view, distort objects by angle but not position

Instead of thousand words, a few pictures to explain what I want to achieve How do I get the merit of UI objects rotation in perspective projection, but ignore the position of an object(as in Overlay ...
2
votes
2answers
60 views

Custom Camera View Fustrum in Unity

Is it possible in Unity to make some sort of bounding box (with a running application) within the current viewpoint of the actual screen? Let me explain: I'm working on a project which uses a ...
0
votes
0answers
49 views

Oblique projection math incorrect? [Partly solved]

+++Update+++ Partly solved it. The isometric projection of the area sprite image and the grid wasn't true isometric (30°), because I already calculated it in 2:1 ratio, what gives an angle of 26.656°...
1
vote
0answers
250 views

Screen-space shadows?

Is there such a thing as screen-space shadows? I know that most shadow projection comes from rendering the world from the viewpoint of the light source, projecting the shadows onto a large square ...
3
votes
0answers
69 views

How to implement a pannini projection in opengl?

I have read about the pannini projection, which involves (I think) projecting a scene onto a cyclinder instead of a rectangle. How can I implement this projection in a vertex shader? Blinky is using ...
1
vote
0answers
19 views

How do I change x,y,z coordinates if I want to make a perspective projection?

How do I supposed to modify x,y,z coordinates to make the perspective projection? I'm talking not about matrix, could you explain me each coodinate specifically? Like, x =... y=... z=... I'm asking ...
0
votes
0answers
33 views

Shadow Mapping, Projection

I am projecting a image on a sphere. I have the image, but it does not get larger as the camera of the projection grows in distance. In Directx 11 Regardless of how far the projection gets from the ...
1
vote
1answer
254 views

Project 360 video on the inside of a iso sphere / polygon sphere

I'm creating a game in Unity. I have a iso sphere or polygon sphere, and I want to project a 360 video on the inside of the polygon sphere. I've learned thow to put a 360 video on the inside of a ...
0
votes
2answers
553 views

Finding the normals of the planes of a View Frustum

Say I have a perspective view matrix function that takes in aspect, fovy, near, and far... Transforming the view into a frustum. Typical OpenGL stuff, right. But say then, that I would like to find ...
1
vote
1answer
122 views

Project 2D texture onto a cubemap

I'm looking to take a 2D texture (previously rendered from the user's perspective), and overlay it overtop of a cubemap. Since a cubemap has 6 textures, I need to run a shader over top of all 6, and ...
0
votes
1answer
317 views

Camera and multiple shaders

What is the best way to handle a moving camera inside many shader programs? I believe most games need to have one common projection matrix inside all shader programs to use a moving camera. Currently ...
0
votes
1answer
135 views

How do I project the Earth globe on a flat plane with minimal distortion?

I want to build a game where the game map is the planet Earth. The game map needs to be on a 2d plane, with the Earth texture projected on it If the player walks endelessly in one direction, it should ...
0
votes
2answers
122 views

Rendering a 2D tree in WebGL

Assume a tree of objects that need to be rendered, each with their own x/y coordinates. Now let's say I could crawl through the tree and give each element a "z" coordinate, before rendering. Is ...
0
votes
1answer
51 views

MonoGame ortho projection axis direction

I have perfect square screen and I want to capture everything between -1000.0f and 1000.0f, so I create projection matrix like that: ...
0
votes
0answers
53 views

mode7: Tile position to screen position

The algorithms that describe how to render a map with projection (for example Doing an SNES Mode 7 (affine transform) effect in pygame) always start by rendering point by point and from there ...
0
votes
1answer
192 views

OpenGL Orthographic projection questions

I'm studying now about projections with OpenGL and I've some questions: Is there importance for the viewer's location? I know if I move forward/backward it won't mind, but what if I move upward with ...
6
votes
4answers
775 views

Why are 3d projections on a 2d screen not like what the human eye sees?

Firstly, I'm sorry if this question doesn't make much sense or is poorly written - I have almost no experience with programming, and none at all with game development. I'm also not sure it's an ...
3
votes
2answers
214 views

How can I draw the “cone of view” of a camera in a flat 2D minimap?

I have a 3D world with some model in it (the XZ-plane grid, some gray boxes and a red box). In the upper-left corner I'm trying to draw a minimap that should represents the whole world in 2D (flat). ...
2
votes
0answers
31 views

How to change a shape project when obstructed by object

I have a customized shape (mesh) in 3D as shown below: Now that customized shape projection will change when there are several obstacles located in front of the customized shape. I expect the result ...
3
votes
1answer
808 views

Deproject Screen To World Coordinates (Unreal Engine 4.15)

I am working on a small game in Unreal Engine 4.15 using blueprints only and encountered a behaviour I don't understand. The game is based on the Top Down Example. As I'd like to teleport an actor ...
0
votes
1answer
270 views

Left-handed version of the reversed depth projection with infinite far plane

Let's say that I have standard left-handed WorldToView and ViewToScreen row-major matrices in the same vein as the DirectX ...
1
vote
1answer
187 views

How to calculate a projection of 360° equirectangular slides?

My goal is to have a light source inside of a transparent sphere that has an equirectangular texture to act as a 360°-slide. I want to get the projection on arbitrary objects as a texture image on ...
1
vote
1answer
205 views

Move an object to a point relative to the second camera

I have two cameras, one for the UI, one for the 3d objects. The UI camera is just a simple, perspective camera. The ...
0
votes
1answer
169 views

libgdx UI coordinate consistency in a scaled window

I'm having an issue that I'm sure boils down to something simple that I've missed: The UI Graphics can't handle a window resize. Either the graphics get stretched, or the placement is incorrect. For ...
1
vote
1answer
167 views

How does XNA/MonoGame project 3d to 2d?

I am trying to figure out how XNA is actually projecting a 3d world space coordinate to screen space. I decompiled the MonoGame framework and copied the CreateLookAt und CreatePerspectiveFieldOfView ...
0
votes
1answer
207 views

2D HUD overlay drawing based on 3D coordinates and camera azimuth and elevation

Assume you have the 3d coordinates of the player and another unit N as well as the azimuth and elevation of a camera always looking at the player. In the following ...
2
votes
2answers
2k views

Projection Texture Mapping

I have been trying to understand how projective texture works; and, even I have been able to achieve the result by following the steps in tutorial, I fail to understand how it works in my mind. To my ...
0
votes
1answer
153 views

Is there any reason to use a “canvas” based approach to GUI in isometric games?

When designing game engine GUI systems, I know a lot of game engines (notably Unity and Unreal) use a sort of "canvas" system. However, in an isometric game where the camera is already orthographic, ...
2
votes
2answers
90 views

How to project textures onto an animated model?

I'm trying to figure out exactly how to project textures onto an animated model. I've taken a look at L4D2's wound's white paper. But their method doesn't exactly explain how they went about this. I'...
0
votes
1answer
2k views

How would you design a transformation matrix to project absolute coordinates to any orthographic projection desired?

I am attempting to make an RTS based on AoE II HD Edition. I want to have ease of control by designing a transformation matrix given any style of projection I want. This is a good example of what I ...
0
votes
1answer
147 views

Hemisphere Projection

I came across the following segment of code that is supposed to project an image on a hemisphere: ...
1
vote
1answer
240 views

Project 3d lines onto plane

I'm trying to wrap my head around coordinate projection, and can't seem to solve the problem I am having. Here is an illustration of it: The cubes represent 3d space, and the 2 red lines represent ...
2
votes
0answers
78 views

Projector does only affect model

I'm working on a simple selection of a RTS unit. Therefore I used a projector to display a circle on the ground around the unit. But it happened, that the circle is only displayed on the head of the ...
0
votes
1answer
145 views

LibGdx, I moved ShapeRenderer projection matrix, but shadered waves did not move

I am use Libgdx with ShapeRenderer to draw rect and shaders passed to ShapeRenderer, to draw a waves. In game I made pseudo-parallax effect by changing projection matrix in SpriteBatches. But in ...
1
vote
1answer
254 views

How to transform a spherically-projected render into a perspective projection?

Suppose that you have a projection obtained by mapping spherical coordinates to a texture; example: What is that projection called? Is it possible to "fix" such texture so that it becomes a regular ...
3
votes
1answer
3k views

libGDX - Why do I have to use camera.setToOrtho what does it do?

I am very confused about camera matrices and I don't know where to start my studying. Maybe I have to study OpenGL, but I don't know C++ ... Ok so I have a camera, Box2d world and a Box2d body. <...
0
votes
1answer
33 views

How to find a point of taking into account the distortion of the projection

I can not find the material that will help me to implement the algorithm of coordinate transformation based on the distortion of the projection. I am creating a code recognition algorithm (similar to ...
2
votes
0answers
87 views

DirectX 11 - Problem with low resolution decals

I'm trying to add a decal system in my DirectX engine but i'm facing some problems with the quality of the textures projected. Every other no decal texture look fine, but these ones look really bad. ...
1
vote
1answer
164 views

How do I take 2D ballistic trajectory planning and apply it to 3D?

I am currently using this formula speed = sqrt((gravity.y*target.x^2)/(2*cos^2(angle)*(target.y - target.x*tan(angle))) provided by DMGregory as an answer for my ...
2
votes
1answer
363 views

How to render multiple projections of an object?

I want to display multiple projection of an object on the same screen. The projection should also change as the body rotates, kind of a dynamic projection of the body. I am trying to make a character ...