Jump to content

Search the Community

Showing results for tags 'numpy'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering + Solaris!
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Name


Location


Interests

Found 4 results

  1. Hi everyone ! I'm trying to export the density data in primitive intrinsic:voxelId out of houdini. In numpy which would be very convenient for me. At best i was able to get 1 frame or manually get all my frames as below. import pickle node = hou.pwd() geo = node.geometry() volume = geo.prims()[0] densityVox = volume.allVoxels() f = hou.intFrame() pickle.dump(densityVox, open(filepath + str(f) + ".pkl" , "wb")) My question is pretty simple, is there a way to automatically make a list of those values with all frames(1 to 72 for exemples) and then export it. This would allow me at some point to automate different sims and export them. Thanks in advance for any help !
  2. 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
  3. It looks like it's possible to set point attributes all at once instead of looping through them one at a time. I was trying to do it with NumPy, but can't quite get it right. Seems to be problem with the custom attribute being an array. Given an array with the same shape,i.e., number of points x array size it looks like it should work, but doesn't. Incidentally, the NumPy array will contain data from a file. I can't tell there's a better way to pull file data straight into something like VEX, hence the NumPy array. Here's my test code: node = hou.pwd() g = node.geometry() pt0 = [1.0, 0.0, 0.0] point = g.createPoint() point.setPosition(pt0) pt_1 = [0.5, 0.5, -1.0] point_2 = g.createPoint() point_2.setPosition(pt_1) pt_2 = [1.5, -2.5, 0.0] point_3 = g.createPoint() point_3.setPosition(pt_2) g.addArrayAttrib(hou.attribType.Point, "MyFloats", hou.attribData.Float, 8) gp = g.points() # This works fine ''' gb0 = (0.5, 0.3, 0.1, 0.1, 0.6, 0.2, 0.3, 0.8) gp[0].setAttribValue("MyFloats", gb0) gb1 = (0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1) gp[1].setAttribValue("MyFloats", gb1) gb2 = (0.7, 0.6, 0.1, 0.5, 0.1, 0.2, 0.8, 0.9) gp[2].setAttribValue("MyFloats", gb2) ''' import numpy as np y = np.arange(24, dtype=np.float32).reshape(3,8) g.setPointFloatAttribValues("MyFloats", y) # error print g.pointFloatAttribValues("MyFloats") # error
  4. On the SideFX forums I have added some information/videos & software on how to accelerate Python with Houdini in Windows & Linux: A custom node/plugin which speeds up execution of Python nodes in SOP-Context by a factor of up to 2 in certain conditions (e.g. Deformer, Attribute manipulation): Custom Python node for SOP context Using Numba (Python JIT-Compiler) in Houdini (Windows & Linux): How to use Numba with Houdini An optimzed/accelerated Numpy Python module (with OpenBLAS) for Houdini on Windows: Optimized Numpy python module for Houdini Hope it helps some people when using Python with Houdini. Any feedback welcome. Cheers
×
×
  • Create New...