Jump to content

Easiest Way To Write Geometry To A File


Recommended Posts

I have a hscript that writes some geometry and its attributes out to a XML(ish) file but its really slow so I was wondering what's the simplest way to do this using the HDK. Is it to create a my own output driver or is there a simpler way? I'm a complete noob when it comes to the HDK.

Edited by vfx-ger
Link to comment
Share on other sites

The easiest way is probably to write an output driver. You could also write your own geometry converter but you'll need to build it as a standalone HDK utility (which means full license checkout).

I tried writing an output driver in older versions of Houdini, and it proved extremely difficult for me given my lack of understanding of the HDK, and I never finished it.

What I ended up doing was writing all my geometry out to geos, then writing a standalone converter for the geo format. Doing it this way you can avoid using the HDK all together. It was suprisingly easy to do. I wrote one version in Perl, one in C++ and one in C#. The C# version was by far the easiest and probbaly the quickest version, because it has a bunch of nice methods built in for sorting and searching data, regular expressions, as well as generics which I found very useful. For the C++ version I had to rely on STL and the Boost libraries for certain things, which made things a bit more difficult. The perl version was the slowest, add to that I just don't like perl.

When you do move to 9, you can easily put something together using python and HOM. I have a working exporter that writes geoemtry and some additional scene information from Houdini directly to a couple different formats encapsulated in an HDA for Houdini 9. It was really easy to create and it's very fast.

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...