Understanding Perspective Matrixes in (simpler english) (WEBGL)/(OPENGL)
Absorbing and reflecting this video
I discuss in much simpler english
(if you've been using opengl for a tad bit)
you'll understand this but if not you should be able to understand
this if you know Cartesian.
Basically the idea with perspective projection
your clipping and or attaching the znear and or zfar plane on the x (width) , y (height) and z (depth) axis with the clipping and perspective volume which is determined by the distance between zfar and znear planes but the equations are weird and confusing.
First lets understand the matrix :
var matrix = [
xx, xy, xz, xw,
yx, yy, yz, yw,
zx , zy, zz, zw,
wx, wy, wz, ww
];
Now depending on if it's row or column order
will determine which w's are used for translation
in this case for webgl row is
var matrix = [
xx, xy, xz, xw,
yx, yy, yz, yw,
zx , zy, zz, zw,
(wx, wy, wz, ww)
];
if it was column then it would be
var matrix = [
xx, xy, xz, (xw,
yx, yy, yz, yw,
zx , zy, zz, zw,
wx, wy, wz, ww)
];
To create the actual plane you use variables
top 1.0,
bottom -1.0
left -1.0
right 1.0
on the xz and yz part of the matrix divided by the width and height variables .
width = 1.0
height = 1.0
then all the zfar and znear equations are as follows
var PersMat = [
//ROW 1
znear / width / 4.0 * zoomfactor, 0.0, left+right/width/2, 0.0,
//ROW 2
0.0, znear / height / 4.0 * zoomfactor , top+bottom/height/2, 0.0,
//ROW 3
0.0, 0.0, - (zfar + znear) / (zfar - znear), 2*zfar*znear / zfar - znear,
// ROW 4
0.0, 0.0, -1.0, 0.0
];
Hope that helps.
Other Videos By Universa
2020-03-19 | What I want from a intimate friendship? |
2020-03-10 | Life Diary - Support of Self & Others - Part 3 |
2020-03-10 | Life Diary - Support of Self & Others - Part 2 |
2020-03-10 | Life Diary - Support of Self & Others - Part 1 |
2020-02-16 | World of Warcraft - Test Video (I'm Back All, Kinda!) |
2019-11-16 | Origin and Future |
2019-11-16 | Lonely as Schizotypal #4 |
2019-11-16 | Lonely as Schizotypal #3 |
2019-11-16 | Lonely as Schizotypal #2 |
2019-11-16 | Lonely as Schizotypal #1 |
2019-11-01 | Understanding Perspective Matrixes in (simpler english) (WEBGL)/(OPENGL) |
2019-08-25 | Attempt at Making Donkey Kong Country's First Level with Construct 3 |
2019-08-25 | Life Update / Euphoria Garden Project |
2019-08-19 | I'm an INFJ and much more |
2019-07-30 | Quick Channel Update |
2019-07-23 | For Any Admirer? |
2019-07-17 | Life Diary #8 - Miris Development Diaries/Life |
2019-07-05 | Shadow Wood : Tribalism Video Comment Reply |
2019-07-04 | Quick Channel Update |
2019-07-02 | Miris is Officially in Development! |
2019-06-29 | Rangeomorphs and Origin of Life |