5
votes
Möbius effect in Unity
After some effort, I've found a temporal approach: overlapping the panels and using a shader mask to combine both images in the middle.
Anyway I'm sure there must be a way to make the camera ...
5
votes
Finding the normals of the planes of a View Frustum
Or you could calculate the plane equations of all the frustum planes, and get the normals from the equations.
A plane equation has the form:
Ax + By + Cz + D = 0
(A, B, C) represents the plane ...
5
votes
Accepted
Finding the normals of the planes of a View Frustum
It becomes much clearer if you draw it from a top-down perspective:
The normal on the right is simply the direction vector of the camera rotated by -90°-fovX/2 around the y axis and the one of the ...
4
votes
Accepted
When does OpenGL Perform Perspective Divide
It's somewhere between the vertex and fragment shader (after the geometry shader and right before the fragment shader if you want to be specific). Since the fragment shader runs for each drawn pixel, ...
3
votes
Accepted
Simulating a real camera's perspective projection
But does tilting the camera cause the same changes in the perspective of the lines as moving the camera lower to the ground (closer to the lines)?
No, it is not the same. To angle the camera to look ...
3
votes
How can you create a side-scrolling beat-em-up perspective in Unreal Engine?
I mean having a 2D character that walks "inside" the screen, but the character doesn't get smaller or angled in any way. Is there a camera setting that allows that?
You want an orthographic ...
3
votes
How to avoid the cutoff of a Sprite when overlapping in a terrain?
You can force the sprite to render always on top by disabling the depth testing in the sprite's material.
...
2
votes
Accepted
Difference between two perspective projection representations
My knowledge in matrices is not that great, but from what I understand the first one refers to Weak-Perspective Projection. This is meant as a "simple" way to give the illusion of 3D. The only thing ...
2
votes
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?
Myself, I'd recommend getting rid of the stretching and leaning in your game world.
Make the tilemap uniformly scaled 1x, and make any upright characters/walls/trees stand perpendicular, not leaned ...
2
votes
3D image projected to 2D image
I believe the confusion might come from the term "3D computer graphics", because what is 3D about 3D computer graphics is not the pictures it produces, but their representation in the ...
2
votes
Accepted
3D image projected to 2D image
The image posted is 2D in the sense that you cannot 'look behind' anything in the image based solely on the information presented.
Here's a 3d scene being projected onto a 2d plane (source: Wikipedia ...
2
votes
Accepted
Name of 2D Image From Above
It sounds like you're describing a top down or overhead perspective; similarly, isometric is a perspective that can be used by various styles.
The projection may also be a consideration and might be ...
1
vote
Understanding the math behind perspective matrix in OpenGL
Your h at the bottom is missing the left/right and top/bottom parameters; cf.
to the code at the top where they are expressed as angle ...
1
vote
Confused about why my projection matrix works
Probably your intended nearplane and farplane variables mapped reversely.So it clipped out eveything that supposed to be rendered on the screen.
Possible Reasons
(Possible)There might be a transpose ...
1
vote
Accepted
How to place a camera so that it always fits a plane?
I have found the answer here. Although it is not completely explained mathematically in my opinion, it works well.
The code I use is like this:
...
1
vote
How to return the scene view camera to the default view
Remember to check the documentation for the tools you're using! In this case, the Scene View Navigation page explains how to control the scene view camera:
If your Scene view is in an awkward ...
1
vote
How to return the scene view camera to the default view
Orthographic/perspective camera in the Scene View is toggled by clicking the text underneath the X/Y/Z widget (which says 'Top' in your screenshot).
Perspective view will show converging lines there, ...
1
vote
Accepted
3D Perspective issues
I think you can achieve this look with non-skewed / regular perpendicular walls & floors just by adjusting your camera.
Here's an example where I took your image and overlaid it in a scene with ...
1
vote
Accepted
How can I emulate Diablo 3's Isometric view using Perspective?
As mentioned, D3 is not in true Isometric view, it's merely at an angle. Isometric (orthographic) ignores the Z axis and thus and no true depth in the shot. It's hard to describe without just playing ...
1
vote
Accepted
Assigning sprite to a sorting layer through scripting
To change the sorting layer and/or the sorting order of a sprite, just use:
...
1
vote
How do I get from orthographic to perspective?
You will get a lot more of readability if you use matrices for this, then to find the new position of the vector, you just multiply the vector by the matrix.
This question is a bit old, but if you ...
1
vote
How do I get from orthographic to perspective?
You just need to divide the x and y components by z. If you want to put the vanishing point "farther", then make the z component smaller (e.g. divide it by a constant). If you want to make the fov ...
1
vote
Are there any math limitations on the near plane in a perspective matrix?
The GPU uses more bits to store distances closer to the camera than ones farther, and this becomes worse the closer you set the near plane to 0. With a near plane of 0.01 the error between the stored ...
1
vote
Accepted
Perspective projection in Open GL
You don't usually calculate these, you set them to a value, and you tweak them depending on the outcome. There are some limitations too:
The near plane needs to be bigger than 0, but if it's too ...
1
vote
Accepted
Strange Light Angles in Unity
So, thanks to DMGregory in the comments, I learned about the need to "unpack" the normal data from the texture file in my custom shader. It was a super-easy fix, though. In my custom surface shader, I ...
1
vote
Accepted
Moving an object extremely close to the camera at a constant speed makes it visually speed up
The problem is that your constant movement speed - after perspective projection - creates non-constant perceived resize speed.
Let's assume the quad is moving 1 unit per second to the camera and this ...
1
vote
Box2D in 3D space
It should be pretty much the same as if you were using sprites. I would just keep it simple and say that one Box2D meter is one game unit.
1
vote
Accepted
Rendering perspective independent polygons in perspective view
You could project the 3D points to screen and then do a 2D rendering of the points and paste those over the main image. The size would be consistent then.
Another option would be billboarding, where ...
1
vote
glm::perspective isn't working?
The message you're seeing is saying your argument types aren't right. As 3 of the arguments are float values and they correctly match, then that means ...
1
vote
An object twice as close appears twice as big?
You have to define "twice as big". A line will be twice as long, or tall, at half the distance, but simple mathematics tells us that the surface area of a rectangle, for example, is the height ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
perspective × 125camera × 33
opengl × 26
3d × 24
2d × 21
projection × 20
matrix × 17
mathematics × 16
unity × 9
java × 8
libgdx × 6
graphics × 6
projection-matrix × 6
c# × 5
c++ × 5
sprites × 5
isometric × 5
coordinates × 5
game-design × 4
textures × 4
directx × 4
xna × 3
rendering × 3
tilemap × 3
depth-buffer × 3