Exporting .fbx as object sequence (frame by frame).

   12325   13   6
User Avatar
Member
17 posts
Joined: 5月 2016
Offline
Hello,

I have an object sequence in sop (every frame generates a new geometry), and I need to export it as frame sequence, something like tree_$F.fbx. But so far the .fbx rop seems to write only the first frame, and some kind of animation data (in a folder called **.fpc).

In other word, I need the frame by frame option from the .abc rop, but for a .fbx format.
Is it any magic workaround to solve this ?
User Avatar
Member
32 posts
Joined: 1月 2015
Offline
I also need this and so far i put together an FBX export rop but it only appears to export the first frame,
regardless if i select one frame for export or a frame range. with out.$F.fbx as output…
Looks like a bug ?
User Avatar
Member
17 posts
Joined: 5月 2016
Offline
Hello,
A workaround is to create s shelf tool with this :



import hou

node = hou.node(“/path_to_fbx_export_operator”)

for i in range(0,51):
hou.setFrame(i)
node.render()
User Avatar
Member
2 posts
Joined: 9月 2019
Offline
PascalBkm
Hello,
A workaround is to create s shelf tool with this :

import hou

node = hou.node(“/path_to_fbx_export_operator”)

for i in range(0,51):
hou.setFrame(i)
node.render()

Hi I saw this post I was trying to do the same thing export fbx sequence frame by frame. But I have no knowledge of using python in Houdini. What is the “path to fbx export operator”? Do you have a video or images of how to set this up so I can use it.
User Avatar
Member
6 posts
Joined: 4月 2018
Offline
I'm having the same problem. Only the first frame of an animation sequence can be exported as an filmbox FBX.

How does one use the shelf tool?
User Avatar
Member
555 posts
Joined: 2月 2017
Offline
btangonan
I'm having the same problem. Only the first frame of an animation sequence can be exported as an filmbox FBX.

How does one use the shelf tool?
open up your SideFX labs shelf say, rclick on an empty area>New Tool>Script tab

paste in code above:

import hou

node = hou.node(/path_to_fbx_export_operator)

for i in range(0,51):
    hou.setFrame(i)
    node.render() 

I've done it here for you WITH indentation, otherwise Python will complain of incorrect indentation

the path should point to your rop_fbx1 (because that has the render on it, otherwise…another error)

something like this: node = hou.node(“/obj/geo1/rop_fbx1”)

maybe change 1st frame to 1 also.

Note: I tested reading it back in….using File node is still incorrect, use Menu: File>Import instead

This sounds stupid, but again make sure in the rop_fbx1 it is outputting range instead of current frame.
Edited by vusta - 2020年6月5日 01:28:13
User Avatar
Member
4 posts
Joined: 2月 2020
Offline
vusta
btangonan
I'm having the same problem. Only the first frame of an animation sequence can be exported as an filmbox FBX.

How does one use the shelf tool?
open up your SideFX labs shelf say, rclick on an empty area>New Tool>Script tab

paste in code above:

import hou

node = hou.node(/path_to_fbx_export_operator)

for i in range(0,51):
    hou.setFrame(i)
    node.render() 

I've done it here for you WITH indentation, otherwise Python will complain of incorrect indentation

the path should point to your rop_fbx1 (because that has the render on it, otherwise...another error)

something like this: node = hou.node("/obj/geo1/rop_fbx1")

maybe change 1st frame to 1 also.

Note: I tested reading it back in....using File node is still incorrect, use Menu: File>Import instead

This sounds stupid, but again make sure in the rop_fbx1 it is outputting range instead of current frame.

I tried this solution and it exports a single fbx with the animation data inside but not as a series of fbx's ala the example of tree_$F.fbx mentioned in the first post. I have it set to output range and not current frame and Im not totally sure what or if Im doing something wrong
User Avatar
Member
3 posts
Joined: 5月 2015
Offline
The script doesn't work for me. Error. Sidefx should add a toggle for ->animating

*EDIT - here is the error
SyntaxError: ('invalid syntax', ('RenderFBX_Sequence', 3, 17, 'node = hou.node(\xe2\x80\x9c/obj/Object_Individual_Chunks/rop_fbx1\xe2\x80\x9d)\n'))
Edited by Jon Meier2 - 2021年10月14日 13:03:35
User Avatar
Member
3 posts
Joined: 5月 2015
Offline
Ok. I had to remove the following:
"import hou"

And it worked...but I also had to set the output to "current frame only", and not "frange" as previously instructed.
User Avatar
Member
132 posts
Joined: 9月 2018
Offline
I cannot for the life of me get this to work. hah! Can anyone bring any new solution to export an FBX sequence as separate files frame by frame?

SyntaxError: ('invalid syntax', ('tool_1', 3, 17, 'node = hou.node(\xe2\x80\x9c/obj/file1/rop_fbx1\xe2\x80\x9d)\n'))
Edited by VGriffith - 2021年11月3日 12:37:08
User Avatar
Member
8785 posts
Joined: 7月 2007
Offline
VGriffith
Can anyone bring any new solution to export an FBX sequence as separate files frame by frame?
you can use tops nowadays to enforce individual execution of ROP FBX Output per frame
Edited by tamte - 2021年11月3日 13:07:15

Attachments:
ts_tops_export_per_frame_fbx.hip (273.3 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
6 posts
Joined: 8月 2019
Offline
Hello,

Mine is not working and I am not sure why ...
If I click on save to disk on the Rop_fbx node I get just one frame exported as fbx
Edited by TheReyplay - 2022年1月21日 14:31:20

Attachments:
prob.PNG (118.9 KB)
prob1.PNG (65.8 KB)
prob2.PNG (86.1 KB)
prob3.PNG (113.8 KB)

User Avatar
Member
3 posts
Joined: 6月 2021
Offline
keeganmillbern
vusta
btangonan
...

import hou

node = hou.node(/path_to_fbx_export_operator)

for i in range(0,51):
    hou.setFrame(i)
    node.render() 

I've done it here for you WITH indentation, otherwise Python will complain of incorrect indentation

...

Following up on this since I just got it to work.

2 things I had to do:
  1. Use single (ie. '/obj/geo1/rop_fbx1') quotes around the path name. Copy and paste inputs special start/end quote characters which cause a syntax error.
  2. Set the rop_fbx 'Valid Frame Range' to 'Render Current Frame'. I don't understand why, but it works.

Also, make sure you setrange(0,51)to your correct frame range if you're missing models.


Bonus tip since I had some trouble with this:

I can't use $F in the output name since I wanted to preserve the original filenames from the models I'm importing.

To set a custom name attribute for your files you can create a detail attribute and use this format --> $HIP/prefix_`details("../SOME_NULL", "filename")`.fbx
in the output file field.

Bold characters will need to be changed to match your setup. This didn't work using "." , so SOME_NULL is a Null node I created just before the rop_fbx, and after creating the detail attrib called "filename".
The prefix_ is not necessary, obviously, but be careful you don't overwrite the original models.
User Avatar
Member
13 posts
Joined: 9月 2016
Offline
So, one dirty easy way you can do this is simply use the File SOP set to write *_$F.fbx and play your frame range.

It's missing all the FBX options but it did do the job for me, as I need to import it as "geometry cache" in an old software.

I just wish the ROP FBX Output frame range would work, and I also couldn't make TOPs export this quickly. This dirty method above is much much quicker for my case.
  • Quick Links