Hey guys,
I really need some help. On my asset I have a checkbox parameter and a transform handle. What I need to do is, whenever the checkbox is toggled, get the state of the checkbox and if the checkbox is checked, then bind the “tx” field on the handle to my posx parameter, and if it is unchecked, unbind “tx”. So my pseudo code is looking like…
whenever checkbox changes state
cbState = state of checkbox
if(cbState){
bind mainHandle:tx to posx parameter
}else{
unbind mainHandle:tx
}
From what I've found so far the only way to achieve this is to write script in HScript (because apparently Python can't bind handles yet) in the “scripts” section of operator type properties. I'm quite comfortable with VEX but I have no experience with HScript and so far everything I've tried to do in HScript has failed miserably (I can't even get a simple echo command to work). Is anyone able to provide me with some example code or a tutorial or something that would show me how to achieve this? I've been digging through the documentation trying to learn but I just keep hitting walls.
PS. This is a cross post from the ODForce forums. Really desperate for help!
Found 12 posts.
Search results Show results as topic list.
Technical Discussion » Binding and Unbinding Handles on Digital Assets
- Kubaki
- 12 posts
- Offline
Technical Discussion » Handles in HDA's - how to toggle them on and off
- Kubaki
- 12 posts
- Offline
Technical Discussion » Houdini Randomly Locking Up
- Kubaki
- 12 posts
- Offline
Hey Mate,
So after a bit more searching I figured out that Malwarebytes had something to do with it. Not sure why though. Anyways I managed to fix it by switching over to Local Licencing Mode (which is what SideFX recommended). Not 100% sure if it'll fix it for you but worth giving it a shot www.sidefx.com/faq/apprentice-local-licensing/#faq74
So after a bit more searching I figured out that Malwarebytes had something to do with it. Not sure why though. Anyways I managed to fix it by switching over to Local Licencing Mode (which is what SideFX recommended). Not 100% sure if it'll fix it for you but worth giving it a shot www.sidefx.com/faq/apprentice-local-licensing/#faq74
Technical Discussion » Houdini Randomly Locking Up
- Kubaki
- 12 posts
- Offline
Hey Guys,
Over the past few days I've run into an infuriating issue in Houdini. Basically every couple of minutes Houdini will lockup for about 5 to 10 seconds, and then continue on fine. It happens in both existing scenes as well as new ones. I've had the issue in both 16.5.302 and 16.5.405. To fix it I've tried uninstalling every single version I have installed, deleting the Houdini folders from the documents folder, restarting the machine and then reinstalling the app, as well as updating graphics drivers. but it has had absolutely no effect. It should be noted that even after all this it still noticed that I had an apprentice licence installed, so I'm not sure what I missed but what ever it is could be the cause. Maybe? Also this issue doesn't happen at Uni, even with the same scenes open.
Has anyone had this issue/know of any potential fixes?
Cheers,
Dylan
Over the past few days I've run into an infuriating issue in Houdini. Basically every couple of minutes Houdini will lockup for about 5 to 10 seconds, and then continue on fine. It happens in both existing scenes as well as new ones. I've had the issue in both 16.5.302 and 16.5.405. To fix it I've tried uninstalling every single version I have installed, deleting the Houdini folders from the documents folder, restarting the machine and then reinstalling the app, as well as updating graphics drivers. but it has had absolutely no effect. It should be noted that even after all this it still noticed that I had an apprentice licence installed, so I'm not sure what I missed but what ever it is could be the cause. Maybe? Also this issue doesn't happen at Uni, even with the same scenes open.
Has anyone had this issue/know of any potential fixes?
Cheers,
Dylan
Edited by Kubaki - March 22, 2018 07:47:17
Technical Discussion » Modifying CHOPs with a Wrangle on a Per Channel Basis
- Kubaki
- 12 posts
- Offline
Hey Guys. I've import some midi files into chops. Each time a key is pressed, it creates a flat peak, and then goes down to zero. So basically I've got a bunch of channels with localised plateau peaks. What I want to do is essentially extend the tops of these peaks until a new plateau is reached, at which point I will extend that plateau out the the next one, and so on. I've gone ahead and done this in SOPs to illustrate what I'm trying to do (cause that explanation above likely made no sense).
The pseudo code for what I want to do is:
maxVal = value of sample0;
foreach sample (excluding 0){
curVal = the value of the current sample;
if curVal is equal to 0{
Current Sample Value is set to the maxVal;
} else {
maxVal is set to the curVal;
}
}
This is the logic I followed in SOPs and it worked perfectly. However I cannot figure out how to do the same thing in CHOPs. My problems are two fold.
1) I can't figure out how to set the value of samples that are NOT the current one being iterated on. The way I've found so far to set sample values is using the global variable V. I tried to do it using the ‘chsetattr’ function, but either it doesn't set sample values or “V” is not the right attribute to use (and I can't find the correct one). Also tried setting a sample attribute on one wrangle, then on another (with iterate set to channels and samples) set “V” to the value of the attribute. Also didn't work.
2) So far I have found no way of only executing the code once (such as in a detail wrangle, which is what I used for the SOPs example). I thought setting the wrangle to iterate by “Over Channels” would do the trick, as the documentation says, “Runs the snippet one time per channel with the I variable set to zero.” but in this this post Guillaume points out that this isn't the case. And even if it was I still would be in trouble because that mode does allow setting “V” or channel data.
2.5) On that note, whats the difference between channel data and attributes? One can be written the other can't. I thought attributes were just data stored on the geo (or in this case channel). Not sure why CHOPs is suddenly making a distinction.
So to summarise, I need to find a way to set the values of individual samples and I need a way of executing a CHOP wrangle once per channel (like a detail wrangle in SOPs).
The pseudo code for what I want to do is:
maxVal = value of sample0;
foreach sample (excluding 0){
curVal = the value of the current sample;
if curVal is equal to 0{
Current Sample Value is set to the maxVal;
} else {
maxVal is set to the curVal;
}
}
This is the logic I followed in SOPs and it worked perfectly. However I cannot figure out how to do the same thing in CHOPs. My problems are two fold.
1) I can't figure out how to set the value of samples that are NOT the current one being iterated on. The way I've found so far to set sample values is using the global variable V. I tried to do it using the ‘chsetattr’ function, but either it doesn't set sample values or “V” is not the right attribute to use (and I can't find the correct one). Also tried setting a sample attribute on one wrangle, then on another (with iterate set to channels and samples) set “V” to the value of the attribute. Also didn't work.
2) So far I have found no way of only executing the code once (such as in a detail wrangle, which is what I used for the SOPs example). I thought setting the wrangle to iterate by “Over Channels” would do the trick, as the documentation says, “Runs the snippet one time per channel with the I variable set to zero.” but in this this post Guillaume points out that this isn't the case. And even if it was I still would be in trouble because that mode does allow setting “V” or channel data.
2.5) On that note, whats the difference between channel data and attributes? One can be written the other can't. I thought attributes were just data stored on the geo (or in this case channel). Not sure why CHOPs is suddenly making a distinction.
So to summarise, I need to find a way to set the values of individual samples and I need a way of executing a CHOP wrangle once per channel (like a detail wrangle in SOPs).
Edited by Kubaki - Feb. 3, 2018 08:02:55
Technical Discussion » VEX Precision Issues
- Kubaki
- 12 posts
- Offline
Technical Discussion » VEX Precision Issues
- Kubaki
- 12 posts
- Offline
I'm in desperate need of help here. The problem is simple, Houdini is giving some wildly inaccurate results with simple math problems. I first ran into this when using the modulo operator, but now I'm noticing it with stuff as basic as addition and subtraction. There are two things I've observed with this issue. Firstly, the problem when the numbers are variables.Secondly, the issues appears completely random. I can't find any patterns or anything.
One example is the equation: (vspacing*vpt)+voffset) - vpos.
(vspacing*vpt)+voffset) gives the correct result. vpos, is correct. But when I subtract vpos from (vspacing*vpt)+voffset) the result is simply not as it should be. For example, when the answer should be 0, the result is actually 7.45058e-9.
This is really screwing me up. I've trying trying to write some simple tools in VEX but this problem is making half the stuff I want to do absolutely impossible. Can anyone help? Does anyone know why this is happening?
One example is the equation: (vspacing*vpt)+voffset) - vpos.
(vspacing*vpt)+voffset) gives the correct result. vpos, is correct. But when I subtract vpos from (vspacing*vpt)+voffset) the result is simply not as it should be. For example, when the answer should be 0, the result is actually 7.45058e-9.
This is really screwing me up. I've trying trying to write some simple tools in VEX but this problem is making half the stuff I want to do absolutely impossible. Can anyone help? Does anyone know why this is happening?
Technical Discussion » Sweep Node: Angle Fix causing major skewing on coners
- Kubaki
- 12 posts
- Offline
Hey Guys.
I've got a very annoying problem that I can't seem to figure out. I'm trying to sweep a profile curve around a control curve that has been snapped to a surface (the idea is that it will be a wall). I turned on the ‘Angle Fix’ feature to maintain the thickness of the wall on the corners, which is does, but it also skews the corners out alot. I've attached a photo which shows what I mean. I want the wall to stand upright, and it does except for the corners. I've been trying to figure it out for a few hours now, and the only thing I've figured out is that it has something to do with the fact that the control curve has been snapped to the geometry (when I turn off snapping the problem goes away). I'll attach the scene fill with the digital asset in case anyone wants to inspect it to help diagnose the problem.
Thanks Guys.
I've got a very annoying problem that I can't seem to figure out. I'm trying to sweep a profile curve around a control curve that has been snapped to a surface (the idea is that it will be a wall). I turned on the ‘Angle Fix’ feature to maintain the thickness of the wall on the corners, which is does, but it also skews the corners out alot. I've attached a photo which shows what I mean. I want the wall to stand upright, and it does except for the corners. I've been trying to figure it out for a few hours now, and the only thing I've figured out is that it has something to do with the fact that the control curve has been snapped to the geometry (when I turn off snapping the problem goes away). I'll attach the scene fill with the digital asset in case anyone wants to inspect it to help diagnose the problem.
Thanks Guys.
Technical Discussion » Adding custom point attributes to an array
- Kubaki
- 12 posts
- Offline
Thanks tamte. It certainly looks a lot simpler. Just to clarify that i understand whats going on, the Attribute Promote Node is taking only the maximum exceed threshold value of all the points on a given frame, and then basically applying that to the object as whole instead of each point?
Technical Discussion » Adding custom point attributes to an array
- Kubaki
- 12 posts
- Offline
Thanks so much for that jlim, it was a massive help. I modified the project slightly to get the effect I was after, and it worked perfectly I'll attach it below.
Technical Discussion » Adding custom point attributes to an array
- Kubaki
- 12 posts
- Offline
Hey Guys.
I've searching for a while can't can't quite find an answer that helps me out much, so here I am
I've created a custom point attribute called ‘exceedThreshold’ It's just a simple 1 or 0 on each point of my mesh. What I want to do is add each point's exceedThreshold value to an array so that I can check the array to see if any 1's exist (and then if they do it'll flip a switch and do other cool stuff). The closest I've gotten is (all in a VOP network) using a for loop to create an array and then a for each loop to check the array for any 1's. It halfed worked. What ended up happening was it created one array for each point, containing as many elements as there were points, and each element was just the same value as the exceedThreshold attribute was before the array was created.
For example, point 0 had an exceedThreshold value of zero, so the array for it was just 8 zeros.
I've also tried a few other things that failed miserably.
If anyone has any answers as to how I can get this done, or even just point me in the right direction, I would be very appreciative. Also I realize it might be a super simple solution that I've missed, but I'm at the end of an 11 hour day at uni so my mind is kinda fried. Thanks again to anyone who can help
P.S. I'm using Houdini15 if that is at all relevant.
I've searching for a while can't can't quite find an answer that helps me out much, so here I am
I've created a custom point attribute called ‘exceedThreshold’ It's just a simple 1 or 0 on each point of my mesh. What I want to do is add each point's exceedThreshold value to an array so that I can check the array to see if any 1's exist (and then if they do it'll flip a switch and do other cool stuff). The closest I've gotten is (all in a VOP network) using a for loop to create an array and then a for each loop to check the array for any 1's. It halfed worked. What ended up happening was it created one array for each point, containing as many elements as there were points, and each element was just the same value as the exceedThreshold attribute was before the array was created.
For example, point 0 had an exceedThreshold value of zero, so the array for it was just 8 zeros.
I've also tried a few other things that failed miserably.
If anyone has any answers as to how I can get this done, or even just point me in the right direction, I would be very appreciative. Also I realize it might be a super simple solution that I've missed, but I'm at the end of an 11 hour day at uni so my mind is kinda fried. Thanks again to anyone who can help
P.S. I'm using Houdini15 if that is at all relevant.
Houdini Indie and Apprentice » Separating fractured objects for a DOP system
- Kubaki
- 12 posts
- Offline
Hey Guys.
First time posting here.
I'm pretty new to houdini so sorry if this is a really simple feat but I'm stumped.
As you can see from the image i've attached, i've fractured a box and clustered the exterior pieces into one big piece. I want to use that object (the grey one) as a static object (it's supposed to be the ground) and the fractured objects as RBD objects. Is there a way to get my AutoDOP network to treat the clustered object as a static object and treat the rest as RBD?
If it helps, I'm trying to set up an effect where an object impacts the ground and throws all the debris into the air (the grey box is meant to be the ground, and therefore needs to remain static).
If this question doesn't make sense let me know and i'll try to explain myself a bit better
First time posting here.
I'm pretty new to houdini so sorry if this is a really simple feat but I'm stumped.
As you can see from the image i've attached, i've fractured a box and clustered the exterior pieces into one big piece. I want to use that object (the grey one) as a static object (it's supposed to be the ground) and the fractured objects as RBD objects. Is there a way to get my AutoDOP network to treat the clustered object as a static object and treat the rest as RBD?
If it helps, I'm trying to set up an effect where an object impacts the ground and throws all the debris into the air (the grey box is meant to be the ground, and therefore needs to remain static).
If this question doesn't make sense let me know and i'll try to explain myself a bit better
-
- Quick Links