Controlling the camera rendering

Controlling the camera rendering

Anonymous
Not applicable
797 Views
2 Replies
Message 1 of 3

Controlling the camera rendering

Anonymous
Not applicable

Hello, I was able to get basic camera control working from the python api...
Moving, rotation, perspective, screenshots, etc...
There are some things that i would like to do and i haven't been able to get to work:

1) create a new camera that is not associated with a window to render offscreen.
2) change the resolution and aspect ratio of the camera, for example if my autodesk fusion window is set to 1920x1080 resolution 19:9 aspect ratio can I render a 4096x4096 square 1:1 aspect ratio image.

the camera api doesn't seem to have this and the viewport api has hight and width read only...

I have been using the python api, but does the C++ api have access to camera features that the python doesn't have.

0 Likes
Accepted solutions (1)
798 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor
Accepted solution

Controlling the camera and saving images is limited to visible viewports.

 

As far as controlling the aspect ratio, the width and height arguments to allow you to do that now.  If you use 0,0 as the input, the result will be the size of the viewport, but I could also use 500x500 to create a 1:1 aspect ratio and the sides of the view will be clipped off.

 

There's only one API and it's accessible from both C++ and Python so all capabilities are available to both languages.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 3

Anonymous
Not applicable
While its not the answer i was hoping for, its good to know the limitations.
Thanks for your response
0 Likes