Forums

Everything posted by asnowcappedromance

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!
Cheers,
Manu

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!
Thanks,
Manu

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!

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?
Thanks,
Manu
uniform_volume_spec_test.hiplc

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?
Cheers!!!
Edit:
I rebuilt your setup and it works like a charm, thanks a lot for pointing me towards the right direction!!

Haven't posted my work here in a long time, but here's a hip file in which I used Python to implement
the divide and conquer closest pair of points algorithm. Obviously not nearly as fast as a pcopen lookup,
but I wanted to learn about the divide and conquer paradigm and had a lot of fun figuring it out!
Code runs in O(n*log(n)) time, as explained in the following video:
Enjoy! Comments are always welcome
And no, I don't script in C++, no need to tell me that it's faster
divide_conquer_find_closest.hipnc

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:
Name - $HDA_DEFAULT_TOOL
LABEL - $HDA_LABEL
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,
Manu

asnowcappedromance replied to asnowcappedromance's topic in Finished Work

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!

asnowcappedromance replied to asnowcappedromance's topic in Finished Work

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()
clipboard.setText(string)

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)
self.setWindowTitle("test")
self.home()
def home(self):
btn = QtGui.QPushButton("Test Button")
a_label = QtGui.QLabel("Test Label")
qvbox = QtGui.QVBoxLayout()
qvbox.addWidget(btn)
qvbox.addWidget(a_label)
qvbox.insertStretch(2)
self.setLayout(qvbox)
def run(self):
self.show()
main = Window()
main.run()
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
Thanks!!!

asnowcappedromance replied to asnowcappedromance's topic in Finished Work

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",
"\scripts\ColorLab_v1.0.py"])
execfile(PY_PATH)
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:
color_config.json
ColorLab_v1.0.py
OnCreated.py
That's it
You can add an icon too if you want. (Options tab of the shelf tool)

All you have to do is open the Edit Parameter Interface, select the parameter inside your Multiparm Block and rename the label with a '#' suffix, which will result in appending a number starting from 1 to your parm labels.
Cheers,
Manu

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.
Cheers!

asnowcappedromance replied to asnowcappedromance's topic in Finished Work

Hi guys,
Thanks for the feedback and glad you like it.
I didn't use qtdesigner on purpose since I wanted to learn Pyside from scratch, as it helped me a lot to understand how it works.
It's awesome that the tool works on Mac, too. As for linux, I tested the tool at work yesterday and it turns out I had to change the following:
#Add dynamic path to houdini home folder
BASE_PATH = hou.hscriptExpression("$HOME").replace("/", "\\")
JSON_PATH = os.path.normpath("".join([BASE_PATH,"\houdini14.0",
"\scripts\color_config.json"]))
#Add dynamic path to houdini home folder
BASE_PATH = hou.hscriptExpression("$HOME")
JSON_PATH = os.path.normpath("".join([BASE_PATH,"/houdini14.0",
"/scripts/color_config.json"]))
One major issue that I ran into (and I'd be interested if somebody found a fix for this) is that the drag & drop ONLY works if I have a python panel open (not to be confused with the Python shell) and if I drag the node over this panel and then onto my tool. That's quite strange and I haven't found a foolproof way to do this yet. Suggestions are most welcome!
Paul - See you soon in Vancouver!

asnowcappedromance replied to asnowcappedromance's topic in Finished Work

I wanted to share my new project with the community, it's called the 'Node Color Laboratory'.
Intended to be used as a shelf tool, this tool has been written in Python and PySide.
I've seen a bunch of people using various ways to enforce color coding, however none of the approaches was using an interface,
so I decided to build one to make organizing colors most intuitive.
Here's the link to the vimeo file:
Attached are the files you're going to need to run the tool, to be placed in the $HOME/houdini14.0/scripts folder.
You will have to create a new shelf tool and paste the script found in the 'ColorLab_v1.0.py' file in there.
This tool has been developed in Windows, I haven't had a chance yet to check if the same directory structures work in Linux/Max.
Feedback always appreciated,
cheers!
colorLab.rar

Good stuff Alexey!
Starting to get a lot of things to work now with Pyside!
Another issue I had was that I wasn't able to resize my fonts when running Pyside in Houdini/
Consider the following test:
import PySide.QtGui as qtg
import PySide.QtCore as qtc
class myClassTest(qtg.QWidget):
"""A test class for a widget"""
def __init__(self):
app = qtg.QApplication.instance()
cursor_pos = qtg.QCursor().pos()
parent = app.topLevelAt(cursor_pos)
qtg.QWidget.__init__(self, parent)
self.setMinimumSize(500,500)
self.setWindowTitle("this is a test")
self.setWindowFlags(qtc.Qt.Window)
self.header = qtg.QLabel("Hello World what's up:", self)
self.header.move(10, 10)
self.header.setFont( qtg.QFont( "Georgia", 140) )
def run(self):
self.show()
test =myClassTest()
test.run()
Any idea why the text is still displayed super small? No matter which value I put in there, the size always stays the same.
Does this have anything to do with the Global Ui Size in the Houdini preferences?
Thanks for you help!

asnowcappedromance replied to asnowcappedromance's topic in Finished Work

Thanks guys!
I actually didn't bother to try this in VEX since I would use a point cloud lookup for this anyway, limiting the search to only 2 points. The speed is hard to beat,
since point clouds in Houdini are highly optimized. I did this in Python because I wanted to learn the concept of divide and conquer, which you then can apply to any programming language really!
Since VEX has arrays, this would be totally doable, why don't you give it a go?