Jump to content

Python numpy geometry question


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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..

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...