![](smile.gif)
View transform tutorial
anyone know where I can find this? The help docs seem kindof sparse. What is the magnitude, when you are giving it the eye point and the lookat point? What is the easiest way to calculate an up vector to use?
Also is it more common to use the view matrix, or just do the view transforms in the world matrix? The help files semm to suggest it is more efficient to do it all in the world matrix.
Thanks for any sage advice you may have
Doug Sutherland
![](smile.gif)
Think I figured this out. My main problem is that I was trying to use world coordinates in the view matrix. D''oh. They have to be unadjusted coordinates for it to work.
The eye distance parameter is just something in the code that I am working with. Seems to have something to do with stereo enabled apps. For non-stereo it just gets this distance from the magnitude of the eye point to lookat point vector.
The up vector in the code I am looking at is always <0, 1, 0>, I guess there is no real calculation here you will just have to maintain some kind of tilt variables if you want that behavior and get this vector from those.
I still wonder if it is more common to just use alot of world transformations and leave the view matrix alone. The code I am looking at does it the opposite way - the world matrix is always the identity matrix, and all the transforms are done in the view matrix instead. I guess just having two transforms to work with is easier in some circumstances, but I can''t think of them.
Doug S
The eye distance parameter is just something in the code that I am working with. Seems to have something to do with stereo enabled apps. For non-stereo it just gets this distance from the magnitude of the eye point to lookat point vector.
The up vector in the code I am looking at is always <0, 1, 0>, I guess there is no real calculation here you will just have to maintain some kind of tilt variables if you want that behavior and get this vector from those.
I still wonder if it is more common to just use alot of world transformations and leave the view matrix alone. The code I am looking at does it the opposite way - the world matrix is always the identity matrix, and all the transforms are done in the view matrix instead. I guess just having two transforms to work with is easier in some circumstances, but I can''t think of them.
Doug S
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement