Saving points to a file
2832
10
0
jak0nil
Member
6 posts
Joined: July 2019
Offline
July 30, 2019 9:24 a.m.
Hello, I would like to know if there's a way to save points to a file with Houdini? Thank you
Andr
Member
900 posts
Joined: Feb. 2016
Offline
July 30, 2019 1:03 p.m.
Simplest way to do that is to right click on the node, save, geometry. You could also use a file sop node.
jak0nil
Member
6 posts
Joined: July 2019
Offline
July 31, 2019 4:55 a.m.
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?
Andr
Member
900 posts
Joined: Feb. 2016
Offline
July 31, 2019 5:25 a.m.
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)
jak0nil
Member
6 posts
Joined: July 2019
Offline
July 31, 2019 6:42 a.m.
Sorry, but I'm new to Houdini… How exactly do you get the node to create the file?
Andr
Member
900 posts
Joined: Feb. 2016
Offline
July 31, 2019 7:29 a.m.
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
jak0nil
Member
6 posts
Joined: July 2019
Offline
July 31, 2019 8:37 a.m.
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?
Andr
Member
900 posts
Joined: Feb. 2016
Offline
July 31, 2019 8:46 a.m.
mmhhh try to dirty and cook the geomettry import node before cooking the csvoutput
jak0nil
Member
6 posts
Joined: July 2019
Offline
July 31, 2019 9:15 a.m.
Same output…
Andr
Member
900 posts
Joined: Feb. 2016
Offline
July 31, 2019 9:44 a.m.
could you upload your scene file
jak0nil
Member
6 posts
Joined: July 2019
Offline
July 31, 2019 9:47 a.m.
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