Awesome tutorial ;) When switching to gamemode, the parameter after the @ character is the monitor frequency (not the pixel depth). Should you want to specify the pixel depth, you'd need to use a : character after the screen resolution, i.e. x:@ For example 1920x1080:32@60, but you could also use 1920x1080@60 or even 1920x1080 (as bpp and frequency are optional). This might be the reason why 1920x10080@32 did not work.
@OGLDEV
2 жыл бұрын
Thanks for the feedback! I'll fix the code.
@rafadugoecki4747
11 ай бұрын
Kudos for this tutorial! : ) I would you like to ask, if you would like to provide similar one about creating "descent-like" camera with full 360 rotations around any axes?
@OGLDEV
11 ай бұрын
Thanks! This is an interesting topic but will require some research. I think that this is basically a flight simulator type of camera with minimal physical constraints. Will add this to the todo list.
@rafadugoecki4747
11 ай бұрын
@@OGLDEV Awesome! : ) "Descent-like" I meant like in FPP game Descent (eventually Freespace), but yes this is some flight simulator type one.
@PP-ss3zf
5 ай бұрын
thanks for this video. in general terms, how do i ensure that 180 degrees lock on the vertical look of the camera? im using threejs (javascript library). im having trouble with my Z (roll) axis - i apply quaternion to X and Y properly and it works but its making effect on Z as well. Maybe the X and Y axis used for quaternion is wrong?
@OGLDEV
5 ай бұрын
You're welcome! What do you mean by 'a 180 degrees lock'? Are you referring to gimbal? In general quaternions are the solution to a gimbal. Are you applying yaw and pitch correctly but as a side effect you're also getting a roll? Maybe you can share some code as an example.
@yoonhakim2455
5 ай бұрын
Is the positive rotation direction dependent on what coordinate system you choose? I got confused when you go 90 degrees clockwise at 15:55.
@OGLDEV
5 ай бұрын
Yes, it is. In a left handed coordinate system the positive direction is clockwise and in a right handed system it is counter clockwise. See more details here: butterflyofdream.wordpress.com/2016/07/05/converting-rotation-matrices-of-left-handed-coordinate-system/
@coreC..
3 ай бұрын
Duke Nukem ! Piece of cake
@OGLDEV
3 ай бұрын
God I love this job!!!
@Brmngm
5 ай бұрын
You could use atan2(x,y) to get angle in a range from -п to п without need to check quadrants.
@OGLDEV
5 ай бұрын
Thanks for the feedback! I updated the code with your suggestion. Notice that I only did it in the newer Common/ogldev_basic_glfw_camera.cpp which is what I'm using right now and not in all the local copies of camera.cpp in the preceding tutorials before I switched to GLFW.
@acho8387
Жыл бұрын
Hello, how do you load the sponza atrium to your engine?
@OGLDEV
Жыл бұрын
Using the Assimp library: kzitem.info/news/bejne/1IaV0Z2FfXVjaIY
@ujjjjju
2 жыл бұрын
This doesn't actually use quaternions since your still trying to convert between euler angles. You still face gimbal lock.
@OGLDEV
2 жыл бұрын
The view vector is rotated twice using a quaternion.
@Byynx
Жыл бұрын
When we say a vector points in a certain direction are we taking in account all axis values or just the axis that has the greater value ? Because how can we say 2 different vectors points in the same direction if their components overall have different values ? Or direction is just a rotation value ?
@OGLDEV
Жыл бұрын
A direction is a combination of all axes so we have to take all of them into account. A vector is a combination of a direction and a length. For example, [1,1,1] and [2,2,2] point in the same direction but they have different lengths so they are different vectors. Imagine two cars driving along the same road at different speeds. If you want to model their movement using vectors then the direction of both vectors equals to the direction of the road while the length of each vector is set to be the speed of the car (possibly following some mapping: a length of 1 means 100 kph).
@Test-iv4pm
3 ай бұрын
A math guy told me "you never really understand it, you just get used to it"
@OGLDEV
3 ай бұрын
That guy was definitely not John Carmack.
@Borgilian
2 жыл бұрын
Huh, so if I understand what you've done here, it's almost as if you're building a 4th dimensional "vector" (already aligned and rotated to a desired position), then pulling your original vector into the 4th dimension and aligning it with the previously built quaternion, and lastly bringing the vector back into the 3rd dimension with the use of a quaternion conjugate that negates the effects.
@OGLDEV
2 жыл бұрын
We create a quaternion using the vector that we want to rotate about and the angle. The rotation happens through the two multiplications of the vector by the quaternion and it's conjugate. The conjugate indeed cancels the rotation of the original quaternion but by placing the vector in the middle of the multiplication we get the full angle of rotation.
@madPL1239
2 жыл бұрын
Awesome. Very good work. I'm just struggling with the rotation of the cam with glm quaternions:))) I use kubuntu so long time:))) Linux never die. But my favorite editor is Kate. Only now I found your website - I wonder why so late :)) Of course i subscribed and you have likes:)) Greetings and Great Respect for You
@OGLDEV
2 жыл бұрын
Thank you and good luck!
@h4teher0
2 жыл бұрын
Hello! Could you please check my comment on your site on tutorial 15? I worked through your tutorial to make quaternion rotations for my camera, but it works very strangely and I can't find out what a mistake I've made...
Пікірлер: 27