Ogre/Mogre: Camera two point perspective

前端 未结 1 2017
清酒与你
清酒与你 2021-01-14 04:09

I\'m displaying a scene with some cubes in it. The camera uses persective. Everything works great, but I\'d like the vertical lines to be parallel (two point perspective: ht

相关标签:
1条回答
  • 2021-01-14 04:50

    The University of Berkeley has a page on the different perspective transformations and the matrices you need to use. The two-point perspective transformation is:

      _                    _
     |  1   0   0 sin(q)/d  |
     |  0   1   0     0     |
     |  0   0   1 cos(q)/d  |
     |_ 0   0   0     0    _|
    

    Where q is the angle used to rotate the points (rather than the axes) and d is unexplained(!) but I think it's the distance of the camera from the focal plane.

    enter image description here

    Source

    0 讨论(0)
提交回复
热议问题