Reply
Community Visitor
2 Posts

batch rendering

47 Views, 3 Replies
3 weeks ago

Hello,

 

I am trying to implement a script that loops through each body in the root component, filtered by a particular naming convention on each folder/node/body, and renders them each separately to a separate file.  My question is twofold:

 

1. I cannot seem to query which group a body happens to be in - it seems the root component flattens all the bodies underneath it and ignores the hierarchy defined in the browser.  Is there a way to walk the browser tree and retrieve bodies that way as opposed to retrieving a flat list under the root component?

2. I found some other posts two years ago that mentioned rendering support via the API is limited.  We have tens of thousands of combinations to render (each body will have to have multiple combinations of textures / colors specified, and each one rendered separately).  It appears the API has plenty of support for editing the design, but is there support for rendering as we would like?  (We would like to render each separate combination 120 seconds, then save it to a file, then continue... this process is impossible to do by hand...)

Autodesk Support
1262 Posts
353 Kudos
369 Solutions

Re: batch rendering

3 weeks ago in reply to: designer9X2NF

Unfortunately, it looks like a lot of what you want to do is not currently exposed through the API.

 

The API doesn't provide access to the groups within the Bodies folder. That functionality was added after we initially exposed bodies through the API and it hasn't been updated to include it yet. It is something we need to do.

 

Regarding rendering, which type of rendering do you want?  Ray tracing in the Rendering workspace or just the standard rendering you see in the Model workspace?  The functionality in the Rendering workspace is not currently exposed at all through the API.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Community Visitor
2 Posts

Re: batch rendering

2 weeks ago in reply to: ekinsb

Brian-

 

we are indeed trying to batch render using the Rendering workspace.  That is not good that it's not exposed at all... Are you positive there's no way to search the UI for the relevant commands and execute them (indirect API calls) rather than make direct API calls?

 

If it's not available, what is the alternative?  Is there other software we can export to to accomplish a similar effect, or does the cloud offerings by AutoDesk enable something like this?  If it's not possible, then this sinks our entire project.

Autodesk Support
1262 Posts
353 Kudos
369 Solutions

Re: batch rendering

2 weeks ago in reply to: designer9X2NF

Unfortunately there isn't a way to do this by directly driving the commands.  I've tried it and there are still some things missing that don't allow you to work this way.  For example, how do you know how long to wait for the rendering to finish and then how do you save the finished rendering?  Believe me when I say I wish it was there too.  I wanted it for something I was working on too.  Part of the reason it's not there is there may be some changes to the Render workspace and we don't want to release and API that would potentially be broken when/if these changes are made.

 

As far as other workarounds, they would all be more work.  One that seems like it might be feasible is to use the Forge Derivative Service API to extract an fbx file from your Fusion design and then use Max or Maya to render it.  I don't have any personal experience with doing this so I can't say how easy it would be or it there are any issues to be aware of.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog