OpenGL Discussion and Help Forums - Math and Algorithms
https://www.opengl.org/discussion_boards/
Discussion about 3D math and linear algebra that is essential as a background to OpenGL codingenSat, 24 Feb 2018 05:43:22 GMTvBulletin60https://www.opengl.org/discussion_boards/images/misc/rss.pngOpenGL Discussion and Help Forums - Math and Algorithms
https://www.opengl.org/discussion_boards/
Ray tracing, Z coordinate (depth) of bounding box seems much bigger then it should be
https://www.opengl.org/discussion_boards/showthread.php/200418-Ray-tracing-Z-coordinate-%28depth%29-of-bounding-box-seems-much-bigger-then-it-should-be?goto=newpost
Sun, 04 Feb 2018 19:00:13 GMTI am making 3d scene and using ray tracing algorithm. When I add bounding box with the same length of sides every time I get the scene that looks...I am making 3d scene and using ray tracing algorithm. When I add bounding box with the same length of sides every time I get the scene that looks like a tunnel, not like a box. Bounding box seems much deeper that it is.
My positioning settings are:

Camera position: (0,0,-10)

Camera direction: (0,0,1), so towards positive Z axis

Up vector: (0,1,0)

Distance from the camera to image plane: 10 units

One sphere at (0,0,2) with r of 2 units

Bounding box 10 units for all axis.

So image plane should be at 0 units for Z coordinate and the center of it is (0,0) for the X and Y.

This is the image I am getting:

And as you can see a little dot in the center is sphere on (0,0,2) which shouldn't look that far away.

I got the box-like bounding box only when I used some crazy settings like when camera is 100+ units away from the image plane, and the bounding box is only 10 units in all axis, but I should get the right image with less distance from the plane.

Thanks.

]]>Math and Algorithmsprinciphttps://www.opengl.org/discussion_boards/showthread.php/200418-Ray-tracing-Z-coordinate-%28depth%29-of-bounding-box-seems-much-bigger-then-it-should-beFrustum cullling
https://www.opengl.org/discussion_boards/showthread.php/200409-Frustum-cullling?goto=newpost
Wed, 31 Jan 2018 18:10:42 GMTWhat is the algorithm for frustum culling and how would i implement it in lwjgl.

I looked on bing but couldn't find an answer.
]]>Math and AlgorithmsMackyboyhttps://www.opengl.org/discussion_boards/showthread.php/200409-Frustum-cullling