mnlrbr Posted March 8, 2018 Share Posted March 8, 2018 (edited) Hello everyone, I'm starting with Houdini and Python and I have a doubt which would influence my learning curve significantly. I'd like to know if someone has specific information about reaching the transformation matrix of particles in Houdini - preferably in Python. From the SideFx Python Documentation says it's not yet implemented. I also read somewhere here that it's possible through VOP/VEX. The objective is to make a particle export script from Houdini to Octane's CSV - to adapt Houdini to an existing workflow. This CSV file only has these particle's transform matrix. And it would have to be usable, for example, for 5 million particles. Does anyone has any tips? Or in alternative if someone has this script already, it would be great! I'm not a coder (MaxScript only) and it will take me ages to get it done... Thanks in advance! M Edited March 8, 2018 by mnlrbr Quote Link to comment Share on other sites More sharing options...
symek Posted March 8, 2018 Share Posted March 8, 2018 Houdini doesn't store particles (or points) transform matrix explicitly, so you don't need any special functionality for it. You can make it by your self from: position (P attribute) optional scale (pscale attribute) optional rotation (orient attribute) Perhaps the easiest way is to use Make Instance Transform VOP inside AttributeVOP. It will create nice 4x4 matrix for you given the above (and possibly other) attributes are provided... Export it to a point attribute called, say, 'xform' and use Python to save subset of this matrix to a file (google says Octane stores 12 out of 16 floats of 4x4 matrix). Super easy (there are more elegant but verbose ways too): xforms = hou.node("/obj/my_particles/OUT").geometry().pointAttribValues('xform') xform is now a tuple of 16 x #particles floats, which can be saved to a file suitable for Octane. hth, skk. Quote Link to comment Share on other sites More sharing options...
mnlrbr Posted March 9, 2018 Author Share Posted March 9, 2018 I'll start from here! I was watching python integration with houdini and it is in fact super easy (for an expert :P). This narrows a bit my first incursion in the hou module. Thanks! Best M Quote Link to comment Share on other sites More sharing options...
manx151089 Posted November 8, 2018 Share Posted November 8, 2018 Hi, I have an HDA that can help you do look at the video below and let me know if it works for you. Quote Link to comment Share on other sites More sharing options...
mnlrbr Posted November 8, 2018 Author Share Posted November 8, 2018 Hey manx151089, Thank you so much for the answer! This is super useful! What you are now showing is the answer for a single particle animation exporter, it's great! In fact you showed me how I can import a particle animation in OStandalone, Thanks! What did you use? Python? Does this work in 17? Can this be done in Apprentice? so many questions! Can you share your HDA? Best Manel Quote Link to comment Share on other sites More sharing options...
mnlrbr Posted November 8, 2018 Author Share Posted November 8, 2018 Now, I also found this, made in August 2018, but the scale factor is too small... https://www.orbolt.com/asset/FiftyPercentGray::csv_to_octane::2.0 Quote Link to comment Share on other sites More sharing options...
manx151089 Posted November 9, 2018 Share Posted November 9, 2018 (edited) The hda and also the codes are on GitHub link you'll find both of them in the video description. I used python for export and Vex to compile the matrix into the Octane readable matrix format. Let me know if it works. Cheers, Manish Edited November 9, 2018 by manx151089 Quote Link to comment Share on other sites More sharing options...
mnlrbr Posted November 9, 2018 Author Share Posted November 9, 2018 it works really good! thank you so much! 1 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.