Jump to content

Blend Op Primary Transforms


Mcronin

Recommended Posts

OK, the the Blend Op apparently has primary and secondary transforms, how do I get at the primary ones? blend/tx seems to point at the secondary. The primary transforms are the result of the blend operation, and those are the ones I need. I'd like to use the Blend Op and I'm only interested in three specific channels so parenting is out. Anyone know how to reference them?

Link to comment
Share on other sites

You can use the expressions "origin" and "originoffset" along with a null-object at the world-origin. Since the function origin only returns the values for translation and rotation, one has to do some complicated stuff with the originoffset-expression to compute the scale-values. Here is it for scaleX:

vlength(vector3(originoffset("Origin", "[0,0,0]", "blend1", "[1,0,0]", "TX"), originoffset("Origin", "[0,0,0]", "blend1", "[1,0,0]", "TY"), originoffset("Origin", "[0,0,0]", "blend1", "[1,0,0]", "TZ"))-vtorigin("Origin", "blend1"))

Unfortunately there is no vtoriginoffset, which would make this expression much easier.

BlendedButNotParented.hip

Link to comment
Share on other sites

I'm sorry, yeah, the Blend Obj. Thanks for the file Frank, but I'm getting a failed to load error with it. What version is it from?

Maybe a better explanation of what I'm trying to do will help.

I'm trying to set something up, Kinda like the IK/FK blending, but what this will do is provide a hud slider that will allow an animator to blend between an automatic handle and a handle they can key. I figure that the sequence blend is a good way to go, but I think I have to reference the channels because I don't want to blend them all. The user handle allows the user to control all transform channels, the automatic handle controls only three. I don't want to blend them all, the blend type requires two sliders and it "pops", so I would like to use sequence blend, but no matter how I parent or reference the channels I know how to access, it's just not right. I get double transforms, half transforms, and/or blending between channels I don't want. I don't mind using expressions, I just don't want to use some kludge like multiplying channels by .5 or 2.

I'll take a look at origin and originoffset. I only need tranaslate and rotate channels so it might work out. I'm not particularly good with CHOPs but I'm wondering if maybe there's a way to do it there. What do you guys think?

Link to comment
Share on other sites

I'm using Houdini 5.5.305. Don't know, why you can't open it. I didn't do anything weired. Just expressions.

But I have another idea: why don't you use the blend-operation of the OP and set the "Weight 1" to 1-ch("blendw2"). This way you emulate the behavior of the sequence-mode with 2 inputs. But using this mode you are able to turn off the transform-flags, you are not interrested in. Now it should be possible to parent your blended node to the blend-OP.

In case you don't want or can't do so, here are the expressions I used for translation and rotation:

translation:
origin("Origin", "blend1", "TX")
origin("Origin", "blend1", "TY")
origin("Origin", "blend1", "TZ")
rotation:
origin("Origin", "blend1", "RX")
origin("Origin", "blend1", "RY")
origin("Origin", "blend1", "RZ")

Link to comment
Share on other sites

I'd stick to the Sequence Blend mode within the Blend Object so that you can make use of "Shortest Path Rotation Blending". After that you can use the expressions as mentioned by Frank to get at the result. If you need more complex control of the resulting transform, then I would recommend using the Object CHOP.

Link to comment
Share on other sites

Thaks guys, if this works out it should be pretty cool! Thanks for all the help.

BTW I wasn't sure if this was the right forum to put this in. If I have more questions like this should I put them in General or Character or put them here?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...