Render multiple individual items for Ml dataset

Render multiple individual items for Ml dataset

mpsilcock
Observer Observer
384 Views
2 Replies
Message 1 of 3

Render multiple individual items for Ml dataset

mpsilcock
Observer
Observer

Is there a way to create a batch file render script?

 

I have a few 1000 files that I would like to open, render and save a basic render with no background from a few angles for a machine vision project.

 

Maybe change the material colour too...

 

I am hoping that I can use some sort of batch file script to keep the files called the same-ish name and folder location.

 

I would rather learn how to do it in Fusion rather than start on a new program just for this task.

 

I have a fairly good understanding of python.

 

Thanks

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

BrianEkins
Mentor
Mentor
Accepted solution

This is certainly possible. Here are a few links to documentation and samples that, put together in the right way, should give you what you need.

 

  1. Opening Files - https://forums.autodesk.com/t5/fusion-360-api-and-scripts/api-to-open-a-specific-file/m-p/10753366
  2. Setting the view - You'll use the active viewport and its camera. Here's a blog post about cameras. It's specific to Inventor, but the concepts apply to Fusion. https://modthemachine.typepad.com/my_weblog/2013/09/working-with-cameras-part-1.html
  3. Saving the image is demonstrated in this sample: https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-33127518-f20a-11e5-bab1-a0a8cd5c2c67. Although there is a new saveAsImageFileWithOptions method that will allow you to specify a transparent background. https://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/Viewport_saveAsImageFileWithOptions.htm
  4. Here's a blog post about changing colors. https://ekinssolutions.com/setting-colors-in-fusion-360/

 

 

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

mpsilcock
Observer
Observer
Thanks, that looks like a good plan

0 Likes