Jump to content

export exploded view animation fbx [✔️]


rbesca

Recommended Posts

hey all! Imagine you have a whole bunch of stuff, add an exploded view node, animate the scale and then you want to export that animation to unity.

 

So far I tried using filmbox fbx with but the animation is missing in unity but shows up maya. I also tried using rbd to fbx from the game tools and packing everything to rbd before but the model aswell as the animation break in that case.

what is the correct / standard way to export this?

Edited by rbesca
Link to comment
Share on other sites

thanks for the reply!

I tried it again with rbd to fbx, initially I used a rbdfracturedobject node in my dopnet because that allowed me to check deforming geometry to read in my animation. Then I created  another geo that dopimports the result to then be rendered out. I managed to get the animation transfered that way but the exported result still has no animation, doesn't open in maya (unrecognized file type) yet the windows 3d viewer opens it and actually shows an animation timeline but no animation and a broken mesh

I found that in the example scene sidefx use the rbdpackedobject node so when you say the pieces should not be packed you mean before the dopnet or never ever? I am using an assemble node to create the named pieces, this is the point where I should not choose to check packed geo I assume? the rbd to fbx node expects packed geo to render so at some point I do need to pack things? they are doing an actual sim in the example though so I think things change in my case?

 

 

Edited by rbesca
Link to comment
Share on other sites

You need to change your sphere2 to a polygon from a primitive. FBX only works on polygon shapes. You can still use packed objects in the dop. The SideFX RBD to FBX will export packed object only based on the information given from DOPs, reverse of what I was saying. It has to be regular geometry prior to being pack however. I forgot they did not update it to work on non-RBD animations like your exploded view. 

To test just re-import it back into Houdini via the File > Import > FBX... menu

rbdfbx_export_scene.hiplc

Link to comment
Share on other sites

Okay yeah I got confused about that part too since it gave me errors initially that it expects packed geo to export.

 

I just transfered my setup over to the sphere example, that primitive sphere was what I noticed after I uploaded too but it didn't work after I fixed that either. My animation is an exploded view of a more complex model, it's perfect for what I'm trying to do there surely there is a way to export this to fbx

Edited by rbesca
Link to comment
Share on other sites

So I have my own that does this. I pulled it off Orbolt when SideFX came out with theirs. It still resides here : https://github.com/LaidlawFX/LaidlawFX/blob/master/otls/LaidlawFX.sop__rbdfbx__1.0.hda with the python needed here : https://github.com/LaidlawFX/LaidlawFX/blob/master/scripts/python/LaidlawFX/fbx.py You would need to pull the whole repo if you want to use it directly to add it to your $HOUDINI_PATH.

If you do know python, then you can just grab the code and modify it. 

For an FBX export, you need to build an object tree of your geometry cloud at your initial state. Then extract the transforms from the moving objects, and reference the transforms on the object level nodes. There are a few examples if you look for that workflow out there. Since Houdini does support what you want from the exploded directly out of the box, you will have to pick your poison. There are a few ways to extract the positions you need, but you will need some python to create the object tree. 

  • Thanks 1
Link to comment
Share on other sites

Hey Ben, good news I got things sort of working I think. I modified the script and changed nodeOut to be my dopnet and exportNode to be at /objects, now I get all the individual pieces with their transforms at object level, how do I go about exporting this to a single file with animation now? exporting everything as filmbox fbx didn't work

 

my script and scene

fbx.py

RBDtoFBX_export.hiplc

Edited by rbesca
Link to comment
Share on other sites

Ok I shared the wrong FBX code with my repo. Need to fix that at some point. 

I hacked my own node to work again. It is really bad legacy code at this point, lol. Hopefully it works for you. It was missing a chunk of code that copied the extracted transforms to the geometry. Which is doing an old extract of transform at this point. Oh well, legacy junk.

 

tempexporter.hda

RBDtoFBX_export.hiplc

  • Thanks 1
Link to comment
Share on other sites

this certainly spits out an fbx now :)

but no animation on it still for me, are you able to export an exploded view animation with this?

 

you hacked the node to work with your legacy code or the version I uploaded? export works with my modified one currently

Edited by rbesca
Link to comment
Share on other sites

alright I'll keep it here then. was quite fun to learn some houdini and python stuff doing this, didn't do much with it before. which parts of the code do you think could be sped up most / easiest? I'd love some pointers to learn more python if you can think of anything that you think would be realistic for a relative beginner to implement. have a good week :)

Edited by rbesca
Link to comment
Share on other sites

  • rbesca changed the title to export exploded view animation fbx [✔️]

The python and the fbx part can't really be speed up that much. The python code can be cleaned up a bit and made more robust. This is a few year old code that I abandoned. The extraction of transforms can be speed up quite a lot with a new set of nodes in Houdini. FBX in general is an outdated format for this type of work. If you are looking for straight transform Vertex Animation is the best bet. That where all my latest code and development have gone the last few years. 

As far as learning python, just picking up snippets here and there in Houdini helps. It does not have to be a full course. Like this example where you had a specific problem to solve. You might not understand all the code, and by my own admission it's not the best, but once you see more code like it you'll be able to compare. The basic concept of just having python in Houdini press a button when another task is done is where I got my start. I wanted to trigger one sim after another.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...