Game Development Reference
In-Depth Information
if (s<ADmaxP) s=ADmaxP;
rot.y=((double)(ADminP-s)/(double)(ADminP-
ADmaxP))*(maxP-minP) + minP;
}
}
if (mcChannelB>-1){
c=mcChannelB & 0xF;
m=(mcChannelB & 0xF0)>>4;
adcon.SetMultiplexer(m);
s=adcon.GetChannel(c);
if (ADminB<ADmaxB){
if (s<ADminB) s=ADminB;
if (s>ADmaxB) s=ADmaxB;
rot.z=((double)(s-ADminB)/(double)(ADmaxB-
ADminB))*(maxB-minB) + minB;
}else{
if (s>ADminB) s=ADminB;
if (s<ADmaxB) s=ADmaxB;
rot.z=((double)(ADminB-s)/(double)(ADminB-
ADmaxB))*(maxB-minB) + minB;
}
}
}
A few cheap components and a little hard work and you will have a
simple input device for real-time performance. If you extend the software
to store the inputs during a capture session, then you will be able to replay
the capture later.
The same principles used for input on this real-time suit can be used in
tandem with keyframe animation. When setting the pose for a CG
character, it can sometimes be useful to have a real mannequin that you
can pose, then capture the joint angles. If we use friction joints on the suit
described, then this can form the basis of a mannequin input device for
setting model poses. Mannequin model input devices of this type were
used on the CGI mould-breaking film Jurassic Park .
Exchanging motion capture data
Any motion captured from a motion capture input device will need to be
supplied in a form suitable for your application. If you are using one of the
major CGI packages then you may find that you are able to input certain
Search Nedrilad ::




Custom Search