Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ar4development opened this issue Nov 17, 2024 · 3 comments
Open

Comments

@ar4development
Copy link

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?

@robertosfield
Copy link
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.

@ar4development
Copy link
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 .

@robertosfield
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants