Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Posts posted by asnowcappedromance

  1. Hey man, 

    Have a look at this code on how to resize a network box in Python:

    if hou.selectedNodes():
        sel = hou.selectedNodes()[0]
        pos = sel.position()
        parent = sel.parent()
        box = parent.createNetworkBox()
        box.setColor(hou.Color(0.5, 0.2, 0.5))
        bbox = hou.BoundingRect(pos[0] - 4, pos[1] - 1, pos[0] + 5, pos[1] + 1)


  2. Hey what's up guys,

    Only 1 week left to sign up for my fast-track Houdini workshop "Introduction to FX using Houdini". Limited student capacity!
    Over the course of 9 weeks and 33+ hours of tutorial content students learn how to do procedural modeling, particle-, RBD-, pyro-, FLIP- and whitewater simulations.
    On top of that we're going to talk about lighting, shading, rendering and we're going to dive deep into VEX scripting.

    I would love to answer any questions that you might have!!!



    Find the complete course syllabus here:

    Also for more detailed information on the workshop, check out an interview that was done on 80.lv recently:

    Here's a quick teaser:



  3. Hey man,

    I did it exactly how Atom described it up top. I downloaded several animation clips from Mixamo as FBX and then used timeshift SOPs and the Blendshape SOP in order to blend the animation clips. Pretty easy!
    Just try to replicate what Atom did, that should work for sure!



    • Thanks 1

  4. woooow 5 days and not a single reply, what's up Odforce?

    Turns out all I had to do was to transform the point gradient attribute from world to camera space and use the PBR Metallic instead of the PBR reflect. Works really well.
    Would love to know what's wrong with the PBR Reflect though, why isn't that working as expected? It does if I'm using volumes and a vector3 gradient field ...

    Thanks to Andrea Sbabo for the tip to use PBR metallic!

    • Like 2

  5. Hey guys,

    I'm trying to render points as volumes using the uniform volume shader with specularity/reflection.
    I calculated a gradient attribute on my points (to emulate normals) and plugged that into my shader, but I'm having no success as all.
    The same technique works if I convert my points to a volume and then use a gradient vector field, however I'd like to get it to work without having to convert my points into a volume.

    Attached a screenshot of my current shader and also a hip file.

    Any ideas how to get that to work?





  6. Hey man, 

    Thanks a lot for the detailed screenshot, I'll have a play first thing tomorrow!
    Kinda off topic, how are you liking those Ryzens? Better than Xeon or I7?




    I rebuilt your setup and it works like a charm, thanks a lot for pointing me towards the right direction!!

    • Like 1

  7. Hey what's up guys?

    I discovered this amazing website https://www.mixamo.com/ where you can download free animated characters as .fbx files.
    Because the animations clips in Mixamo are pretty short, I'd like to combine several animations in order to get a longer sequence, but I have no idea how to approach this.

    The FBX comes in with a bone hierarchy, as well as a Geometry OBJ which contains a locked file SOP connected to a locked Bone Capture SOP, which is then connected to a Capture Override SOP which again is connected to a Bone Deform SOP.
    I assume that this is pretty standard.
    So if I now import a second animation, I get a new OBJ containing the same Bone OBJ hierarchy but with a different animation.
    What is the approach to blend the 2 different animations together? And how would I offset such an animation? In CHOPs?

    Again, this is not my comfort zone in Houdini, I'd appreciate some pointers on how to get this done!



  8. Hi guys,


    I'm trying to assign a hotkey to the tool section of a script OTL and can't get it to work.

    Script is located in 'Type properties > Tools'.


    parameters on the Options Tab are defaults:




    Then I go to the Hotkeys tab, hit 'Edit' (Global), then the Hotkey Manager pops up and the 'Action' column is selecting 'HDA_LABEL' by default. Now when I assing a hotkey to this, I'm getting the following error pop-up on execution of the hotkey:

    'Cannot find the tool $HDA_DEFAULT_TOOL.'


    Does anybody know how to fix this / what's going on?

    Thanks a lot,



  9. Ugh, are you hinting that there is no copy/paste clipboard on Linux by default?

    No :) Of course Linux does have copy/paste :)

    What I wanted to do is store strings that are created by Python into the clipboard, that's not possible without using modules in Python.

    Using PySide/PyQt, not only can you store strings, you can also store images as well as Mime data, which can be quite helpful!

  10. Here's an interesting snippet I came up with the other day.

    If you want to copy/paste stuff with Python, but you're working on Linux and 'xsel' is not installed on your system,

    you can abuse PySide to access the clipboard.

    Following code takes the path of a selected node and copies it into the clipboard, so you can paste it with ctrl-v:

    if hou.selectedNodes():
        import PySide.QtGui as qtg
        app = qtg.QApplication.instance()
        clipboard = app.clipboard()
        string = hou.selectedNodes()[0].path()
    • Like 1

  11. Hi guys,


    This has boggled my mind for a while now. I have a OTL that has a tool script attached to it (Type Properties > Tool section), that evokes a PySide interface. The problem is that when I run the tool a few times, every single time a new instance of the interface is being opened, while the old one is still alive. So I'm ending up with lots of open windows of the same tool after a while which is super annoying.

    How can I prevent this from happening?

    I want to have only one single instance running at a time, basically close the old window if the tool is run again.


    Here's a really simple example that we could use as a test case. (Same problem if I run it as a shelf tool)

    from PySide import QtGui, QtCore
    class Window(QtGui.QWidget):
        """Simple Test"""
        def __init__(self):
            super(Window, self).__init__()
            self.setGeometry(50, 50, 500, 300)
        def home(self):
            btn = QtGui.QPushButton("Test Button")
            a_label = QtGui.QLabel("Test Label")
            qvbox = QtGui.QVBoxLayout()
        def run(self):
    main = Window()

    Some where I read that using the QEventLoop might help to detect running instances with hou.ui.eventLoopCallbacks(),

    but after trying some stuff for a few hours, I'm at my wits end.

    Help here would be much appreciated :)



  12. No problem.

    Go to a houdini shelf, right click and click "new tool". Give your new tool a name, i.e. colorLab. Paste the following code in the script section:

    import os
    #Add dynamic path to houdini home folder
    BASE_PATH = hou.hscriptExpression("$HOME").replace("/", "\\")
    PY_PATH = "".join([BASE_PATH,"\houdini14.0",

    If you're using Houdini 15, change the 14 to 15 in the above code.

    Then go to your Documents/houdini folder and create a 'scripts' folder. Place the following files in that scripts folder:





    That's it :)

    You can add an icon too if you want. (Options tab of the shelf tool)

    • Like 1

  13. How am I supposed to use the setLabel in the ParmTemplate? I`m bit confused how this should be done http://www.sidefx.com/docs/houdini14.0/hom/hou/ParmTemplate#setLabel

    I suppose I have to use the ParmTemplateGroup? for the edits? Hmmmm

    >>> n = hou.node('/obj/geo2/null2')
    >>> ptg = n.parmTemplateGroup()
    >>> for i in ptg.entries():
    ...     print i
    <hou.ToggleParmTemplate name='copyinput' label='Copy Input' default_value=True>
    <hou.ToggleParmTemplate name='cacheinput' label='Cache Input' default_value=False>
    <hou.FolderParmTemplate name='folder0' label='Folder Name' folder_type=MultiparmBlock>
    >>> ptg.find("folder0")
    <hou.FolderParmTemplate name='folder0' label='Folder Name' folder_type=MultiparmBlock>
    >>> f = ptg.find("folder0")
    >>> f.parmTemplates()[0]
    <hou.FloatParmTemplate name='parm#' label='Label' length=1 naming_scheme=Base1 look=Regular default_value=(0,)>
    >>> me = f.parmTemplates()[0]
    >>> me.setName("newTest#")
    >>> me
    <hou.FloatParmTemplate name='newTest#' label='Label' length=1 naming_scheme=Base1 look=Regular default_value=(0,)>
    >>> f.setParmTemplates((me,))
    >>> ptg.replace("folder0", f)
    >>> n.setParmTemplateGroup(ptg)

    In order to change the name of the parm using Python, you'll have to use parmTemplates. This is a way to do it.

    For some reason, a Multiparmblock can't be found via parmTemplateGroup().findFolder(), but you can access it with just find().

  14. I'm not sure you'll be able to use QStyle this way, better try to do this: QWidget.setStyleSheet(hou.ui.qtStyleSheet())

    Hi Alexey,

    Thanks for the reply. The problem is that I think by default QWidgets in PySide Houdini already use the hou.ui.qtStyleSheet() because when I apply this in Houdini 15 to my QWidget, the look doesn't change either, there is no difference at all to the jpg that I posted before. Is your GUI look changing when you set the Style Sheet like that?

    Setting it to something like 'setStyleSheet("background-color: #00FF00; color: #FFFFFF")' makes a big difference on the other hand.


  15. so I ran into another PySide problem ... Maybe one of you can enlighten me on what I'm doing wrong with this one?

    I'm trying to use the QtGui.setStyle() function in order to change the style of my GUI.

    Turns out, no matter what preset I use, it all looks the same. (Using Windows7).

    (Attached a screenshot)


    Here's the code I'm running in a shelf tool:

    from PySide import QtGui, QtCore
    class Window(QtGui.QWidget):
        """A setStyle() test"""
        def __init__(self):
            super(Window, self).__init__()
            self.setGeometry(50, 50, 500, 300)
            self.setWindowTitle("PyQT tuts!")        
        def customHandler(self,  ErrorType, ErrorContext ):
            #print "Type:", ErrorType
            #print "error:", type(ErrorContext)
        def home(self):
            btn = QtGui.QPushButton("Test Button")
            styleChoice = QtGui.QLabel("Windows Vista")
            comboBox = QtGui.QComboBox()
            comboBox.activated.connect(lambda: self.style_choice(comboBox, styleChoice))
            qvbox = QtGui.QVBoxLayout()
        def style_choice(self, comboBox, widget):
            cur_str = comboBox.currentText()
        def run(self):
    main = Window()

    Thanks a bunch!