-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a "Scale Compensation" plug to both twistSpline & riderConstraint nodes. #29
Conversation
Both twistSpline and riderConstraint nodes got a new plug to handle global rig scaling internally.
Also added the missing template for the TwistTangent node, along with its outliner icon.
Thanks again for the PR! Also. I just asked around, and the way we handle this is we just parent all the rider nodes under the spline. |
I took a quick look this morning. I built a spline using Could you send me a file/script/something so I can see your issues better? |
Basically, all works fine like you said when you're in normalized mode and you only compensate for spread and normValue, but the moment you turn that off and use param mode and you start pinning, the parameter values need to be compensated too. If you don't compensate for global spread and you pin everything it looks alright when scaled, but when unpinned they shrink, while if you compensate for global spread they shoot in hyperspace 🙂 I will try and upload a file later! |
twist_spline_scaling_debug.zip There you go, hopefully I haven't forgotten anything in there. This shows what happens in various conditions:
I've put a bunch of attributes on the global control in order to easily swap modes on the rider constraint. I tried reloading the same file with the changes in this PR, and there's a case I don't seem to have caught (normalized + pinned), but most of it seems to work by just connecting the scale compensation and removing the extra multiply node I added for the global attributes. |
One small correction: the frames between 60 and 80, I actually don't expect that to work as it's just the blending between the two distribution modes, so I don't think it'll ever be necessary (they do stretch at normal scale too during the blend). |
I figured that, if we decide at some point to go on with this, the version should probably be bumped to 1.2.0 due to the functionality change, although one could always ignore the new plugs and keep on going with the old way of compensating without issues. I also updated the python script so when built it connects the two new attributes automatically! |
OK, I see what you're getting at. My quick testing definitely didn't cover that case. Thanks for finding that! I've got some changes I'm working on as well (a new single tangent node rather than the multi-node setup per tangent). |
Sounds great! Good timing as I'm also refactoring the tentacle component at work 😁 |
Checklist
Types of Changes
Proposed Changes
Here I am just making sure the rig is scalable by providing a couple of extra "Scale Compensation" attributes to the
twistSpline
andriderConstraint
nodes. I figured I could give it a try by replicating what I'm currently doing in the rigging tools at work to get the rig to scale correctly, which are compensating the spline parameters and the rider constraintglobalSpread
andnormalizedValue
. I haven't found any other way to make it work, so if there's any please let me know!But if not, I think this could cut down quite a few unnecessary nodes in a rig, as each spline param would otherwise need a separate multiply node for the param to scale up correctly.
I also took the chance to update the attribute templates with the new attribute, along with including the previously missing
twistTangent
template and the outliner's icon assignment. I hope you don't mind me locking some output parameters on the twistTangent, just as a visual distinction from the input ones; if you prefer to have them editable all the time I can roll back that change!Cheers!
EDIT: for the
riderConstraint
, this will work for both normalized and param-based modes!