Jump to content

Particle Exporter for Octane CSV

Recommended Posts

Posted (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!


Edited by mnlrbr

Share this post

Link to post
Share on other sites

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.




Share this post

Link to post
Share on other sites

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.




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now