Jump to content

Search the Community

Showing results for tags 'python'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • 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

Found 349 results

  1. Houdini UI Python Library

    Hi, guys! Just wanted to share with you some of my experiments. huilib - is a simple Python wrapper around Houdini's native .ui language. It has been written "just for fun", so no warranty if it works for you, but I think it's pretty usable for a simple UI, in situations, when using PyQt is not an option Maybe someday we'll see something similar from SESI Feel free to use it. https://bitbucket.org/alexxbb/huilib/overview
  2. Hello, I'm having a problem with a setup I'm trying out and I'm hoping someone might have some ideas on what I can do? I'm creating this 'archway' that's made out of spinning blocks. The blocks are moving along the path of the archway. (At home right now, I'll put an explanatory pic up when I'm back at work tomorrow.) For this animation the archway is constantly changing it's shape. To acheive this whole look, I have about 6 nulls which I animate the positions of. Then -create a closed curve through all the nulls. -carve along the curve (this is what makes the cubes travel along the path) -resample the curve -sweep and skin a circle along the curve to create a tube -scatter points on the tube -copy boxes to all these points. This works reasonably except when the curve changes length and then the scatter sop ( or maybe the point numbering of the tube ) changes and all the boxes jump to different parts of the curve. I'm not sure what to do about this. My current idea is to try and keep the length of the curve constant. -Two of the nulls and the bottom part of the curve are off camera. I am thinking I could use a measure sop and a Python expression to iteratively reposition these two off-camera nulls to maintain a constant length. I've had a go, but my Python in Houdini is pretty beginner and I'm not having any luck yet. Any suggestions? Simeon.
  3. I'm trying to use python to parse $HIP and define variables in houdini. Each Variable Project_Code, Sequence, Shot, and Task can be indeterminant length, so I only really know by the / what each value means. Since I can only use set -g in hscript how would I set these variables? For instance version is based on hipname, but I need to do somethign like: hou.hscript('set -g PROJECTCODE' = `pythonexprs("hipSplit[1]")` ) Which doesn't work in context. $HIP = P:\projects\Project_Code\Sequence\Shot\Task\ -------------------------------------------------------------------- import hou path = hou.hscriptExpression('$HIP') hipSplit = path.rsplit('/')[1:] ## hipSplit example ['projects', 'Project_Code', 'Sequence', 'Shot', 'Task'] ## Sets houdini variable $PROJECTCODE ## PROJECTCODE = hipSplit[1] ## hipSplit[1] is Project_Code etc... ## Sets houdini variable $VERSION hou.hscript('set -g VERSION = `evals(substr($HIPNAME,0,evals(strlen($HIPNAME)-4)))`') ---------------------------------------------------------------------- Thanks -Ben
  4. Python Take List

    I want, with given the parent take name to get a list of all take children in Python? The Hscript command is: http://www.sidefx.co...ommands/takels but unfortunately python version is not yet implemented. What I want to do is easier for me in python. I could use hou.script("takels") but the result is not clean. example: (' 1\n 2\n 3\n 4\n 5\n 6\n', '') [/CODE] Let me explain what I am after. I am building a tool where I want the user to be able to have a parent take and then a list of children with different values on the tool. Then on the DA he will have to select the parent take and hit render. Pseudocode: [CODE] parent = "mainTake" children = hou.script("takels -p mainTake") for each children: create a geoRop and set take parameter end forloop. link all geoRops to a mergeRop [/CODE] Any idea how to do that? The most tricky part for me is how to get children takes in an array.
  5. Delete DOP object with python

    Hi, How can I delete DOP object with python? I couldn't find delete method in hou.DopObject yet. Thank you,
  6. Hi, I want mimic "constraint" and "apply relationship" nodes with python. But hou.DopObject.createSubData("Somename", data_type="SIM_Relationship") didn't work for me. I putted several other types but only default value "SIM_EmptyData" made it work. So, Relationship isn't a data? How can I attach it from python? Thank you
  7. i select some nodes on the network tab, and i do get a tuple, i can make it a list, and then sort them. but is not always the same depending on the way the node were selected. can i sort them base on node.name()
  8. Hi guys, i'm new to the forum and Houdini, and i'm currently diving into Mantra (once again ). And what i would like to achieve is basically a global material override.(For AmbOcc for example) What i tried so far: 1: Adding a shop_materialpath attr. to the subnetwork that is the toplevel node of my structure and overriding it on a take. (Much like Vray Object Property Sets in Maya for example, whose attributes ripple down on all members of the sets).....but that doesnt work i guess 2: Override the shop_materialpath on each geometry node which works fine and is much less a hustle than it sounds at first. But it still needs tweaking, once i add a new object to the scene. 3:PythonFiltering: Which seems like the way to go for me! From what ive read so far, the Houdini scene translation is written in Python and properties like shader assignments can be altered during the process. So i read the documentation and did the following: -Changed the mantra commandline to: mantra -P pythToMyScript/script.py -In wrote the following script: def filterInstance(): print('Filtering: {0}'.format(mantra.property('object:name'))) mantra.setproperty('object:surface', '/obj/shop_net/constant_green_mt') mantra.setproperty('object:overridedetail', 1) print('Im just an a output to confirm i have been called!')[/CODE] -The script is actually called and i get the correct output in the console like so: [CODE]Filtering: ['/obj/enzo_geo_grp/glassRubberGrp/black_behind_window_thing3'] Im just an a output to confirm i have been called![/CODE] -But the last line states an error: [CODE] mantra: VEX error: Unable to load file /obj/shop_net/constant_green_mt.vex Rendering Finished[/CODE] -I added the declare_all_shops parameter to the mantra rop and set it to "Declare all shops" , also i checked on Force VEX Shader embedding -Both materials are just ordinary constant mtls. i dragged into my own SHOP network in /obj/shop_net/. Any ideas on what i am doing wrong here? Thx
  9. Hi everybody, Can anybody point me to a way of getting text highlighting of the hou module while using emacs as an external text editor? Thank you!!!
  10. I'm familiar with python but new to python scripting in houdini. I'm wondering if it is possible to use a built in SOP like CurveSect inside a custom python sop? I'd imagine that should 'just' be a function call somewhere? Thanks Waldo
  11. some geometry tools

    Hello my friends! i made some geometry tools using python. i hope you all enjoy. https://vimeo.com/72528469 critique, comment and suggestion are very appreciated! thanks!
  12. tile index

    Hi, does anybody know how to change the tile index without recreating an Ifd? Is there any commandline arguments or python filtering for mantra? Thanks nap
  13. Hi there, has python more or less replaced hscript? I know some things are easier to do with one or the other, So I guess I'm just asking where people are mostly using what? In the docs, it states "HOM replaces the functionality of Houdini's previous scripting solutions, the expression language and HScript." is this true? I mostly find hscript in sample scenes I download from odforce. Sorry if this is a silly question, but I'm still green to all this Thanks!
  14. I am trying to create AI behaviour in the sop solver. I am able to update behaviours by using the prev frame data without any trouble. The problem is for one particular behaviour I need to save the position of certain points across a frame range, and use this data to drive the other points in the simulation. The solutions I could think of were: I tried using a pop network outside of the sop solver to birth new particles and access these points back in the sop solver. But the solver errors out if i connect the data from the pop network into the solver tree. I guess this is because i am making new points outside of the solver. I also tried to create new points using python and the `add` sop. this is terribly slow and almost brings the whole thing to a stop. The most obvious solution seemed to be to create a list attribute in python and save the data into it. But if i do this in the sop solver then the data gets overwritten per frame. Is there some way to create an attribute that could store an array or list of position data across frames. From the documentation i understand that only floats, int and vectors can be used as attributes. I could just append the new position data to this list per frame and access it later in the tree. Thanks ---------------------------------------------------------------------------- www.vimeo.com/tusk3d
  15. Toonbox Entertainment is seeking the following TD positions: Pipeline / Generalist TD Show TD Generalist Programmer VFX TD Pipeline / Generalist TD A Technical Director (TD) provides critical support to a production's artists, team leads and supervisors. A TD will design, develop, implement and maintain new tools and processes for a particular project or department. As well, during production a TD will troubleshoot and resolve technical issues as needed to keep production moving forward. Additionally, a TD may be tasked with shot production work when needed and where the shot work appropriately matches the skill set of the TD. Show TD A Show TD provides critical support to a production's artists, team leads and supervisors. A Show TD will support and help maintain new tools and processes for a particular project. During production, a show TD will troubleshoot and resolve technical issues to keep production moving forward. Additionally, a Show TD may be tasked with shot production work when needed and where the shot work appropriately matches the skill set of the TD. VFX TD The VFX Developer is responsible for creating new, powerful tools or augmenting existing ones with innovative features that allow other studio artists or developers – whether fellow VFX crew, TD staff, technical animators, lighters or anyone else – to execute CG visual effects that support the styles and narratives of the stereoscopic films currently in production. Collaboration with all other crew members during design, development and production duties is critical. The collective goal is to generate exciting visuals using powerful and efficient tools and workflows. Requirements: · Experience working with and building tools for Maya, Houdini or any other production modeling, animation or effects software; also, exposure to Yeti or another fur and hair system is a plus. · Strong programming skills, including proficiency in Python, PyQt, MEL, and Linux shell scripting; C++ or C are a plus. · Production experience in computer animation, visual effects or game development. · Strong R&D experience in artist tool development and toolset integration within existing or new pipelines; a proficiency in mathematics is a definite asset. · Experience with Nuke, Fusion or other compositing software. · Experience with Renderman, 3Delight or other Renderman compliant renderers. · Experience with Tractor, Deadline, Qube or other render farm management software. · Experience with software version control systems like Mercurial, SVN, Git or other similar structures. · Ability to establish priorities, work independently or within a group, and work with minimal supervision. · Exceptional communication skills in dealing with both technical and artistic groups and individuals. · Exceptional trouble-shooting and problem solving skills. Education: · B.S. or M.S. in Computer Science, Engineering (or equivalent) is preferred. Other Desired Skills: · A strong combined technical and creative background with in-depth knowledge of current 2D and 3D computer graphics techniques as they are used in the feature film and media production industries. · A professional history of collaboration on projects with teams of varied sizes and disciplines. · RI filtering experience with Renderman compliant renderers. · UI development experience with PyQt or wxPython.
  16. My python Code Not working

    Hi guys i'm newcomer in Houdini, my simple code not working and don't show error in Houdini console! i changed the Tag Name to "osk" from "osm" but i don\t see error 'Bad file type' in console. import xml.dom.minidom document=""" <osk version="0.6" generator="CGImap 0.1.0" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/"> <bounds minlat="40.7432000" minlon="-73.9897000" maxlat="40.8052000" maxlon="-73.9304000"/> <node id="1420631950" lat="40.7711745" lon="-73.9792204" user="Aaron Lidman" uid="53073" visible="true" version="2" changeset="15468871" timestamp="2013-03-23T17:11:31Z"/> <node id="1420631974" lat="40.7716867" lon="-73.9779803" user="Aaron Lidman" uid="53073" visible="true" version="2" changeset="15468871" timestamp="2013-03-23T17:11:31Z"/> <node id="1420631985" lat="40.7694268" lon="-73.9788969" user="dchiles" uid="153669" visible="true" version="1" changeset="9189979" timestamp="2011-09-02T04:12:03Z"/> </osk> """ map = xml.dom.minidom.parseString(document) if (map.documentElement.tagName != "osm"); print('Bad File Type') return [/CODE] Thanks
  17. Is it possible to create a python operator type which is a Geometry object operator ?
  18. Hey, i got a little problem. The code autocompletion (Ctrl+Tab) in the source editor/shelf-tool-script-editor doesn't work for me. Anyone know how to fix this? btw. in the python shell everythings works as expected. Thanks
  19. Python Helixes

    This SOP written entirely in python creates helixes from the geometrical points. >It calculates the center of the geo and each helix is created in the direction of a Vector from the center to the point. >It works even if the geometry is translated and rotated by pre-transforming and post-transforming it. >It provides controls for controlling the shape length etc of the helixes. >It creates point attributes "tangentx" "tangenty" "tangentz" which are the components of a normalized vector tangential to the helixes at every point.These can be used to add tangentail normals using point sop. >It creates point attributes "init_x" "init_y" "init_z" which are the co-ordinates of the birth point of every helix.These can be used to group them. Feedback please Helixes_from_geo.otl
  20. Is there any existing functions for extracting the final Transformation matrix that used for a copy or an instance. I am aware of the rules that create it : http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=6679 but are there any existing python functions (or easy methods) that allow you to extract this transformation matrix from a hou.Point() Object ? Thanks in advance,
  21. A few days back I stumbled on a Minecraft renderer that took a long time to calculate, but could generate some nice pictures from Minecraft maps. I thought that I could cut down the rendertimes by importing them into Houdini and could also work on my Python skills in Houdini at the same time. There are some realy nice projects out there that could use a better render engine than provided in-game, or the slow one I found. I've got the basics working, Houdini can now import the chunks, create the geometry and texture the blocks. The chunks are quite big (16x16x256 blocks) so I've build in some options to skip some chunks. The main problem that I'm facing right now is speed. The pieces in the pictures below are already 3.3 milion poly's, so I need to find a way to cleverly cull the poly's you won't ever see. If you guys have some tips on this, please share them Another problem is the texture filtering, is there an option to just keep the harsh edges in the textures that are in the game (Instead of filtering/blurring them). Next up is entity support, and different geometry types that one can find in the game. Let me know what you guys think.
  22. Sorry, I am new to Houdini scripting What I want to do is to make a script that can animate a character. I would like to control the center of the character while fixing the foot on the ground with IK. How can I do that ? Thanks. Shihui
  23. Pyton Optimization

    Hi All, I was just writing a bit of python code that goes through an object and creates a dictionary of attributes and vertex indices. It works fine for small meshes(under 100k Points, but as you get bigger it inevitably gets slower. I've tracked the majority of the slowness to a couple of lines that is run many times (per vertex) attribStack[name].append(v.point().attribValue(attr)) indexStack[name].append(v.point().number()) I think this is because of how HOM is accessing the info (or better, how I am accessing the info through HOM) here is the code block : attribStack = {} indexStack = {} for attr in myGeo.pointAttribs(): if attr is not None: name = attr.name() attribStack[name] = [] indexStack[name] = [] attribStack[name].append(str(attr.dataType())+str(attr.size())) indexStack[name].append(str(attr.dataType())+str(attr.size())) for prim in myGeo.iterPrims(): for vid in xrange(prim.numVertices()): # get vertex v = prim.vertex(vid) attribStack[name].append(v.point().attribValue(attr)) indexStack[name].append(v.point().number())[/CODE] The basic things that I need to happen are : Create a list of values for each attrib Create a point index on the vertices (for shared data) Any thoughts on other ways to optimize this bit of code. perhaps I'm missing the obvious answer.
  24. I want changing defaults when I click some shelf icons. python's parameter object has reverting default method, but hasn't set default method. hscript side, I don't know where to dig. please, help.