Hello Guest

Open GL Math Explained

  • 5 Replies
  • 12399 Views
Open GL Math Explained
« on: March 24, 2017, 22:23:48 »
I only took a quick look at this site, but it seems to be very good.  Explains mathematics behind many Open GL and game concepts.  They have a very detailed explanation of how the Open GL projection matrix is derived, which I found very helpful.

https://www.scratchapixel.com/index.php


Re: Open GL Math Explained
« Reply #1 on: May 06, 2017, 11:39:42 »
Very nice, thank you!  ;D

Re: Open GL Math Explained
« Reply #2 on: May 31, 2017, 12:17:14 »
Is there anything to make 3d ricocheting easier? With a vector and a triangle?

*

Kai

Re: Open GL Math Explained
« Reply #3 on: May 31, 2017, 12:41:40 »
If by "3d ricocheting" you mean:

"Given the direction vector D of some object (a bullet) and a plane (a wall with normal vector N) which is hit by the bullet, then compute the reflection direction vector R as a reflection of D around N"

then the linear algebra for this is: https://math.stackexchange.com/questions/13261/how-to-get-a-reflection-vector#answer-13266

Re: Open GL Math Explained
« Reply #4 on: May 31, 2017, 13:54:36 »
If by "3d ricocheting" you mean:

"Given the direction vector D of some object (a bullet) and a plane (a wall with normal vector N) which is hit by the bullet, then compute the reflection direction vector R as a reflection of D around N"

then the linear algebra for this is: https://math.stackexchange.com/questions/13261/how-to-get-a-reflection-vector#answer-13266
Do you seriously expect me to use some dodgy source like that?

*

Kai

Re: Open GL Math Explained
« Reply #5 on: May 31, 2017, 14:27:05 »
It does not actually matter which source you use for this. They'll all tell you the same thing.
Here's another one: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/reflect.xhtml
(no, I am not expecting you to implement it in GLSL. I am expecting you to look at the formula)