Skip to content
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

Add an euler filter to the cv-orient twists so we don't get unintended flipping #35

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

tbttfox
Copy link
Member

@tbttfox tbttfox commented Aug 22, 2024

If all of the CV's have 'useOrient' set to 1, and the first and last CV's twist past 180deg relative to each other, and the intermediate CV's are twisted to show a bit of blend, we can get flipping to show up randomly between the intermediate CV's.

The best solution I had is to run an Euler filter down the twists that are controlled by the CV orientation.

@tbttfox
Copy link
Member Author

tbttfox commented Aug 22, 2024

If you run this, and then twist the last cv, you can see the flipping.

makeTwistSpline('tmp', 5, numJoints=0, spread=3.0)
cmds.setAttr("Ctrl_X_tmpSpline_Part02.rx", -53)
cmds.setAttr("Ctrl_X_tmpSpline_Part03.rx", -162)
cmds.setAttr("Ctrl_X_tmpSpline_Part04.rx", -197)
cmds.setAttr("Ctrl_X_tmpSpline_Part05.rx", -310)
spline = r'Rig_X_tmpSpline_DrvShape'
cmds.setAttr(f"{spline}.debugDisplay", 1)
for i in range(5):
    cmds.setAttr(f"{spline}.vertexData[{i}].useOrient", 1)

@tbttfox tbttfox merged commit b9d2a77 into master Aug 22, 2024
14 checks passed
@tbttfox tbttfox deleted the tyler/euler-filter-orients branch August 22, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant