How do mass export FBX models?

   2137   5   1
User Avatar
Member
63 posts
Joined: Feb. 2022
Online


Hello everyone, I just made a dynamic model, which changes every 10 frames, and I want to save a fbx file for each change, what should I do?

I checked a lot of information, including the workflow of python and PDG, but they all require a lot of pre-settings, and it is difficult for me to understand the principle. Is there a more concrete and intuitive way to accomplish this?

thanks for your help!
User Avatar
Member
8805 posts
Joined: July 2007
Offline
I don't have better answer for you, maybe just example using TOPs
https://www.sidefx.com/forum/topic/54398/#post-351084 [www.sidefx.com]
not sure if anything changed since then, but if .fbx still doesnt support per frame export as different file I'd consider TOPs the most straightforward and you even can chose which frames or even just wedge the parameters on your object directly instead of animating, etc

does it need to be .fbx?
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
63 posts
Joined: Feb. 2022
Online
坦特
I don't have better answer for you, maybe just example using TOPs
https://www.sidefx.com/forum/topic/54398/#post-351084 [www.sidefx.com]
not sure if anything changed since then, but if .fbx still doesnt support per frame export as different file I'd consider TOPs the most straightforward and you even can chose which frames or even just wedge the parameters on your object directly instead of animating, etc

does it need to be .fbx?
Thank for your help. After reading this article, I feel that it is done through TOPs, but I don't know where to start.
Edited by HenDaSheng - April 3, 2023 10:56:21
User Avatar
Member
576 posts
Joined: Aug. 2014
Offline
not sure if anything changed since then, but if .fbx still doesnt support per frame export as different file
Just checked, and I couldn't export FBX "Render Frame Range" to separate files with the ROP FBX Output SOP, so it appears that things didn't change much. The animation is written into a single file.

@HenDaSheng, if you're not constrained to FBX files at this point in production, the best format for this kind of task would be Alembic.

Otherwise, if you need to use FBX, but don't want to use TOPs, you can write a Python script (a shelf tool for example), that would:

1. Create a ROP FBX Output SOP.
2. Link its input to currently selected SOP.
3. Set the "Output File" to /path/filename.$F4.fbxor something like that, depending on your file naming convention and the frame range you want to render.
4. Set other FBX settings.

Then, in a loop for every 10th frame:
1. Press "Save to Disk" button.
2. Move the timeline +10 frames.
3. Go to 1. Rinse and repeat.

And, after the loop completes its cycle, destroy the FBX output node.
Edited by ajz3d - April 3, 2023 17:57:54
User Avatar
Member
63 posts
Joined: Feb. 2022
Online
ajz3d
not sure if anything changed since then, but if .fbx still doesnt support per frame export as different file
Just checked, and I couldn't export FBX "Render Frame Range" to separate files with the ROP FBX Output SOP, so it appears that things didn't change much. The animation is written into a single file.

@HenDaSheng, if you're not constrained to FBX files at this point in production, the best format for this kind of task would be Alembic.

Otherwise, if you need to use FBX, but don't want to use TOPs, you can write a Python script (a shelf tool for example), that would:

1. Create a ROP FBX Output SOP.
2. Link its input to currently selected SOP.
3. Set the "Output File" to /path/filename.$F4.fbxor something like that, depending on your file naming convention and the frame range you want to render.
4. Set other FBX settings.

Then, in a loop for every 10th frame:
1. Press "Save to Disk" button.
2. Move the timeline +10 frames.
3. Go to 1. Rinse and repeat.

And, after the loop completes its cycle, destroy the FBX output node.

Thank you for your reply, I can understand the meaning, but it is difficult to translate it into a concrete implementation process.
User Avatar
Member
63 posts
Joined: Feb. 2022
Online


I solved the problem of batch export here.

I don't know why it reminds me that I can't post the link, you can search by the title.
Edited by HenDaSheng - April 11, 2023 04:35:28

Attachments:
ForEach_OutputFBX.hiplc (162.7 KB)

  • Quick Links