Line 1: | Line 1: | ||
====INTERACTIVE PARTICLES(by Xiaomei, Joanna, Sandra)=== | ====INTERACTIVE PARTICLES(by Xiaomei, Joanna, Sandra)=== | ||
special thanks: Johannes & Tobias | special thanks: Johannes & Tobias | ||
[[:File:Documentation_introduction_performance_platform_xiaomeixie_118707.pdf]] | |||
===coding part (xiaomei xie‘s interpretation)=== | ===coding part (xiaomei xie‘s interpretation)=== |
Revision as of 08:32, 3 September 2018
=INTERACTIVE PARTICLES(by Xiaomei, Joanna, Sandra)
special thanks: Johannes & Tobias File:Documentation_introduction_performance_platform_xiaomeixie_118707.pdf
coding part (xiaomei xie‘s interpretation)
Our interactive particle system project is based on the motion tracking system to obtain the data of hands with the skeleton movements of the visitors to manipulate the effects of the particle system (including Head, LeftHand, LeftForArm, RightHand, RightForArm), in order to achieve this goal, we are starting decoding our programming part step by step: First of all, we know that the data of the above parts of the skeleton obtained from the motion tracking system is just one point. The two parts of the hands constitute two vectors, then the head data is used as the connection point of the hands. if we want to realize the effect of repelling away between particles and connected vector, We must keep the distance between each particle in the particle system to the two vectors bigger than a certain value, maybe the radius of the ellipse(point). Therefore, we decompose the two vectors into points separated by a certain distance and decode this into the distance from particles to these points which cannot smaller than a specific value.
The first step: a vector, assuming that the fixed point and the point where the mouse is located constitute a vector, and find the functional relationship of the vector: y = (a * x) + b; At the same time, a certain number of point number (5) are set on the line.
the gif effect:
The second step: two vectors, adding a random moving particle system. The distance between each point on the fixed vector, the number of points on the two vectors is represented by a variable, that is, the total length of the vector divided by the radius of the circle,which can be write in code like this: ellipseNum = distOfLine / ellipseSize; in this case, the particles can be guaranteed to be repelled in the entire line. The state of the repel, and the number of points changes as the length of the vector changes. The final effect of this step is very close to being expressed by the skeleton.
the gif effect:
The third step: Adding the data of the motion tracking system, skeleton, the key point is the value of the point where the above fixed point is replaced by the skeleton, important syntax to apply the trackingsystem data(RightForeArm as example): RightForeArm.setup(skeletonName, "blender", "RightForeArm", "vector"); and the second is to pay attention to the data name from the motion tracking system,Read the name of the skeleton (usually something like "snapPoseSkeleton-5"),Exchange the name of the skeleton in the code,then it will work. (mouse test effect)