Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 answers
78 views

Is it okay to combine 2 "perspective genre"?

I've just started making a RPG and I'm thinking about putting 2 kind of "genre" perspective, like having a Top-Down gameplay for the entire storyline and putting a 2D fighter for the battle ...
user avatar
-1 votes
2 answers
128 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
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
1 vote
0 answers
152 views

Understanding the math behind perspective matrix in OpenGL

I've been trying to figure out the math behind perspective matrix for 2 weeks now but I'm failing badly. I understand the theory behind the perspective matrix but I am not sure how the math works. The ...
user avatar
  • 77
0 votes
2 answers
52 views

How to handle player slowness while moving up and down in a Top Down game with angled ortho camera and angled sprite due to stretching of ground?

So i'm making a 2D top down game setup in 3D using tilted Sprites and angled orthographic camera. My camera setup is as shown. In my game I have the floor flat on the X/Z plane with walls/characters ...
user avatar
0 votes
1 answer
65 views

Confused about why my projection matrix works

My projection matrix was buggy, I'm not great at mathematics, but I checked it against the the songho tutorial, and the broken one seems correct to me but switching nearplane to farplane seems to ...
user avatar
9 votes
1 answer
341 views

Möbius effect in Unity

This morning I've seen the following animation on Twitter. It is a kind of Möbius strip effect. It's cool! Isn't it? So I've decided to build something similar using Unity, just for fun. I want to ...
user avatar
  • 241
2 votes
0 answers
61 views

Compute spheres 2D speeds in perspective projected animations

I created two animations that consist of spheres moving in a perspective projected 3D space, which means that the size and speed of the spheres vary with the distance: they increase when they are ...
user avatar
  • 121
0 votes
1 answer
239 views

How to place a camera so that it always fits a plane?

I have a plane that can get its scale changed during the game, and I want to make the camera view it completely every time the plane has its scale changed. The only camera is set to perspective ...
user avatar
1 vote
1 answer
46 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 ...
user avatar
0 votes
0 answers
787 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 ...
user avatar
  • 1
2 votes
2 answers
2k 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 ...
user avatar
  • 428
-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
1 vote
0 answers
70 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 ...
user avatar
  • 185
0 votes
2 answers
344 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 ...
user avatar
  • 115
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
1 vote
1 answer
134 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 ...
user avatar
0 votes
1 answer
2k 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: ...
user avatar
  • 3
2 votes
2 answers
2k 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 ...
user avatar
0 votes
1 answer
3k 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?
user avatar
1 vote
2 answers
852 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 ...
user avatar
  • 11
2 votes
1 answer
1k 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 ...
user avatar
  • 123
0 votes
2 answers
482 views

How to return the scene view camera to the default view

By the "scene view camera" I don't mean a GameObject with a Camera component, I mean the camera used to draw the Scene ...
user avatar
4 votes
1 answer
2k 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 ...
user avatar
  • 63
0 votes
1 answer
161 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 ...
user avatar
0 votes
1 answer
85 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 ...
user avatar
  • 931
1 vote
1 answer
63 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?...
user avatar
1 vote
1 answer
544 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, ...
user avatar
  • 174
0 votes
1 answer
370 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/...
user avatar
  • 332
0 votes
1 answer
93 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 ...
user avatar
  • 10.2k
1 vote
3 answers
2k 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 ...
user avatar
0 votes
1 answer
87 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 ...
user avatar
  • 70
1 vote
0 answers
53 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 ...
user avatar
  • 11
0 votes
2 answers
1k 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 ...
user avatar
  • 53
1 vote
0 answers
525 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 ...
user avatar
  • 343
1 vote
2 answers
691 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 ...
user avatar
  • 33
3 votes
1 answer
111 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 ...
user avatar
  • 51
1 vote
1 answer
415 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 ...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
  • 123
0 votes
1 answer
1k 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 ...
user avatar
1 vote
0 answers
116 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 ...
user avatar
3 votes
0 answers
393 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. ...
user avatar
  • 31
7 votes
1 answer
2k 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 ...
user avatar
  • 71
0 votes
2 answers
1k 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: ...
user avatar
1 vote
1 answer
672 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 ...
user avatar
4 votes
1 answer
144 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 ...
user avatar
  • 301
2 votes
1 answer
97 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 "...
user avatar
1 vote
1 answer
288 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 ?
user avatar
  • 189
1 vote
0 answers
142 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 ...
user avatar
  • 189
3 votes
0 answers
210 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 ...
user avatar