We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [perspective]

An approximate representation, on a flat surface, of an image as it is seen by the eye.

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

Camera rotation to match UVs of a point across different FOV

I'm looking for the formula needed to calculate the amount of camera rotation required to display a point at the same UVs across two cameras with different FOVs. I can't modify the projection matrix ...
1
vote
1answer
32 views

Taking cube from camera space to clip space, error in my math?

watching Ken Joy's Computer Graphics lectures on youtube. One thing I'm confused about is after he gets the cube from the camera space to clip space, from my calculations the cube doesn't look like ...
0
votes
0answers
28 views

How to make game playable in all mobile screen resolution using Unity Cinemachine with perspective mode?

I want my 2D game to be playable (auto scale) in all screen resolution. I'm using Cinemachine & under "perspective" mode. I found tutorial to change the screen in "orthographic" mode but there is ...
1
vote
1answer
128 views

How can you create a side-scrolling beat-em-up perspective in Unreal Engine?

How can I achieve Streets of Rage type of perspective in UE4? By that, I mean having a 2D character that walks "into" the screen, but the character doesn't get smaller or angled in any way. Is there ...
-1
votes
1answer
55 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 ...
1
vote
0answers
28 views

How and where to transform a Camera Frustum onto a tilted screen?

In rendering tutorials for perspective projection the assumption is that the rendering surface is perpendicular to the sight line. As shown here: How to accommodate for a screen that is tilted ...
0
votes
2answers
108 views

How to avoid the cutoff of a Sprite when overlapping in a terrain?

I have a scene where I have a terrain as a PlaneGeometry. And I'm trying to locate a building on it as Sprite. But I'm not able to put that building/sprite centered on the terrain without getting a ...
1
vote
1answer
256 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 ...
1
vote
1answer
107 views

3D Perspective issues

My team is currently developing a 3D Sidescroller game and we encountered some issues regarding the whole in-game perspective of the levels. The levels are composed of 3D modeled corridors which are ...
0
votes
1answer
740 views

How can I emulate Diablo 3's Isometric view using Perspective?

Using DX11, SimpleMath I am building a isometric game like Diablo 3 in 3D and I want to use a perspective camera that emulates their top down view. Projection Matrix: ...
1
vote
2answers
1k 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 ...
0
votes
1answer
1k views

Assigning sprite to a sorting layer through scripting

I have few prefabs with sprites which I want to assign to different sorting layers. How can I do it? I am also wondering if sorting layers matter if I use a perspective camera. Do they?
1
vote
2answers
498 views

How do I get from orthographic to perspective?

I programmed a cube in java and calculated the x y and z position for it's rotation on the x,y and z axis but I'm finding it hard to display the z axis i've been trying to change the distance of the ...
1
vote
1answer
421 views

Simulating a real camera's perspective projection

I'm trying to simulate a real camera's perspective projection of straight, parallel lines running along the ground (one-point perspective) by mapping the real-world 3D coordinates of the lines to 2D ...
3
votes
1answer
814 views

When does OpenGL Perform Perspective Divide

When does OpenGL divide by W? Is this done automatically within the vertex shader? It is my understanding that the vertex shader outputs the final vertex position, so I presume no transformations can ...
0
votes
1answer
119 views

Perspective View using Spritesheets

I am creating a Top-View 2D game. However, the only way i can get a good view of the objects, such as houses, trees, is to make the game in orthographic view. The same way games such as Pokemon games ...
0
votes
1answer
58 views

Are there any math limitations on the near plane in a perspective matrix?

I've noted that if in the perspective camera I put near plane to a low number like 0.000001 and far plane to 1000 my render has ...
1
vote
1answer
49 views

Perspective projection in Open GL

I am trying to convert a 3d point into a 2d point using a perspective projection. I'm new to OpenGL and may not have fully understood how this works. How exactly do I calculate the near and far values?...
1
vote
1answer
366 views

Strange Light Angles in Unity

I'm quite sure that I'm missing something very simple here, but I'm a complete Unity noob and I absolutely can't figure out what I'm seeing. I'm trying to light a sphere from both sides, ...
0
votes
1answer
283 views

View “distortion” or “stretching” when looking up/down? (Software renderer)

I'm not sure distortion is the right way to describe this. I've uploaded a video to show you guys. Apologies if it's long, but I wanted to show the code as well as posting it here. https://youtu.be/...
0
votes
1answer
85 views

Moving an object extremely close to the camera at a constant speed makes it visually speed up

I have a quad in 3D space (a billboard in the real-world sense) that I want to move close to the camera so the user can inspect it. The quad is defined by the 3D coordinates of its four corners. To ...
1
vote
3answers
1k views

Box2D in 3D space

I am trying to combine a perspective camera with a box2D world using libgdx and I am having some problems getting the two to synch up. I want to do this so I can use 3D models but keep the game in a ...
0
votes
1answer
82 views

Rendering perspective independent polygons in perspective view

I am creating an editor where I have "grabhandles" that can be dragged to transform a primitive object. My problem is that I can't find the correct solution to show these grabhandles in a perspective ...
1
vote
0answers
51 views

Asymetric Perspectiv View

I am building a addon component that will show synthesized 3D view of the world (kind of FLIR camera simulation). The problem I am facing is that currently I am using Symmetric Perspective View with ...
0
votes
2answers
641 views

glm::perspective isn't working?

So I'm learning how to make games and program, and while trying to setup a projection camera using GLM in GFLW, this line of code refuses to work and I can't figuire out why. The code is in the image ...
1
vote
0answers
340 views

LibGDX limit the PerspectiveCamera for a FPS view

I'm using LibGDX and I'm trying to implement a FPS camera into my game. I'm not using the FirstPersonCameraController for multiple reasons: I don't want to touch to roll (only yaw and pitch), with ...
1
vote
2answers
560 views

How to fake a 3d character displacement by sprite scaling in GameMaker?

I want my 2D sprite to become bigger when moving down the screen (closer to the camera), smaller when walking away and to maintain the same size when moving left or right. The scaling along the y ...
3
votes
1answer
87 views

OpenGL Perspective Issue

I'm trying to troubleshoot a problem with my simple OpenGL test program, which I've written in C. I've written some math routines to do the matrix manipulation, but even after copying known working ...
1
vote
1answer
346 views

Unity - Static Camera Perspective, Walls Obscure Player

Pretty simple and common problem here. The world I'm designing is fully explorable, no invisible walls or tricks. It's presented as a single seamless area, a School complex with 9 buildings, some of ...
2
votes
1answer
955 views

Converting real-life perspective photos into orthographic view for texture creation

I'm struggling to find software that will enable me to take real life photos and make them "flat" (orthographic) for use in textures. Does anyone know of a reliable way to take perspective photos and ...
0
votes
1answer
612 views

How can I convert an orthographic camera to a perspective camera?

How can calculate perspective camera parameters from orthographic camera parameters (left, right, top, bottom, near, far)? Specifically I don't know how calculate the FOV for a perspective camera ...
1
vote
0answers
92 views

Perspective correct interpolation of normal values

I'm currently writing a software rasterizer and I'm at the point where I can draw arbitrary triangles with vertex colors and perspective correct texture mapping. I do point and directional lighting by ...
3
votes
0answers
264 views

I get weird perspective using GLM where the depth is flipped. Please help

The depth is rendered wrong and I can't figure out why. ...
7
votes
1answer
1k views

Perspective-Correct Texture Mapping

I am working on a small rendering engine for a personal project and I am having issues with the texture mapping part of it. It seems to work for some cases, but not for others. For example, when one ...
0
votes
2answers
799 views

OpenGL perspective matrix far plane

The near plane clips at exactly the value I set just fine but instead of clipping at 1000 the far plane clips at 1. Here is the code for the projection matrix: ...
1
vote
1answer
429 views

Replicating a worldspace sphere on screen space

I have quite some struggle with a post processing shader that I'm working on. I use Unity, and I have a shader in which I want to, in screen space as part of post processing, render a sphere that ...
4
votes
1answer
131 views

Selecting the closest point in perspective view mode

I'm trying to improve my algorithm for selecting points in perspective view mode (OpenGL/Qt/C++). The current implementation works as follows. The user clicks on a certain ...
2
votes
1answer
87 views

Camera horizontal shift

I want stretch my game on two monitors. I use Unity 5.3. This version support the multi-display. But, one camera = one monitor. So, have two perspective cameras (at the same position). I search a "...
1
vote
1answer
140 views

Last Row of the perspective projection matrix

Could you explain to me what is the purpose of -1 in the last row of the gl_projection matrix? And how it affects the perspective division step ?
1
vote
0answers
124 views

Construction of perspective matrix

Is it possible to Construct a perspective matrix by multiplying a perspective transformation with a parallel projection ? I want a perspective projection in 2D space which is calculated by ...
3
votes
0answers
130 views

Perspective division by zero yields unexpected results

Usually, this is how a shape in clip space is defined: [0.25, 0.25, 0.0, 1.0] [0.25, 0.75, 0.0, 1.0] [0.75, 0.75, 0.0, 1.0] [0.75, 0.25, 0.0, 1.0] After ...
0
votes
1answer
739 views

Getting ray using gluUnProject or inverted MVP matrix

I've read a lot of topics here, on SO, opengl.org etc. Example how gluUnProject should work (from NeHe tutorial): ...
1
vote
2answers
293 views

Cursor position to a 3D ray using angles

I've been stuck for a month trying to get gluUnProject working. After my attempts to use gluUnProject failed (as well as attempts to implement gluUnProject functionality manually) I implemented method ...
1
vote
0answers
193 views

How does the SNES' Mode 7 sprite perspective projection work? [duplicate]

I've always wanted to know how to replicate the old Mode 7 graphics mode of the Super NES. It was frequently used for a pseudo-3D effect in racing games like Top Gear (gameplay video). Top Gear ⓒ ...
0
votes
0answers
131 views

Perspective projection

I'm studying Perspective projection in a computer graphics course and i'm really confused about a detail. The study material says there are 3 cases: Case 1: View plane parallel to the xy plane and ...
3
votes
2answers
716 views

Java OpenGL Perspective matrix not working

I'm trying to render a simple triangle with OpenGL in Java using LWJGL3. Everything is working great, but the projection matrix (perspective) is not working. In C++ I just used to apply the ...
3
votes
1answer
4k views

determining view boundaries based on z position when using a perspective projection

I'm using three.js to make an animation of a box moving around the screen in 3 dimensions. It is moving pseudo-randomly, according to a noise function. So, I want to place an invisible wall just ...
5
votes
2answers
1k views

How can I achieve a pseudo-3D camera effect like this?

I am trying to achieve a pseudo-3D camera effect similar to this: I have gotten the following results using a 3D camera and billboards: I am now running into the following problems: In the first ...
1
vote
0answers
173 views

Matching the 3ds max camera view in my game 1:1

I want to match 1:1 the 3ds max camera render with my 3d engine (DirectX 11, C++). I believe that my mesh exporter (coded with MaxScript) works fine, I see the ...
0
votes
1answer
2k views

2D game with angled top-down camera perspective [closed]

I want to create a game similar to binding of isaac, a slightly angled top-down 2D game. In binding of isaac, the character moves and shoots along a 4-way path, so when he is shooting towards East, ...