Bakiki Posted June 7, 2018 Share Posted June 7, 2018 (edited) Hi How do I save out all geometry information to a python numpy .npy file. I'm dabbling with a neural network that takes in a bunch of objs and spits out its so called interpretation..... But as yet I am working with just the points and not the vertices and prim information. How could I save all this information to an array so I could then reload the array back into houdini for houdini to display prims/vertices etc...... Thanks for your help Edited June 7, 2018 by Bakiki Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted June 7, 2018 Share Posted June 7, 2018 (edited) 4 hours ago, Bakiki said: Hi How do I save out all geometry information to a python numpy .npy file. I'm dabbling with a neural network that takes in a bunch of objs and spits out its so called interpretation..... But as yet I am working with just the points and not the vertices and prim information. How could I save all this information to an array so I could then reload the array back into houdini for houdini to display prims/vertices etc...... Thanks for your help I am not an expert but I would store info in different .txt files : a first one with all the points and their coordinates (each line with the point number, 3 coordinates, separeted by coma or else), a second one where lines contains prim number and its vertices numbers, and finally a third one with the coresspondance between vertices and points number. Then, using dictionnaries, you could rebuild the points, and recreates the primitives using hou.Geometry creation methods. http://www.sidefx.com/docs/houdini/hom/hou/Geometry.html Hope that helps Edited June 7, 2018 by StepbyStepVFX Quote Link to comment Share on other sites More sharing options...
Bakiki Posted June 8, 2018 Author Share Posted June 8, 2018 Yes your suggestion sound logically but I was hoping to see some example code. I found code that represents a geometry construction but I would like to see one that deconstructs geometry into arrays... I will keep searching. Many thanks for your suggestion.. Quote Link to comment Share on other sites More sharing options...
Bakiki Posted June 8, 2018 Author Share Posted June 8, 2018 I found a solution here Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.