Thanks for weighing in. It's probably best to initialize the callbacks on created yes. But the time it takes to update this is nil so I'm ok with that.
The issue is that current_node won't be available once the callback is playing. So my current solution is to save the current_node to a hou.session variable, such as hou.session.current_node
Found 531 posts.
Search results Show results as topic list.
Technical Discussion » What is best way to send data to a playbar event callback?
- andrewlowell
- 537 posts
- Offline
Technical Discussion » What is best way to send data to a playbar event callback?
- andrewlowell
- 537 posts
- Offline
I've got a working solution. It's not exactly what I had in mind but I'm wondering if anyone thinks this is workable.
In my node/hda .. I've got a python sop that now appends the node itself to the hou.session module, as a variable.
From there I'm able to read whatever data I'd like off of the node by accessing that variable in the play function.
For instance:
then in the playbar function ...
I'm still curious if there is a way to send this callback data directly.
In my node/hda .. I've got a python sop that now appends the node itself to the hou.session module, as a variable.
From there I'm able to read whatever data I'd like off of the node by accessing that variable in the play function.
For instance:
hou.appendSessionModuleSource('player_node = hou.node("' + hda.path() + '")')
then in the playbar function ...
frame_to_do_something_on = hou.session.player_node.evalParm('frame_to_do_something_on')
I'm still curious if there is a way to send this callback data directly.
Edited by andrewlowell - Jan. 1, 2023 21:45:57
Technical Discussion » What is best way to send data to a playbar event callback?
- andrewlowell
- 537 posts
- Offline
Hi, I'm wrestling with getting an efficient event system based on the playbar. I think it's great that I don't need to make a node time-dependent in order to get events from the starting and stopping of the playbar, awesome!
However, this is pretty limiting if I can't pass it data. Here's my incredibly hacky attempt to do that. I basically want to give this function data from a node that could change it's input or properties. If I can't do that, then I can feed it a string to the node itself and go from there. But, anyone looking at my image should be horrified with the hackiness of the hack.
Any suggestions?
However, this is pretty limiting if I can't pass it data. Here's my incredibly hacky attempt to do that. I basically want to give this function data from a node that could change it's input or properties. If I can't do that, then I can feed it a string to the node itself and go from there. But, anyone looking at my image should be horrified with the hackiness of the hack.
Any suggestions?
Technical Discussion » Modern port communication with process
- andrewlowell
- 537 posts
- Offline
I'm looking for a modern and efficient workflow to do this to hopefully avoid reinventing the wheel.
1. Gather Houdini's current playback time.
1a. Perhaps gather it in increments, every so often?
2. Send this time to a background or external process
3. Have this process listen and base it's operation on seeking this current time
4. Send other information to this process, perhaps an external file, preferably without an external file.
Just a few random tinkerings on my own. The pipe-out CHOP does indeed work. And I have it sending to a network port on Windows. But preferably I would be sending this with python out of sops. The key here is that I wouldn't want it to lock up my system. If there was a way to query Houdini from the outside, that would be amazing.
1. Gather Houdini's current playback time.
1a. Perhaps gather it in increments, every so often?
2. Send this time to a background or external process
3. Have this process listen and base it's operation on seeking this current time
4. Send other information to this process, perhaps an external file, preferably without an external file.
Just a few random tinkerings on my own. The pipe-out CHOP does indeed work. And I have it sending to a network port on Windows. But preferably I would be sending this with python out of sops. The key here is that I wouldn't want it to lock up my system. If there was a way to query Houdini from the outside, that would be amazing.
PDG/TOPs » Trying to set the same port, local vs remote
- andrewlowell
- 537 posts
- Offline
The developer is currently writing a custom python scheduler - any chance you could point us to some documentation on how we might integrate a custom RPC endpoint with the rest of PDG so that it can handle the scheduling/result RPC communication?
We are not using any of the farm schedulers - we are running our jobs as child Hython processes on remote servers, setting PDG parameters by passing environmental variables, and ensuring that the master and all workers use the same shared network drive that is mounted in an accessible place by all.
We also noticed that, although we're not using it, the HQueue scheduler has some functionality to provide a custom TCP port to use as the result server. Is it feasible to add this feature to the base Python scheduler?
We are not using any of the farm schedulers - we are running our jobs as child Hython processes on remote servers, setting PDG parameters by passing environmental variables, and ensuring that the master and all workers use the same shared network drive that is mounted in an accessible place by all.
We also noticed that, although we're not using it, the HQueue scheduler has some functionality to provide a custom TCP port to use as the result server. Is it feasible to add this feature to the base Python scheduler?
PDG/TOPs » Trying to set the same port, local vs remote
- andrewlowell
- 537 posts
- Offline
Here's the exact issue we're experiencing in the words of the developer. Hopefully it's something simple!
I’m trying to set the address of the PDG RPC server in such a way that it is predictable every time, so that the firewall rules for my cloud worker nodes can be limited and secure by only opening a single port for RPC communication.
I’ve tried setting the PDG_RESULT_SERVER directly in my master node’s environmental variables, but still I can observe that the result of str(self.workItemResultServerAddr()) changes each time I setup and run Houdini on the master. I’d prefer to always set it to something like localhost:54411 every time it runs.
How would I ensure that the PDG RPC server always runs on the same port by default? Also, is there a way to change this per job or per execution run?
PDG/TOPs » Trying to set the same port, local vs remote
- andrewlowell
- 537 posts
- Offline
I'm a bit out of my league here with technical knowledge but in a situation where the developer doesn't know enough Houdini to effectively pinpoint issues, whereas I don't know enough networking terminology to really understand the flow. That said here goes:
I'm looking for the best practice to set the same port. The developer would like the same port to be used both locally and on the remote task. Says he's getting a different remote port each time the task is run. Is there a way to "stabilize" the port being used. For instance, always set the port to, localhost:54411
I've tried the environmental edit to no avail and not exactly sure what to set that to or if it's even the correct node.
I'm using this to try and ascertain the current port being used,
in the python scheduler
Could someone point me in the right direction or where to look into such issues, thanks!
I'm looking for the best practice to set the same port. The developer would like the same port to be used both locally and on the remote task. Says he's getting a different remote port each time the task is run. Is there a way to "stabilize" the port being used. For instance, always set the port to, localhost:54411
I've tried the environmental edit to no avail and not exactly sure what to set that to or if it's even the correct node.
I'm using this to try and ascertain the current port being used,
print(job_env['PDG_RESULT_SERVER'])
Could someone point me in the right direction or where to look into such issues, thanks!
Edited by andrewlowell - Dec. 6, 2021 12:45:33
Technical Discussion » Random population by Percentage hda
- andrewlowell
- 537 posts
- Offline
Hi all, this seems like such a basic and widely used concept that I thought I'd share it. I've encountered it a lot with crowds (whereas in this case I'm using it for something music related).
I'm surprised something similar isn't in the native attribute tools already, although I haven't checked out version 19 yet.
hda demo: https://vimeo.com/635773706/20ce2101f0 [vimeo.com]
hda file:
I'm surprised something similar isn't in the native attribute tools already, although I haven't checked out version 19 yet.
hda demo: https://vimeo.com/635773706/20ce2101f0 [vimeo.com]
hda file:
Image Not Found
Technical Discussion » install python packages
- andrewlowell
- 537 posts
- Offline
Thanks to this post I was successful. I made this for anyone who would like it. You'll need a few python packages which are imported on the python sop. Here's a demo
https://vimeo.com/549462315 [vimeo.com]
https://vimeo.com/549462315 [vimeo.com]
Technical Discussion » install python packages
- andrewlowell
- 537 posts
- Offline
Nevermind, got it! Used a Python 3 build with this process ..
https://wordpress.discretization.de/houdini/home/advanced-2/installing-and-using-scipy-in-houdini/ [wordpress.discretization.de]
https://wordpress.discretization.de/houdini/home/advanced-2/installing-and-using-scipy-in-houdini/ [wordpress.discretization.de]
Technical Discussion » install python packages
- andrewlowell
- 537 posts
- Offline
I'm actually trying to get the exact same python library to work as in the original post and running into roadblocks that are beyond my ease and know-how
https://rhodesmill.org/pyephem/ [rhodesmill.org]
Can anyone give a step by step on the most straightforward way to get this to work with a normal 18.5 Houdini Build? I've tried the method in this post without luck. Perhaps it's because I'm using 18.5?
https://rhodesmill.org/pyephem/ [rhodesmill.org]
Can anyone give a step by step on the most straightforward way to get this to work with a normal 18.5 Houdini Build? I've tried the method in this post without luck. Perhaps it's because I'm using 18.5?
phtj
Thanks for the suggestions... it works
I installed in the default C:\Python25 version of Python. Then I copied the ephem folder from C:\Python25\Lib\site-packages over to ...\Houdini 10.0.xxx\houdini\scripts\python and it worked...
But I still have a question...
The reason I though this would not work is that there is a bunch of complied c code in there as well. I did a bit more digging around... I found this thread from 2007
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=9847&highlight=python+package+install [www.sidefx.com]
One of the developers (Rob / rvinluan) writes:You can put your python modules in $HOME/houdiniX.X/scripts/python ...
One caveat to all of this is that when installing python modules on Windows, any compiled extensions (i.e. *.dll or *.pyd files) must be built with the same compiler used to build Houdini (as mentioned above). For win32, we use MSVC2003 and for win64, we use MSVC2005.
Does this mean that I was just lucky - and that my package was built using the right compiler?
Technical Discussion » How to allow the user to work with a simple curve INSIDE of a digital asset?
- andrewlowell
- 537 posts
- Offline
Heard back from support. It's great that they were able to figure it out even if the answer wasn't one I wanted.
curve creation is accomplished with a custom curve state. Unfortunately, the state requires the SOP to be a Curve SOP (it will not work with an HDA). It also uses a "Curve Points Options" handle for editing the points.
curve creation is accomplished with a custom curve state. Unfortunately, the state requires the SOP to be a Curve SOP (it will not work with an HDA). It also uses a "Curve Points Options" handle for editing the points.
Technical Discussion » How to allow the user to work with a simple curve INSIDE of a digital asset?
- andrewlowell
- 537 posts
- Offline
Technical Discussion » How to allow the user to work with a simple curve INSIDE of a digital asset?
- andrewlowell
- 537 posts
- Offline
It would be helpful if this wasn't an original solution. This remakes a curve paradigm as opposed to simply using a curve sop and working with it at a different hda level. Looks really cool, but not what I'm after.
Basically I see all these interesting HDA handles, and mysterious and undocumented sidefx_"states" however, I don't see any documentation on any of it. Am I looking in the wrong place? It just seems like if they're in there there should be some functionality to them.
The xform handles work fine, but what are the curve handles and how does one set them up?
If it's not possible to actually have a curve drawing handle or state with an hda so be it. But there should be a clear answer. SESI? Help?
I pretty much want to reproduce the spline drawing behavior of a spline in an unreal/unity engine asset within Houdini itself. Simply have a curve that fills out the little position information with user interaction as opposed to making, connecting, disconnecting curves. I have all the other components of my tool working properly, just need this piece.
Basically I see all these interesting HDA handles, and mysterious and undocumented sidefx_"states" however, I don't see any documentation on any of it. Am I looking in the wrong place? It just seems like if they're in there there should be some functionality to them.
The xform handles work fine, but what are the curve handles and how does one set them up?
If it's not possible to actually have a curve drawing handle or state with an hda so be it. But there should be a clear answer. SESI? Help?
I pretty much want to reproduce the spline drawing behavior of a spline in an unreal/unity engine asset within Houdini itself. Simply have a curve that fills out the little position information with user interaction as opposed to making, connecting, disconnecting curves. I have all the other components of my tool working properly, just need this piece.
Edited by andrewlowell - May 8, 2021 16:07:22
Technical Discussion » How to allow the user to work with a simple curve INSIDE of a digital asset?
- andrewlowell
- 537 posts
- Offline
I'd like the user to be able to create, manipulate a curve INSIDE of a locked digital asset.
I'm noticing a curve handle which I've tried connecting to the "coords" parm at interface level with no luck, also a method describe in a tutorial to have a state to sidefx_attribpaint with import block, perhaps it's similar to that approach with sidefx_curve? (not recognized) or just "curve" which does seem to work but still no results.
I don't want the user to make a curve and import it, this should be inside of the digital asset. Import Block, Handles, Editable Node, all good. I just don't want diving or imports.
Or, is there any information on how the handle/curve works in an hda? It doesn't seem to exist in the help.
Thanks!
I'm noticing a curve handle which I've tried connecting to the "coords" parm at interface level with no luck, also a method describe in a tutorial to have a state to sidefx_attribpaint with import block, perhaps it's similar to that approach with sidefx_curve? (not recognized) or just "curve" which does seem to work but still no results.
I don't want the user to make a curve and import it, this should be inside of the digital asset. Import Block, Handles, Editable Node, all good. I just don't want diving or imports.
Or, is there any information on how the handle/curve works in an hda? It doesn't seem to exist in the help.
Thanks!
Edited by andrewlowell - May 7, 2021 21:09:41
Houdini for Realtime » The Houdini Music Toolset v2.0 is out
- andrewlowell
- 537 posts
- Offline
I've just released the Houdini Music Toolset, version 2.0!
This version goes beyond the note generation abilities of the first version and takes on animation or automation of MIDI controllers. It was a much more elaborate process than I envisioned but I think I've got something special.
For those of you that are familiar with CHOPs, this version builds and mimics the motion abilities of Houdini at the geometry/point level. Basically allowing animation and ramps to be stored on points. This is not only great in working with notes and music, but a lot of other animation scenarios too.
The excitement of many musical and 3d experimentalists gave me the encouragement to keep my tools developed for the public in this next version. Thanks very much and I hope you enjoy using it for some cool projects.
The newest release as well as new video tutorials on the new features are on GitHub:
Release [github.com]
New Features [vimeo.com]
Controller Channel I/O [vimeo.com]
All documentation [github.com]
This version goes beyond the note generation abilities of the first version and takes on animation or automation of MIDI controllers. It was a much more elaborate process than I envisioned but I think I've got something special.
For those of you that are familiar with CHOPs, this version builds and mimics the motion abilities of Houdini at the geometry/point level. Basically allowing animation and ramps to be stored on points. This is not only great in working with notes and music, but a lot of other animation scenarios too.
The excitement of many musical and 3d experimentalists gave me the encouragement to keep my tools developed for the public in this next version. Thanks very much and I hope you enjoy using it for some cool projects.
The newest release as well as new video tutorials on the new features are on GitHub:
Release [github.com]
New Features [vimeo.com]
Controller Channel I/O [vimeo.com]
All documentation [github.com]
Technical Discussion » Reading and writing ramps and ramp properties
- andrewlowell
- 537 posts
- Offline
Here's a complete workflow which:
1. Reads node parameters, including ramps.
2. Turns them into point attributes
3. Uses them downstream
1. Reads node parameters, including ramps.
2. Turns them into point attributes
3. Uses them downstream
Technical Discussion » Reading and writing ramps and ramp properties
- andrewlowell
- 537 posts
- Offline
Thanks Enivob, this is quite a bit more granular than I'm looking for however. The first step is actually finding all the parameters that a the macro-ramp parm contains. Right now they just all seem to be unique parms, which is true. But I just can't believe there isn't a .getchildparms() type thing for a ramp parm. Going by name just seems so sloppy.
I think I might need to write my own format for these things if it doesn't exist, this would need to be stored in an attribute and then read and reconstructed in vops/vex.
I haven't tried the ascode, but this would need to be a non-moving parts thing. No setting of parms or reading writing. Basically:
loop through all parms on a node
if ramp, get all parms in ramp
record all values in reconstruct-able way in point attribute
use point attribute to reconstruct ramp and process data in vops/vex
I think I might need to write my own format for these things if it doesn't exist, this would need to be stored in an attribute and then read and reconstructed in vops/vex.
I haven't tried the ascode, but this would need to be a non-moving parts thing. No setting of parms or reading writing. Basically:
loop through all parms on a node
if ramp, get all parms in ramp
record all values in reconstruct-able way in point attribute
use point attribute to reconstruct ramp and process data in vops/vex
Technical Discussion » Reading and writing ramps and ramp properties
- andrewlowell
- 537 posts
- Offline
A two part technical question:
1). I'm trying to read a ramp in it's entirety. Meaning, loop through all the parameters in the node, hit the ramp .. and gather the ramp (which is a parmTemplate in hou), but also all of the keys, positions, interpolation switches. Right now I can certainly loop through all parms or tuples, but hitting a technical wall when it comes to getting what I'd probably see when I go to edit parameter interface, I want at those. So how would I do that in Python?
2). Next, I'd like to save all relevant information about a ramp into an attribute. This is quite a bit more complicated than say a float parameter. In which I'm already taking the name of the parm, making that the attribute name, then assigning the float value. A ramp could be reproduced as a list, a string, or what I'm seeing in VOPs/VEX as a struct. But there doesn't seem to be a good way to pipe that into an attribute.
Has anyone ventured into i/o with ramps? I'd really like to read, compact, and reuse them as attributes.
1). I'm trying to read a ramp in it's entirety. Meaning, loop through all the parameters in the node, hit the ramp .. and gather the ramp (which is a parmTemplate in hou), but also all of the keys, positions, interpolation switches. Right now I can certainly loop through all parms or tuples, but hitting a technical wall when it comes to getting what I'd probably see when I go to edit parameter interface, I want at those. So how would I do that in Python?
2). Next, I'd like to save all relevant information about a ramp into an attribute. This is quite a bit more complicated than say a float parameter. In which I'm already taking the name of the parm, making that the attribute name, then assigning the float value. A ramp could be reproduced as a list, a string, or what I'm seeing in VOPs/VEX as a struct. But there doesn't seem to be a good way to pipe that into an attribute.
Has anyone ventured into i/o with ramps? I'd really like to read, compact, and reuse them as attributes.
Edited by andrewlowell - Oct. 18, 2020 22:00:05
Houdini Lounge » Official release of the Houdini Music Toolset (HMT)
- andrewlowell
- 537 posts
- Offline
Good to hear its working ok! As far as controller channels, I haven't implemented those, maybe version 2. They're pretty straitforward though .. once you get a curve in chops just name it c45 for instance and merge before the midi out chop.
I've made a few nodes in the past that converted a animation channel into a controller but like I said; for HMT probably 6 months off. I want the workflow to be encompassing once its there. So I recommend for now maybe just chop merge/fetch the channels already generated by the chopnet of the hmt before the midi out, merge in your controller channels, then use your own midi out. Also make sure its either visible or forced to cook (see method used in otl)
I've made a few nodes in the past that converted a animation channel into a controller but like I said; for HMT probably 6 months off. I want the workflow to be encompassing once its there. So I recommend for now maybe just chop merge/fetch the channels already generated by the chopnet of the hmt before the midi out, merge in your controller channels, then use your own midi out. Also make sure its either visible or forced to cook (see method used in otl)
-
- Quick Links