Skip to content

[Question]: It it possible to change focus distance of the camera? #1344

Open

Description

@ar4development

Hi!

I've come here from esmini openscenario player that is built upon openscengraph engine. There one can set camera position and direction for the viewer.

However there is no option to set focus distance of the camera. So I examined osg code a bit (also coding examples) and did not find any place where one could set focus distance.

So the question is: is it even possible? Could you advice on what would be the proper way of setting such a camera property?

Activity

  1. robertosfield commented on Nov 17, 2024

    @robertosfield
    Collaborator

    The osg::Camera doesn't have a focus distance because the standard OpenGL fixed function pipleline has no concept of focus.

    Focus distance is tied to depth blurr rendering techniques, so requires multipass rendering a custom shaders. This is something that users must write themselves.

  2. ar4development commented on Nov 23, 2024

    @ar4development
    Author

    The osg::Camera doesn't have a focus distance because the standard OpenGL fixed function pipleline has no concept of focus.

    Focus distance is tied to depth blurr rendering techniques, so requires multipass rendering a custom shaders. This is something that users must write themselves.

    Thank you! could you also advise on focal length. I would like to reproduce FOV of my real camera .

  3. robertosfield commented on Nov 23, 2024

    @robertosfield
    Collaborator

    I can point you in the right direction for OSG features but not general graphics. You'll need to do your own research, there is plenty of resources available on the web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions