Simple IK snapping does not work

Issue #1763 resolved
Rakete created an issue

When I create a simple IK rig then the foot snapping does not work with the latest reverse foot changes. If you change from IK to FK it works, but if you pose the FK rig and try to snap the IK leg to that pose, it won’t work. This should be fairly obvious so I am not attaching anything for that.

When I create a simple IK rig without the reverse foot pose it snapping works, but there is a constant foot drift when I switch between FK and IK while the leg is posed. This seems to only happen with a custom figure and not the Genesis base figure though.

What I mean by foot drift is that the foot always moves a little bit when I use bpy.ops.daz.snap_simple_ik(prefix="l", type="Leg", pole="lKnee"). I’ll attach a video showing the issue.

There is also a similar issues that the poles drift when I enable them. I kind of think it would be ok to not update the poles at all when snapping.

Comments (17)

  1. Alessandro Padovani

    1.7.2.1838

    bug. ik snap. Yes I can confirm the issue here.

    bug. fk Y locks. I see for fk bones Y is not locked in many places. We need to lock Y on bend bones, even if they are quaternions, plus on fingers/toes and pectorals and collars, these bones should not twist with fk posing.

    Personally I don’t use snapping as I always pose with ik, so these issues don’t apply to my workflow.

  2. Thomas Larsson repo owner

    In order to flip the heel and tarsal ik bones, one must add hidden bones with the same rest pose and parented to the FK foot bone. To snap the ik bones we would then set their matrices in pose space to equal the hidden bones'. That should be doable, but I’m concerned that simple ik is not simple anymore.

  3. Rakete reporter

    Personally I don’t really care too much about the reverse foot thing, though I did think it would be nice if there would be a custom made IK rig for diffeo that is both easy to pose, but can also be used with loaded poses from daz easily. And more capabilities is better, so from that perspective I really like the reverse foot pose thing. But I guess making the simple IK rig more complex also makes it more difficult to use daz poses on it again, kind of defeating the purpose (at least for me).

    The snapping feature however I think is pretty crucial, even for a very simple IK rig, so that would be important to me that that works reliably. So I can apply poses from daz to the FK rig, then snap the IK bones to that pose and continue animating using the IK rig.

  4. Alessandro Padovani

    As for me you can do what you want with simple ik. That is, I do my own rigs and finally learned a little python and blender api to script what I need. Among the rigs available in diffeomorphic the simple ik is what I like most, because it can be easily modified on needs, and also works wonderful with pose presets, though I don’t use that either.

    Personally I believe the reverse foot is nothing complex and quite essential for animation, I always make and use it in my rigs. It’s less useful for posing.

  5. Thomas Larsson repo owner

    IK snapping is better now. Not perfect due to limitations, but the worst glitches are gone. FK snapping should be perfect though.

  6. Alessandro Padovani

    commit 507eac8

    bug. poles. Poles are not snapped, ik poles should snap to fk elbows/knees.

    bug. snap interpolation. You may want to use “constant interpolation“ for the ik influence, otherwise bezier is used and instead of snapping you get a smooth transition, that’s not what the animator usually wants, that’s why it’s called “snapping“. For the same reason you may want to use booleans in the interface. Same for mhx.

    bug. Y locks. Again, Y should be locked for fk bones which are not supposed to twist, as explained above.

    Then again I don’t use anymore the simple ik myself, so it’s fine for me if for some reason the bugs above it’s the intended behavior. Let me know.

  7. Thomas Larsson repo owner

    Y locks are fixed, already when the figure is imported in the first place. I will look at the other issue laters, but will be gone until Tuesday.

  8. Alessandro Padovani

    commit 76bad77

    bug. Y locks. Locks for the daz rig and for the ik rig are different things. The daz rig makes sense to be the same as daz studio. The ik rig should provide locks for animation, hence lock Y on fk bones which are not supposed to twist in animation. It’s more locks than daz studio does on the daz rig.

    Apart bend bones, we should lock Y on fingers/toes and pectorals and collars.

    bug. quaternions. Quaternions should always be used in ik rigs, otherwise posing doesn’t work fine in animation due to gimbal locks. For this reason it doesn’t make sense to have a quaternion option in the global settings. That is, the daz rig should always load with euler to be the same as daz studio, then quaternions should always be added when converting to simple ik/mhx.

    bug. global settings. It seems the last commit overwrote my global settings and I had to set them back to my preference. If this is the intended behavior, then it may make sense to provide “save/load global settings“ buttons to allow the user saving and retrieving his own settings.

    bug. global settings. update. It turns out that the settings are saved in a “daz importer“ folder, but it seems there’s no way to choose this location. Perhaps it could use the same folder as “path to output errors“, or we could add a “path to global settings“ option. Then the settings reverted to factory because I deleted the “daz importer“ folder so this is my fault, but would be useful to choose where the settings are saved.

    Thank you for your attention, have a nice weekend.

  9. Rakete reporter

    Thanks, works much better now.

    Two problems I’ve seen, first is when I create the simple IK rig without reverse foot pose, then snapping FK->IK raises an error. Not really a problem though since I can just enable the reverse foot posing:

    The other is more serious I think, I can get the rig into a state where its broken and for some reason I can’t reset it to a sensible state anymore. Kind of wondering how that is even possible:

  10. Rakete reporter

    Attached a video showing how to get the squiggly arms problem, the problem itself is kind of fine since you have to really do some weird stuff to make it happen, but there there needs to be a way to just reset it.

    I actually figured its the locking that makes it so it can’t be reset. So you have to enable all layers and then unlock all bones and then you can reset that.

  11. Thomas Larsson repo owner

    Rakete:

    The crash should be gone in the last commit.

    This happens when a locked channel is set to a non-zero value. It cannot be cleared in the viewport because it is locked. This is quite annoying but it is how Blender works and has nothing to do with the plugin. You can set the locked rotation to zero in the bone panel. DAZ Runtime > Locks And Limits > Impose Locks and Limits wiill clear all locked channels.

  12. Thomas Larsson repo owner

    Alessandro:

    Extra locks: Simple IK was supposed to be the original daz rig with added IK. Adding extra locks would turn it into something else. Adding locks to mhx makes more sense, will think about that.

    Quaternions: With the present system you can have both quaternions and eulers for both the daz and ik rigs. Forcing the daz rig to use eulers and the ik rigs to use quats seems like a regression to me. Not everyone is comfortable with quaternions.

    Global settings: The location of the global settings file is hardwired because it is the first place where the plugin looks. I don’t see how the plugin could find the settings file otherwise. Then the locations of all other files are stored in the settings file. There might be a better place, e.g. inside the plugin itself, but then I’m not sure that the user always has write permissions there.

    Linear interpolation: Snapping now changes the interpolation mode for the ik influence properties to linear.

  13. Alessandro Padovani

    Commit 69f4009.

    I don’t agree on extra locks and quaternions, but again I don’t use the rigs myself so it’s fine for me if this is the intended behavior. I was just reporting things that are wrong in my opinion. Thank you for your attention.

    As for the global settings I’ll check the code and change the location there then, if this is the only way. Thank you.

    bug. snap interpolation. You have to change the ik influence to “constant“, not to “linear“. Linear will not snap. Unless again you want it this way that’s fine for me.

  14. Log in to comment