Jump to content

Recommended Posts

Posted (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 by Bakiki

Share this post


Link to post
Share on other sites
Posted (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 by StepbyStepVFX

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×