Search - User list
Full Version: Custom Kinematics Solver
Root » SI Users » Custom Kinematics Solver
Carioca
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
Carioca
Here is a file containing the IK solver exercise I was trying to implement. Should be easier to understand my question with an example
Stalkerx777
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]
Carioca
Thank you Stalkerx777,

I've looked at your file and I think it will help me. It is tricky indeed, but at least there seems to be a way and maybe we can automate it or make an easier workflow for it.

Thank you for sharing your method
tamte
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
Chirimoya
Thank you for your input Tamte. I too find it very strange that this context is missing, specially that it seems that everything is there in other contexts.
Chirimoya
Hi Tamte,

I'm trying to implement your method, but I get stuck very fast. Do you think you could post a very simple scene example? That would be very much appreciated

Do you know if optransform() returns a global or local matrix? The documentation does not specify it…

Cheers
Chirimoya
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?
meskefkn
I nned make RBG kinematic object help please

frame 1-20 sphre animated
frame 20+ sphre is dynamic and have power from frame 1-20
heal please
friedasparagus
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
cval
Hi @friedasparagus,

Yes, I haven't had time to look into h16 yet, but I know there is a new constraints framework in chops. Can't wait to try it!

Thanks for letting me know! Really appreciated!
mora
Hello,

Is there a way to adjust the size of the toolbar icons? I'm using a desktop of 4K and they're kind of small.
Houdini FX 16.0.640 version
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB