问题标签 [cyclic-coordinate-descent]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - Endless rotating in CCD
Heya I'm currently working on my Degree Final year project, which is 2 part A) Creating a good 3D Engine and B) within it implement an IK System and evaluate a couple of types of IK solving. CCD (Cyclic-Coordinate Descent) is where I have begun and I have run into a problem. I've used lots of sources to try and get to grips with IK's, and specifically when it comes to CCD I have used Source Code as a base available here : http://www.darwin3d.com/gdm1998.htm
Before I start posting my Source code, I'm hoping that my problem is something obvious or simple that someone has come across before. Here is a short video showing the problem : http://www.youtube.com/watch?v=XtU8rFR-DuE
Obviously it is not right, The IK spins off and generally seems to get confused alot! If the target stays still then it converges fine but even the smallest movement (which happens alot in this system as the Target is driven by IR based Motion capture in my Engine) and it seems to recalculate and begin the spinning again.
Also when the Joint is out of range you would assume that following CCD technique, the Joints would all point at the Target and just hit the Loop limit but you would still have the IK aim in the right way, but as is evident in the video if the target is out of range the IK again just sits iterating away and spinning.
If anyone can help I would Really! appreciate it. and if any more information is needed (code etc) then feel free to ask.
Thanks in advance Chris
c# - 如何在 CCD 中限制关节旋转
我在数学上拼命挣扎,试图改进我一直在尝试在 Unity 中创建 IK 解决方案。
我做了一个简单的 CCD 算法,其行为符合预期:https ://www.youtube.com/watch?v=tZvdZGUxbbc
但是当我尝试向关节角度添加约束时,行为是不准确和扭曲的:https ://www.youtube.com/watch?v=k1YY9KqqaYY
目前,我有一个 for 循环,它遍历链中的所有关节,而未达到目标且当前尝试<尝试阈值。
一旦计算出每个关节的校正旋转,我将其应用于关节[i]。然后我检查每个关节的旋转,将其固定在最小-最大范围内。
这是应用旋转的代码,然后检查旋转限制:
如第二个视频所示,结果很差。
任何人都可以提出解决方案,并可能解释为什么这不起作用?
更新,更正了粘贴代码中的错字。