How do mass export FBX models?
1974 5 1- HenDaSheng
- 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!
- tamte
- Member
- 8798 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?
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
FX Supervisor
Method Studios, NY
- HenDaSheng
- Member
- 63 posts
- Joined: Feb. 2022
- Online
坦特Thank for your help. After reading this article, I feel that it is done through TOPs, but I don't know where to start.
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?
Edited by HenDaSheng - April 3, 2023 10:56:21
- ajz3d
- 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 fileJust 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.fbx
or 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
- HenDaSheng
- Member
- 63 posts
- Joined: Feb. 2022
- Online
ajz3dnot sure if anything changed since then, but if .fbx still doesnt support per frame export as different fileJust 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.fbx
or 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.
- HenDaSheng
- Member
- 63 posts
- Joined: Feb. 2022
- Online
-
- Quick Links