rbesca Posted February 24, 2020 Share Posted February 24, 2020 (edited) 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 February 24, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted February 24, 2020 Share Posted February 24, 2020 RBD to FBX shoudl work. Make sure all the pieces are correctly identified with the name attribute as separate pieces. The pieces should not be packed. 1 Quote Link to comment Share on other sites More sharing options...
rbesca Posted February 25, 2020 Author Share Posted February 25, 2020 (edited) 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 February 25, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted February 25, 2020 Share Posted February 25, 2020 You'll need to provide an example scene of what your doing. FBX only exports regular geometry not packed geometry. Quote Link to comment Share on other sites More sharing options...
rbesca Posted February 27, 2020 Author Share Posted February 27, 2020 thanks for taking a look! rbdfbx_export.hiplc Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted February 27, 2020 Share Posted February 27, 2020 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 Quote Link to comment Share on other sites More sharing options...
rbesca Posted February 27, 2020 Author Share Posted February 27, 2020 (edited) 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 February 27, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted February 27, 2020 Share Posted February 27, 2020 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. 1 Quote Link to comment Share on other sites More sharing options...
rbesca Posted February 27, 2020 Author Share Posted February 27, 2020 (edited) can't really say I'm super good with python but this is a great place to start learning more, thanks a lot for this Edited February 27, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
rbesca Posted March 3, 2020 Author Share Posted March 3, 2020 (edited) 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 March 3, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted March 3, 2020 Share Posted March 3, 2020 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 1 Quote Link to comment Share on other sites More sharing options...
rbesca Posted March 3, 2020 Author Share Posted March 3, 2020 (edited) 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 March 3, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted March 3, 2020 Share Posted March 3, 2020 Unlock the hda and copy channel reference the start/end frame to the ROPs/FBXSplit start/end frame. I forgot how slow of an export this method was. You will know when it is exporting. 1 Quote Link to comment Share on other sites More sharing options...
rbesca Posted March 3, 2020 Author Share Posted March 3, 2020 export is chugging along now Quote Link to comment Share on other sites More sharing options...
rbesca Posted March 3, 2020 Author Share Posted March 3, 2020 works perfectly, thanks so much! Do you mind if I share this on hdbp.io? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted March 4, 2020 Share Posted March 4, 2020 2 hours ago, rbesca said: works perfectly, thanks so much! Do you mind if I share this on hdbp.io? Preferably not. Thanks for thinking of it though. Quote Link to comment Share on other sites More sharing options...
rbesca Posted March 4, 2020 Author Share Posted March 4, 2020 (edited) 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 March 4, 2020 by rbesca Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted March 4, 2020 Share Posted March 4, 2020 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.