separating points into multiple files

   2752   2   0
User Avatar
Member
47 posts
Joined: May 2009
Offline
hi,

i want to split my points in sop context to multiple groups and store each group as a separate file.
my first try was with forEachSop. inside it i make a group of points, delete others and store the result with file node. this worked ok but it gets really slow when i have lots of points and many iterations on forEach.
on my foreach approach my main problem is the deleting of points before saving to file. lets say i have 200000 points and i want to split them in 20 files. i have to delete 190000 points to be able to save those 10000 points to file. and i have to repeat this twenty times. not very efficinet..
it would be nice to be able to save a point group to disk without needing to delete the rest of the points.

i was hoping to write a vexsop that would split the points in groups and store them with pcwrite function. but it seems that pcwrite doesnt work on sop context(even though houdini manual says it would).
is there some other way to write on file in vex? or maybe theres a function in HOM that i could use for writing to .pc/.bgeo file?
theres example source code for storing points in custom file format in HOM manual but i would need .bgeo or .pc cos i want to read the files in delayed read archive.

i posted this on odforce but maybe someone here has an idea..

thanks!
Kustaa
User Avatar
Member
257 posts
Joined: Nov. 2007
Offline
I don't know if Joe got around to publishing that splicer in the end, but that should be very useful:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=19382&highlight=particles [sidefx.com]
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
User Avatar
Member
47 posts
Joined: May 2009
Offline
looks pretty neat!
  • Quick Links