Haha, that retiming I mentioned turned out to not be so straightforward
But got something working for fun…
Found 256 posts.
Search results Show results as topic list.
Technical Discussion » channels (CHOP) from table import?
- friedasparagus
- 402 posts
- Offline
Technical Discussion » channels (CHOP) from table import?
- friedasparagus
- 402 posts
- Offline
Hey,
If you just want to import values per frame, then a text file with a value per line saved as a .chan will be readable in chops. If you have more than one value per line these then each column will be imported as a separate channel. Which could be handy for retiming the values in the second column based upon the first.
If you just want to import values per frame, then a text file with a value per line saved as a .chan will be readable in chops. If you have more than one value per line these then each column will be imported as a separate channel. Which could be handy for retiming the values in the second column based upon the first.
Technical Discussion » Unable to call custom HDK/Vex function
- friedasparagus
- 402 posts
- Offline
Hey BabaJ,
I think you might have picked a doosey for getting into hdk land
Firstly, the Vex_Ops file you linked to above has the whole code body wrapped in a ‘#if defined(LINUX)’ preprocessor directive, and from the look of your HFS, you're on windows, no? So the code will happily compile, but it is as far as the compiler is concerned, empty.
I *think* the reason for the linux platform check is because of the call to getpid() which isn't supported on the windows platform, try taking out the #if/#endif and the compiler should complain about the identifier not being found, because now it's actually found some code to (try and) compile.
Of course, what symek pointed out is also true. That you need to tell houdini which contexts you want the function to be available in.
I'd say checkout another file if you want to play with custom functions in SOP wrangles: maybe this one may give you more of a start here [www.sidefx.com]. Notice the use of VEX_ALL_CONTEXT as argument in VEX_VexOp constructor calls, and also the slightly more helpful use of the preprocessor directives to do platform checking on a per-function basis.
I hope that's somehow useful and if I've said anything daft, somebody please give me a virtual poke in the eye!
I think you might have picked a doosey for getting into hdk land
Firstly, the Vex_Ops file you linked to above has the whole code body wrapped in a ‘#if defined(LINUX)’ preprocessor directive, and from the look of your HFS, you're on windows, no? So the code will happily compile, but it is as far as the compiler is concerned, empty.
I *think* the reason for the linux platform check is because of the call to getpid() which isn't supported on the windows platform, try taking out the #if/#endif and the compiler should complain about the identifier not being found, because now it's actually found some code to (try and) compile.
Of course, what symek pointed out is also true. That you need to tell houdini which contexts you want the function to be available in.
I'd say checkout another file if you want to play with custom functions in SOP wrangles: maybe this one may give you more of a start here [www.sidefx.com]. Notice the use of VEX_ALL_CONTEXT as argument in VEX_VexOp constructor calls, and also the slightly more helpful use of the preprocessor directives to do platform checking on a per-function basis.
I hope that's somehow useful and if I've said anything daft, somebody please give me a virtual poke in the eye!
Technical Discussion » HDK pCaptData example
- friedasparagus
- 402 posts
- Offline
Hi!
I don't know if you've got other reasons to move things into the hdk, but you can achieve all the above points using the capture attribute pack/unpack SOP nodes. Could save you a lot of compiling fun and games
I don't know if you've got other reasons to move things into the hdk, but you can achieve all the above points using the capture attribute pack/unpack SOP nodes. Could save you a lot of compiling fun and games
Houdini Indie and Apprentice » Animation snapping in viewport
- friedasparagus
- 402 posts
- Offline
Hi mbbuckley,
there are a few things that could be at the root of it. Sometimes CHOPs are not very explicit about when you've created some kind of dependency loop, but also having ‘Time Slice’ enabled on chop nodes prevents being able to scrub backwards in the timeline, and would quite possibly cause similar issues on moving keys around, so maybe worth checking for any of those (it lives under the ‘Common’ tab in a chop nodes parms).
It's hard to say any more about these kinds of problems without seeing the scene in question
Cheers,
Henry
there are a few things that could be at the root of it. Sometimes CHOPs are not very explicit about when you've created some kind of dependency loop, but also having ‘Time Slice’ enabled on chop nodes prevents being able to scrub backwards in the timeline, and would quite possibly cause similar issues on moving keys around, so maybe worth checking for any of those (it lives under the ‘Common’ tab in a chop nodes parms).
It's hard to say any more about these kinds of problems without seeing the scene in question
Cheers,
Henry
Houdini Indie and Apprentice » Symmetrical modelling
- friedasparagus
- 402 posts
- Offline
Hi Pete,
I tend to use a wrangle downstream of the edit with something like:
with the display flag left on that while you edit… Or you could make a group up stream with a similar method that you then reference after the edit, and set the P.x to 0 then.
I tend to use a wrangle downstream of the edit with something like:
if(@P.x < chf("threshold")) @P.x = 0;
with the display flag left on that while you edit… Or you could make a group up stream with a similar method that you then reference after the edit, and set the P.x to 0 then.
Houdini Lounge » HUG for London
- friedasparagus
- 402 posts
- Offline
OK! We finally have a meetup sorted for the London Houdini User Group…
The first official gathering will be after the Procedural in Motion event at Richmix in Shoreditch on October 2nd.
We'll be there from 5-7pm and then maybe somewhere else after that.
The group page is here [www.meetup.com]
Look forward to meeting some more London Houdini folk!
Cheers,
Henry
The first official gathering will be after the Procedural in Motion event at Richmix in Shoreditch on October 2nd.
We'll be there from 5-7pm and then maybe somewhere else after that.
The group page is here [www.meetup.com]
Look forward to meeting some more London Houdini folk!
Cheers,
Henry
Technical Discussion » Animation blend via an attribute in CHOPs
- friedasparagus
- 402 posts
- Offline
Hi!
Is this the kind of thing you were thinking of? Sorry, haven't got much time to document properly, but take a look and see. Also included a point deform setup as an example… this stuff gets real slow with a heavier point count. So doing a reduction of your input mesh and using that in CHOPs would be a good idea.
Cheers,
Henry
Is this the kind of thing you were thinking of? Sorry, haven't got much time to document properly, but take a look and see. Also included a point deform setup as an example… this stuff gets real slow with a heavier point count. So doing a reduction of your input mesh and using that in CHOPs would be a good idea.
Cheers,
Henry
Technical Discussion » Bird rig
- friedasparagus
- 402 posts
- Offline
Technical Discussion » Capture Geometry Error: Numerical issue, rigging, skining
- friedasparagus
- 402 posts
- Offline
Hi alutaroma,
Really hard to say without seeing the input mesh / bones, but one thing to look out for is that the incoming bone captue lines sit reasonably well within the mesh you want to capture (Try setting the display flag on the ‘bonecapturelines’ node and template the ‘geoFile’ node to check this). The biharmonic isn't brittle by any means, but there are occasions where is wigs out.
If you can (and if the mesh isn't huge) post a hip if you're still having issues,
Cheers,
Henry
Really hard to say without seeing the input mesh / bones, but one thing to look out for is that the incoming bone captue lines sit reasonably well within the mesh you want to capture (Try setting the display flag on the ‘bonecapturelines’ node and template the ‘geoFile’ node to check this). The biharmonic isn't brittle by any means, but there are occasions where is wigs out.
If you can (and if the mesh isn't huge) post a hip if you're still having issues,
Cheers,
Henry
Edited by friedasparagus - Sept. 13, 2017 11:20:02
Technical Discussion » Basic rigging problem - Ik with constraints not matching goal when it is able to.
- friedasparagus
- 402 posts
- Offline
Yes, I meant to add that you can just adjust the rest angles for the same effect. Although always a good idea to have clean rotates on the bones, whatever the case.
I'm not sure how the IK with constraints is implemented in Houdini, but it seems common for IK solutions to have constraints applied after an initial solution has been created (i.e. on the first iteration of the solve). So if the initial solution has gone the wrong way then the constraints will lock it to the nearest ‘permitted’ angle, which in your original case was the ‘wrong’ side of the constraint range.
Giving the IK an indication of which way to bend is exactly what the twist effector does when using the ‘un-constrained’ version of the IK (for all intents and purposes the same as the Rotate-Plane solver in maya). I've not come across a good reason to prefer the constrained IK solver over the other when it comes to a two bone chain like a simple leg. If you have a planar chain to start, the knee will only ever bend in the x-axis in the direction of your twist control. Making the pelvic bone part of the IK chain will cause you grief here, as it puts a lovely big kink in the chain which will give very strange results with a twist effector.
I'm not sure how the IK with constraints is implemented in Houdini, but it seems common for IK solutions to have constraints applied after an initial solution has been created (i.e. on the first iteration of the solve). So if the initial solution has gone the wrong way then the constraints will lock it to the nearest ‘permitted’ angle, which in your original case was the ‘wrong’ side of the constraint range.
Giving the IK an indication of which way to bend is exactly what the twist effector does when using the ‘un-constrained’ version of the IK (for all intents and purposes the same as the Rotate-Plane solver in maya). I've not come across a good reason to prefer the constrained IK solver over the other when it comes to a two bone chain like a simple leg. If you have a planar chain to start, the knee will only ever bend in the x-axis in the direction of your twist control. Making the pelvic bone part of the IK chain will cause you grief here, as it puts a lovely big kink in the chain which will give very strange results with a twist effector.
Technical Discussion » Basic rigging problem - Ik with constraints not matching goal when it is able to.
- friedasparagus
- 402 posts
- Offline
Hi,
looks like your setup has the leg bones in a perfectly straight line in the rest pose, which will be confusing the IK solver when it tries to initiate the angles. Try:
1. turn off the IK
2. put a slight bend in the knee
3. ‘Clean Transforms’
4. Set the ‘Rest Angles’ parm back to zero on both bones (this parm will have been adjusted to compensate for the freezing of transforms)
You should now be able to switch the IK back on and have everything behave as you expect.
Hope that helps,
Henry
looks like your setup has the leg bones in a perfectly straight line in the rest pose, which will be confusing the IK solver when it tries to initiate the angles. Try:
1. turn off the IK
2. put a slight bend in the knee
3. ‘Clean Transforms’
4. Set the ‘Rest Angles’ parm back to zero on both bones (this parm will have been adjusted to compensate for the freezing of transforms)
You should now be able to switch the IK back on and have everything behave as you expect.
Hope that helps,
Henry
Houdini Indie and Apprentice » Need some help skinning this mesh...
- friedasparagus
- 402 posts
- Offline
Ah, I see. If you're object merging then you might find it helpful to either lock a sop downstream of the capture or drop a stash sop, just to prevent recooking of the capture node if you haven't got animation on a bone (or control object).
Of course, making sure that you're object merging the cregions ‘Into This Object’.
Of course, making sure that you're object merging the cregions ‘Into This Object’.
Houdini Indie and Apprentice » Need some help skinning this mesh...
- friedasparagus
- 402 posts
- Offline
Hi Pete!
Do you have “use capture pose” checked on your capture node? If so, you might need to align your capture pose (the shelf tool is under the rigging tab),
Henry
Do you have “use capture pose” checked on your capture node? If so, you might need to align your capture pose (the shelf tool is under the rigging tab),
Henry
Houdini Indie and Apprentice » Timeshift or offset animation on points
- friedasparagus
- 402 posts
- Offline
That is an interesting little problem with the foreach… I haven't been able to wrap my noodle around why that isn't working. I did take a stab at putting it into chops, I'm afraid I still appear to be channel wrangle obsessed… but they're just so gooood…
Technical Discussion » chop export rotation channels swapped - how to re-route these?
- friedasparagus
- 402 posts
- Offline
Hi Michiel,
Only managed to grab a quick look, but I believe the root of the issue is the same as when we create FK controls that drive the target bone via channel references. It's important to remember to change the rotate order of the FK control to match that of the bone, which by default is RzRyRx (reversed from the default for nulls etc…). I've included a little scene to demonstrate the wonkiness.
Here you don't initially have that problem because the control null is driving another null with the same rotate order, however the problem kicks in again when you try to send those channel values on to the bone object, which when done via chop export, behave just like direct channel references.
You can avoid this by making sure that *all* the objects (and chops) involved have the RzRyRx rotate order. This will of course change your animation, which would need redoing to look the way you wanted initially. Then when the values get exported they should be driving the bone in the expected fashion. (You would also need to recreate the ‘lag’ effects on the hip control).
Another option would be the insert a null in the bone hierarchy to receive the CHOP exported rotate values, which would then be able to use the existing rotate order. The bone will be happy with this as the relationship to it's input null is one of parenting rather than direct channel reference.
Hope that's of some help,
Cheers,
Henry
Only managed to grab a quick look, but I believe the root of the issue is the same as when we create FK controls that drive the target bone via channel references. It's important to remember to change the rotate order of the FK control to match that of the bone, which by default is RzRyRx (reversed from the default for nulls etc…). I've included a little scene to demonstrate the wonkiness.
Here you don't initially have that problem because the control null is driving another null with the same rotate order, however the problem kicks in again when you try to send those channel values on to the bone object, which when done via chop export, behave just like direct channel references.
You can avoid this by making sure that *all* the objects (and chops) involved have the RzRyRx rotate order. This will of course change your animation, which would need redoing to look the way you wanted initially. Then when the values get exported they should be driving the bone in the expected fashion. (You would also need to recreate the ‘lag’ effects on the hip control).
Another option would be the insert a null in the bone hierarchy to receive the CHOP exported rotate values, which would then be able to use the existing rotate order. The bone will be happy with this as the relationship to it's input null is one of parenting rather than direct channel reference.
Hope that's of some help,
Cheers,
Henry
Technical Discussion » Setting up Character constraints without object popping
- friedasparagus
- 402 posts
- Offline
Hi Guillaume,
Sorry to resurrect an old thread, but I've only just grabbed enough time to knock together an example of the keyframing idea for parent constraints. This is definitely the kind of setup that would need a shelf tool to manage (I've also been meaning to create get/setConstraintXform() python methods, which would be really handy for this kind of caper), but see what you reckon.
In the attached file, I've got keyframes set on the ‘Target’ path on the ‘Object Offset’ CHOP, and on the same frame I've got keys on the two ‘bindpose_before/after’ Pose CHOPs to update the offset. This seems to give the desired behaviour, and does clean up the chopnet a bit.
Cheers,
Henry
Sorry to resurrect an old thread, but I've only just grabbed enough time to knock together an example of the keyframing idea for parent constraints. This is definitely the kind of setup that would need a shelf tool to manage (I've also been meaning to create get/setConstraintXform() python methods, which would be really handy for this kind of caper), but see what you reckon.
In the attached file, I've got keyframes set on the ‘Target’ path on the ‘Object Offset’ CHOP, and on the same frame I've got keys on the two ‘bindpose_before/after’ Pose CHOPs to update the offset. This seems to give the desired behaviour, and does clean up the chopnet a bit.
Cheers,
Henry
Technical Discussion » rotating gravity
- friedasparagus
- 402 posts
- Offline
Hi Nicolas,
you could use a point() expression in the the gravity DOP to grab a geometry attribute… or if you wanted to set up a control object you could use a vtorigin() expression to grab the objects world space and plug that into the gravity DOP. In the attached file I've used chops instead… but it does the same thing.
Hope it helps,
Henry
you could use a point() expression in the the gravity DOP to grab a geometry attribute… or if you wanted to set up a control object you could use a vtorigin() expression to grab the objects world space and plug that into the gravity DOP. In the attached file I've used chops instead… but it does the same thing.
Hope it helps,
Henry
Houdini Lounge » Adding inbetweens in the trail node?
- friedasparagus
- 402 posts
- Offline
Hi Conan,
Just revising the initial answer, which you may or may not have clocked Have a look at this example and see if it ticks your boxes
Cheers,
Henry
Just revising the initial answer, which you may or may not have clocked Have a look at this example and see if it ticks your boxes
Cheers,
Henry
Edited by friedasparagus - Aug. 8, 2017 06:30:22
Technical Discussion » Non-linear blendshape shelf tool script
- friedasparagus
- 402 posts
- Offline
Hello again,
Just airing out another little script for a shelf tool that quickly sets up non-linear (quadratic interpolation) blendshapes. Can be a handy technique for eyelids –
1) create fully closed and half-closed blendshapes, plug them into your blenshapes SOP.
2) Then select the blendshape SOP and run the shelf tool
3) select the half-closed shape as your ‘intermediate shape’ (the first prompt) and then your full closed shape from the second prompt
Hope it's useful to someone out there
Just airing out another little script for a shelf tool that quickly sets up non-linear (quadratic interpolation) blendshapes. Can be a handy technique for eyelids –
1) create fully closed and half-closed blendshapes, plug them into your blenshapes SOP.
2) Then select the blendshape SOP and run the shelf tool
3) select the half-closed shape as your ‘intermediate shape’ (the first prompt) and then your full closed shape from the second prompt
Hope it's useful to someone out there
blend_nodes = hou.selectedNodes() if len(blend_nodes) < 1 or blend_nodes[0].type().name() != "blendshapes": raise hou.Error("Please select a blendshapes node...") else: blend_node = blend_nodes[0] blend_list = list(p.alias() for p in blend_node.globParms("blend*")) idx = hou.ui.selectFromList( blend_list, message="Select intermediate shape...", exclusive=True )[0] first = blend_node.parm(blend_list[idx]) blend_list.pop(idx) idx = hou.ui.selectFromList( blend_list, message="Select final shape...", exclusive=True )[0] second = blend_node.parm(blend_list[idx]) t_parm_name = hou.ui.readInput("Please enter a name for the new drive parameter")[1] first_exp = '-4 * (pow(ch("' + t_parm_name + '"), 2)) + 4 * (ch("' + t_parm_name + '"))' second_exp = '2 * (pow(ch("' + t_parm_name + '"), 2)) - ch("' + t_parm_name + '")' spare = hou.FloatParmTemplate(t_parm_name, t_parm_name.replace("_", " ").capitalize(), 1, max=1.0) blend_node.addSpareParmTuple(spare) first.setExpression(first_exp, language=hou.exprLanguage.Hscript) second.setExpression(second_exp, language=hou.exprLanguage.Hscript)
-
- Quick Links