Saving points to a file

   2832   10   0
User Avatar
Member
6 posts
Joined: July 2019
Offline
Hello,

I would like to know if there's a way to save points to a file with Houdini?

Thank you
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
Simplest way to do that is to right click on the node, save, geometry. You could also use a file sop node.
User Avatar
Member
6 posts
Joined: July 2019
Offline
Yeah but my goal is to export the coordinates of all points to a file (text or json or whatever…). Is it possible in a simple way or through a script?
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
ah, it was not clear.


One way is to use csvoutput TOP node, see example file
I guess there are other ways too, without using pdg tech..

Attachments:
coordsCsv.hiplc (101.6 KB)

User Avatar
Member
6 posts
Joined: July 2019
Offline
Sorry, but I'm new to Houdini… How exactly do you get the node to create the file?
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
dive into the topnet, select csvoutput node, set the filepath and right click on the node, ‘dirty and cook’ selected node

the example file is already setup to write to csv the point positions of the grid object input of the topnet
User Avatar
Member
6 posts
Joined: July 2019
Offline
So, I've managed to extract the points of the grid from your example. But, my main goal is to exctract coordinates from a scatter into a file. When I hook the scatter node to the topnet, I get a file that has as many lines as my points but nothing written… Do you know how to fix that?
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
mmhhh try to dirty and cook the geomettry import node before cooking the csvoutput
User Avatar
Member
6 posts
Joined: July 2019
Offline
Same output…
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
could you upload your scene file
User Avatar
Member
6 posts
Joined: July 2019
Offline
Sorry, my bad… I figured out that i hadn't put the attribute to export in csvoutput…

I managed to get my points and it looks right so thank's a lot!!
Edited by jak0nil - July 31, 2019 10:08:05
  • Quick Links