Jump to content

Photo Mode Screenshot Doesn't match Cam transforms


cpullma
Go to solution Solved by Peter,

Recommended Posts

When in play mode, I open up the Photo mode with F11, and click the button to take a screenshot from the active camera which is the exact position and angle I need. Then when I got and open up the screenshot that was saved, it's completely in the wrong position/rotation. 

 

Is there a setting I'm missing for it to take the screenshot from the active camera in game mode?

 

 

Link to comment
Share on other sites

I have several cameras that I switch between with buttons to get different angles, but whenever I press the, "Take Photo" button it only ever takes photos from some random camera Gaia adds in for the Photo Mode or something, not sure. I just want a pic taken from the game camera I have turned on with the photo mode.

Link to comment
Share on other sites

  • Solution

Hi @cpullma, the Photo Mode creates its own camera for the duration while the photo mode is active, which is then removed again when the photo mode is closed. This was done to not disturb any settings on the original camera and to bypass any restrictions that original character controller camera might have (e.g. FPS arms attached to it, having a collider on the camera etc.)
If you want to support your own fixed cameras with the photo mode, please take a closer look at the script "AutoAssignTakePhotoEvent" - what it does is it subscribes the button click event of the "Take Photo" button to the screenshotter script on the Photo Mode camera. You could put a "Screenshotter" script on your own custom cameras and make it so that whenever you switch cameras, you remove all old button onclick listeners, and instead link the button with the screenshotter script on your current custom active camera.

If all you need is a way to switch between those fixed cameras and take a screenshot, you could also consider coming up with your own UI/logic and then call Screenshotter.TakeHiResShot() on the correct camera directly.

Link to comment
Share on other sites

Hey @Peter, that makes a lot of sense. I will try assigning the scripts to the cameras that my UI/ logic switch between already so that the button connects to the active camera, but how do I stop it from taking a picture with the camera that is created for the Photo Mode as well?

Link to comment
Share on other sites

On 12/31/2022 at 5:44 PM, cpullma said:

I got it working @Peter!! One more question about this that has me confused. When I create a build and use the Photo Mode and Take Photo, where do those photos go? 


In a build, the photos are stored in the users documents folder, you can configure the subfolder on the screenshotter script:

image.png

 

On 12/31/2022 at 5:52 PM, cpullma said:

And I still need to know of a way to stop a camera from being created when entering photo mode


You would need to comment that out / adapt it in the Gaia source code, the relevant line is 447 in PhotoMode.cs.

image.png

The script expects a camera to work with at this place, so you might need to assign one of your own cameras to m_targetCamera for it not to run into any issues later down the line.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...