Closed daniekpo closed 3 years ago
The local variables in the constraint implementations are too numerous and complicated to provide meaningful documentation for beyond referring you to the math in the paper, but the variables that hold the simulation state follow a general pattern:
Prefixes:
x
the center position of a sphere/particler
the radius of a sphere/particleq
the quaternion representing the frame associated with a capsule/pill primitiveX
the total "state" of the simulation at a framewx
, wr
, wq
the solver weights associated with particular degrees of freedomb
bone transformsSuffixes:
p
the value at the previous framei
the value at the initial frameOther:
xa
and qa
flags marking certain primitives as "kinematic", i.e. not allowed to be modified by the solver.Ok. That's helpful. I'll refer to the paper as well. Thanks.
Hi, I have problem in understanding the code . Because in the "Viper" part, ' a ','b' and 'c' appear frequently. I am not sure what is the meaning of this parameter. Could you give me some hints over this. Looking forward to your reply. Thank you.
a
, b
, and c
will usually refer to the indices of the elements that a particular constraint acts on. For example in C_distance_solve
, a
and b
are the indices of the two spheres which are being constrained to have a particular separation.
Thank you for your reply. I still have a question for the "Mesh::fromPill" part. I am not sure whether this part is used to create the pills or do another thing? Thank you.
The fromPill
function can be used to create a triangle mesh that has the same shape as a given pill. I don't think we are actually using it though.
Thank you!
Hi, I have a question that the "pills" data contains the position of the triangle mesh points or any other information? Thank you.
Generally, a "pill" primitive consists of two positions and two radii, which together define two spheres. In the simulation code, each pill is also associated with a quaternion which makes it possible to model twisting effects. You can see how the pills are initialized in the simulation here.
Thank you for your clarification. And I wonder the "group" means the combination of pills? Looking forward to your reply.
The group id is used to disable self-collision between pills in the same object.
Thank you!
I'm working on a project that could benefit from Viper. We'd like to use Viper in our research project but I'm having trouble understanding your code since there are so many single-name variables with no documentation. Is there a naming convention that can help me understand the codebase better?
There seems to be some consistency with the two-letters variable names though, but I'm still not sure how to interpret those or what they represent.