Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: camera view problem

  1. #1
    Guest

    camera view problem

    Dear all,

    Please help.
    I just recently move a cad program from Direct3D to OpenGL. (Direct3D uses Left hand rule, I use Right hand rule axis system for my OpenGL).
    Direct3D sometimes gives me blank picture without any warning.

    Using DelphiX 2000 and Delphi 5, After creating the objects and the camera using OpenGL, I come with truncated view. I have tried to change the FocalLength and DepthOfView but still I can not see the whole scene, only part of an object. I can rotate it, but can not make it smaller although I use very small FocalLength (1.0).

    Please help me to fix this problem.
    Thanks.

  2. #2
    Intern Newbie
    Join Date
    Feb 2005
    Location
    South Africa
    Posts
    46

    Re: camera view problem

    Unless I'n getting your point all wrong here,
    why not just move the camera back instead of changing the field of view?
    Just use gluLookAt to reposition the camera.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,142

    Re: camera view problem

    Perhaps there is something wrong with your field of view calculation... How do you set the focal length?

  4. #4
    Guest

    Re: camera view problem

    Finally I figured out the problem source. Something wrong with the GLScene component for Delphi. I install the latest version of GLScene and it display the view correctly.

    But please explain more how should I calculate the camera parameters to capture whole object with any size (zoom all command) :

    - For example, I have a mesh with object center at xo,yo,zo and with object size A

    - I want to put camera at xc,yc,zc
    - How do I calculate xc,yc,zc and DepthofView and FocalLength to get the whole scene on viewport?

    Thanks for your advice.
    Nathan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •