Hello everyone,
I am a Softimage rigger trying to transfer my skills to Houdini. I have read animation and rigging tutorials and also read Jordi's rigging transition guide.
However, I still consider myself very new to this software and am struggling with some concepts.
My first question to this forum would be to know what would be your workflow to write a custom kinematic solver (similar to ICE Kinematics).
For example, I tried to write a custom IK solver as an exercise. I considered using a chop network, in which I wanted to do a vopchop to do the math I could not do at chop level. But I could not figure out how to pass inputs and outputs.
After some research on the Internet, it looked like the approach would be to create a geometry in which I would “object merge” my inputs (Chain root, Up Vector, Effector), then pass those to a vopsop and do the math there. I succeeded building my solver that way, but I am really not sure this is the good way of doing it. I find it very strange to “object merge” my control objects to gather their point positions “P” from their child geometry. How could I gather their whole transform (scaling, rotation, translation). Also, how should I deal with more than 4 control objects fed to my vopsop which seems limited in the number of inputs?
Bascically I am looking for the best way to get objects transforms, do some math with them and then output tranforms to other objects. This would let me write my own constraints and solvers.
Thanks in advance for any advice on that subject
Custom Kinematics Solver
9344 11 4- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: Nov. 2008
- Offline
Working with vopchop is a little bit tricky. Here is an example how to work with matrices in vopchop. There are 2 key moments:
- To get input you have to use chinput vex function.
- You have to use switch vop to output multiple channels from chops, because otherwise, vopchop cooks only one channel.
https://www.dropbox.com/s/71svmnrnwk6jwii/chop_matrix_vex.hip?dl=0 [dropbox.com]
- To get input you have to use chinput vex function.
- You have to use switch vop to output multiple channels from chops, because otherwise, vopchop cooks only one channel.
https://www.dropbox.com/s/71svmnrnwk6jwii/chop_matrix_vex.hip?dl=0 [dropbox.com]
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
Sr. Graphics Tools Engineer @ Nvidia
- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
- tamte
- Member
- 8551 posts
- Joined: July 2007
- Online
there is no straightforward method to do this in Houdini currently, I feel like that contrext is missing
it's quite funny actually as other apps seem to start with such context (ICE Kinematics, C4D Xpresso, Maya Node Editor, Modo Schematic View, …) but Houdini completely omitted it
CHOPs are the closest, but the almost non-existent ability to work with complex data like matrices in straightforward way is making it extremely painful so rather than struggling in CHOPs I use SOPs most of the time
you can just do all your math on single AttribVOP or Wrangle, by importing transforms of all required objects through optransform() do the math, then addpoint() as many points as output objects you desire, populate them with attributes of transforms and parameters you want to overwrite then Geometry CHOP import this data to CHOPs and Export to objects
just make sure you don't create dependency loops
It's still very hacky, but the most flexible and robust way I have found so far
Or youi can still do Python Object nodes
it's quite funny actually as other apps seem to start with such context (ICE Kinematics, C4D Xpresso, Maya Node Editor, Modo Schematic View, …) but Houdini completely omitted it
CHOPs are the closest, but the almost non-existent ability to work with complex data like matrices in straightforward way is making it extremely painful so rather than struggling in CHOPs I use SOPs most of the time
you can just do all your math on single AttribVOP or Wrangle, by importing transforms of all required objects through optransform() do the math, then addpoint() as many points as output objects you desire, populate them with attributes of transforms and parameters you want to overwrite then Geometry CHOP import this data to CHOPs and Export to objects
just make sure you don't create dependency loops
It's still very hacky, but the most flexible and robust way I have found so far
Or youi can still do Python Object nodes
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Chirimoya
- Member
- 30 posts
- Joined: Jan. 2015
- Offline
- Chirimoya
- Member
- 30 posts
- Joined: Jan. 2015
- Offline
- Chirimoya
- Member
- 30 posts
- Joined: Jan. 2015
- Offline
Ok, I have tried with VOPChops and AttribVOPs and managed to make it work both ways. However, the result is really slow when applied to a few objects so I'm looking for other ways to do this… Anybody else also having performance issues trying to drive kinematics from VOPs?
Tamte mentionned something about Python Object Nodes. Are those the Python nodes from SOP context? Is it possible to use python nodes at object level?
Tamte mentionned something about Python Object Nodes. Are those the Python nodes from SOP context? Is it possible to use python nodes at object level?
- meskefkn
- Member
- 1 posts
- Joined: March 2017
- Offline
- friedasparagus
- Member
- 402 posts
- Joined: June 2014
- Offline
Hi @Chirimoya,
well worth checking out some of sesi's work on constraints in chops, I had a quick rifle through $HFS/houdini/vex/include/chop_constraints.h and it's very interesting to see how that's been put together.
There's also some great vex functions in there for handling matrices, they get called in the default snippet in the Transform Wrangle in CHOPs.
Cheers
well worth checking out some of sesi's work on constraints in chops, I had a quick rifle through $HFS/houdini/vex/include/chop_constraints.h and it's very interesting to see how that's been put together.
There's also some great vex functions in there for handling matrices, they get called in the default snippet in the Transform Wrangle in CHOPs.
Cheers
Henry Dean
- cval
- Member
- 161 posts
- Joined: May 2015
- Offline
- mora
- Member
- 1 posts
- Joined: Aug. 2017
- Offline
-
- Quick Links