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
  • 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 246 results

  1. Houdini Terrain Pipeline Vol 2

    Hey All! The first part of this tutorial has been available for almost a year now, but because of the sad news that hit CMI, I was unable to upload the 2nd "half" there. So instead I just made it available on Youtube for everyone, to make up for that I suppose. I'm considering putting the first part on there as well, if enough people want that. In this tutorial covers the following, using Houdini * Generating water meshes * Updating the terrain based on the water * Generate walking paths on the terrain * Create some basic instances * Build a flexible system using external files to place these instances. Built on Houdini 16.5, but should work on 16 too, or all the way back to H14 if you skip the heightfield part. Recommended specs: at least 16GB of RAM, reduce the terrain size if you have less. Disclaimer: Work files are as is, and do not contain the cached geometry to save on space, this may explain node errors on the various "File Cache" nodes. It does however also contain the work done in the first half of the tutorial, albeit mostly undocumented: https://tinyurl.com/y89egjvq Hopefully its of some use! Twan
  2. Hi guys, I need a bit of help from someone python knowledgeable and willing, with a custom shelf tool that when clicked or called via a hotkey does the following: creates two fuse SOP nodes from the current selection, the 1st one set on "snap" and the other on "consolidate". Other settings also modified, but unimportant right now. I'd do it myself, but this is way too simple for my guru level of python and I don't have the time Cheers!
  3. Hi, Can houdini pythyon can solve this: I have an object (rop network in obj) when is deleted I want to run a py script. Thanks in advance ! Sz
  4. Plus button for dynamically adding parameters

    I am currently creating a little HDRI studio inside COP land. The user should be enabled to freely add "light sources" (aka spots and rectangles on the image canvas). How can I integrate a plus button in my parameter field? How can I duplicate parameters with it? Here is a mockup: Instead of adding more and more nodes, I would like to fill up arrays holding all spot positions, light intensities etc.
  5. Hi, In a Filecache node I would like to add an other Rendering button after the factory default button. Can it be somehow ? G
  6. Using custom Python modules

    Hi Is anyone aware of any good beginners tutorials on using custom Python modules with Houdini? Have been trying now for days to get ytini http://www.ytini.com/getstarted.html working in Ubuntu, but whatever I try always end up getting 'module not found' when I do an >import yt in the Python shell.
  7. Hi, Recently I had to develop a method for Alembic Sequence files export from Houdini and Load Alembic Sequence files in Maya, I couldn’t find any solution for this problem at that time, so I decided to develop some Python script to do these tricks. Below you can find my tutorial and source files for abc sequence files Houdini to Maya. Hope you find this useful in your workflow. If you have any questions or anything feel free to replay here. Thanks, Mahesh MS. HELP_abc_sequence_files_Houdini_to_Maya.pdf abc_seq.zip
  8. Hi, Recently I had to develop a method for Alembic Sequence files export from Houdini and Load Alembic Sequence files in Maya, I couldn’t find any solution for this problem at that time, so I decided to develop some Python script to do these tricks. Below you can find my tutorial and source files for abc sequence files Houdini to Maya. Hope you find this useful in your workflow. If you have any questions or anything feel free to replay here. Thanks, Mahesh MS. HELP_abc_sequence_files_Houdini_to_Maya.pdf abc_seq.zip
  9. Hey there ! The situation is that I have a Python code (in a HDA, but in the test a simple python sop will do the trick) in which I tried to modify a certain geometry's attribute. The thing is - I can't have that geometry connected to the python sop (since the final result would be to integrate it all in an HDA). So ! I know we get a "GeometryPermissionError: Geometry is read-only." error when trying to do so with the Python node not connected to the geometry. But ! It is possible to manually modify a node's geometry attributes by locking the node (setHardLocked in python), and manually inputting the values we want in the geometry spreadsheet. The question is - can we do the same in Python ? Can we lock the geometry, and then "auto-manually" change the attributes in Python on that specific locked node ? Thanks !
  10. Batch render objects

    I am working on a script to render all OBJ-files from a folder separatly in the same scene. How can I make a python script wait for a render to finish, so it can then load the next OBJ file? (I am not looking for a frame-based solution.)
  11. Descriptive Parameter to Node

    Hi, I found a very useful thing in docs but seems like not working for me unfortunately. Can anyone help ? I tried to add a descriptive parm to a node ( the same as a digital asset has ): node.setUserData("descriptiveparm", "parm") THX! G
  12. Hi, In Houdini Python (or hscript ) can we simply extract a given subnet content ? THX! G
  13. Hello guys, I have some problems with PyQt in Houdini. The problems are: 1. How to get rid of the white border around the window? 2. The logo/image does not load. How to fix it? Thanks ------------ Qt Designer GUI preview GUI Problems 1. How to get rid of the white border around the window? 2. The logo/image does not load. How to fix it?
  14. Hi Everyone, I'm having trouble understanding the soho_outputmode 0 soho_pipecmd process. I have created a script for my custom renderer which works using soho_outputmode 1. After initializing soho, It will read and translate the scene correctly writing it as scene.xml using sys.stdout to write to the soho_diskfile. I can then render that scene successfully using my command "render scene.xml" from the terminal. Everything works as expected. I run into problems when switching to soho_outputmode 0 and setting the soho_pipecmd value to "render". When I hit the render to disk button, I see in the terminal that the render command is running but has the error that it hasn't been passed any file. I would like to know what exactly is being piped to the pipecmd and how to get the render command to see the stdout as a file. The documentation I've seen stops short of explaining this. Any help would be greatly appreciated!
  15. Houdini Easy Compile Blocks

    Hi Folks ! For Houdini optimization nerds I'd like to share "Houdini easy compile blocks". It's a simple script which creates for you the compile blocks + update the expressions to use spare inputs ( if needed ) around a for loop or a selection of nodes. Compiling a for-loop is now one click away Available for free here: http://cgtoolbox.com/houdini-easy-compile-block/. If you have issues with a loop compilation, feel free to send a small hip file if possible, to support@cgtoolbox.com, with the nodes you're trying to compile and I'll have a look ! https://vimeo.com/287152763
  16. Hi Houdini friends, I'm not sure if anyone had this before, I'm having this really weird issue where I specify a digital asset to show some info with its "Descriptive Parm" field, and I specified a parameter for it to read, say 'display_parm'. The result of evalParm('display_parm') shows the correct result, but the actual displayed info is different from this result. In this case it is a string containing 3 parts, the actual displayed part is missing the middle part. It is as if the actual displayed info is using another parm or something. And this is only happening to some of the test cases not all of them. Has anyone had similar issues before? Thank you so much! Best, Viola Lyu
  17. Hello! I try to add pre-render script in the Alembic ROP. My goal is to prevent the ROP to write the Alembic file if the user clicks on NO on some dialog box raised during the pre-script. What should I do to stop the ROP? How do I know in the post_render script that the ROP didn't render? Thanks
  18. Hi, I am looking for the ways to replicate in Houdini point instancing done in some other application. I will skip here the data importing part because it is clear in my situation how to do that with Python. Let's say I already have a Python dictionary with elements like 'name':'transform', where 'name' is the name of the object to be instanced and 'transform' is a list of 16 floats representing world transform matrix of that instance. I have figured out so far how to do it at the object level. Here is my Python code for that: # My existing dictionary containing pairs like 'name':'transform' my_dict = {'foo': '....', 'bar':'......', ......} # where each dictionary value is a list of 16 floats for key in my_dict.keys(): node = hou.node('/obj').createNode('null') node.setName(key) m4 = hou.Matrix4(1) m4.setTo(my_dict[key]) node.setParmTransform(m4) This gives me bunch of named nulls with the correct transforms. And I can parent my object under those nulls. But I need the same at the SOP level. I need a bunch of points with 'name', vector 'scale' and preferably quaternion 'orient' attributes which I can pipe into the the right input of the CopySOP for instancing. Any help on that would be much appreciated.
  19. Drag&Drop Contents

    The script implements the ability to drag files of geometry, caches, textures, images right into the viewport. This project was open-source, so I spread it for everyone. Can someone come in handy. Thank you for watching! Projects: https://github.com/alexwheezy/python/tree/master/houdini/drag_drop_files
  20. Houdini Python Tools

    You can see it here : https://gumroad.com/l/oIDpL
  21. Hi everyone, this is my first time writing tools with python, so maybe I got something completely wrong here. I want to built a HDA to setup the houdini scene by selecting project, sequence and shot number. For that I created a HDA with a ordered menu and a drop down listing all available projects. The menu is created by a python function in the python module and then called in the menu script area. I then have another ordered menu to select from all the available sequences based on the selected project. A callback script on the project drop down is triggering the create menu function for the sequence drop down. I then need to know the currently selected project in the project drop down. I tried getting this information with the node eval parm, but this is only kind of working. It returns the right token, but as an integer and multiple times for each menu item causing a long loop. I also tried using the menu parm template, but I cannot access the data correctly. What would be the best way to geht the menu label as a string for the currently selected item in the drop down menu? Thanks Here is some of the code I used: #ProjectMenuDropDown def projectMenu(): import os projectPath = 'H:/' projectList = os.listdir(projectPath) projectMenu=[] for i, item in enumerate(projectList): projectMenu.append(i) projectMenu.append(item) return projectMenu #Call function in menu script hou.pwd().hdaModule().projectMenu() #Callback function to trigger sequence menu in python module hou.phm().sequenceMenu(kwargs) #SequenceMenuDropDown #SequenceMenu def sequenceMenu(kwargs): import os node = kwargs['node'] projSelect = node.parm('project').eval()
  22. Hi novice Python user trying to get ytini (Houdini for Astronomy http://ytini.com) up and running on my Mac. Followed instructions, using miniconda and then installed the yt package. Confirmed that it is correctly installed. But from within Houdini's Python shell when I try and do an import yt I get a package not found error. I assume my pathing is wrong. The install directions here http://ytini.com/getstarted.html suggest modifying your .bash_profile which I've done after first making necessary changes. But the directions assume there is a yt-conda directory /Users/<userfoo>/yt-conda/bin and also a yt-conda/sbin directory /Users/<userfoo>/yt-conda/sbin but I have neither. Only the following /Users/<userfoo>/miniconda3/bin What changes should I make to my pathing to make Houdini recognize the yt package install? Thanks!
  23. Hi , I am building currently building an HDA with an important interface (lots of tabs and multiParm list inside multiParm list .. ) so I wanted to use python in "Menu Script" to list a string array stored in the detail attribute to populate on of my ordered menu, after I finally got it to work on a null to experiment then I tried to replace my previous ordered menu with manually typed string with the new one using python script and houdini crashes each time I try. What's weird is that I am able to read the channel and access the value with no problem outside the HDA. Does anyone knows why this is happening, am I missing something here ? Edit : It seems that when I try to return the string inside the HDA, it gives me -1, but even if I just print that value, houdini still crashes and why it return that value only inside the HDA ? Also when I enable "Use Menu Item Token as Value" I am able to return the corresponding ID of my selection without crash, but I want the string value of course. The python script I use : node = hou.pwd() geo = node.geometry() menu = [] data_list = geo.stringListAttribValue("data_list") for data in data_list: menu.append(data) menu.append(data) return menu
  24. Flipbook Tool?

    Hello hive mind! I'm looking for a better solution to saving out my flipbooks as .mp4s. Right now I have ffmpeg installed so I can go directly from mplay and save an .mp4, but I cannot figure out how to change the preset for the menu so that the default file name matches my naming convention. Which is really annoying. I'm looking for any of these solutions! 1) Does anyone know how to update this ffmpeg window with a custom string in the "Output File" field? 2) Does anyone know where mplay stores the tmp images, so I could grab them straight from there and go to ffmpeg from a shell? 3) Does anyone have a better solution for flipbooking? Thanks!
  25. Hi all, I'm creating a python panel tool with a web front end. I've successfully put a Qt WebEngineView in a Python panel, but when the panel is hidden and displayed again (ie switching tabs in Houdini UI) the main loop of WebEngineView seems to pause. Any animations stop and all mouse/keyboard interaction stops. If I resize the panel it will recover most of the time. I assume I have to call something on WebEngineView when then the python panel onActivateInterface() is called but I can't see anything obvious in the Qt docs http://doc.qt.io/qt-5/qml-qtwebengine-webengineview.html#WebAction-prop PS: I'm on Win 10. Anyone solved this before? TNKS! G