KineBody Pro

Movable 3D Human Model





KineBody Pro Explainer:

(last updated 240518)

Calibration for Background Image/Video Position


Users of KineBody Pro AnimTools are able to import images or videos into the background, behind the KineBody skeleton, to use as a template for creating poses, or to show the KineBody body interacting with its environment. Instructions for using those features are provided elsewhere (see links at bottom). This page provides supplemental content, explaining some of the finer points about how the size and position of background images/videos are measured.

The calibration of size and position for KineBody Pro background images and videos has undergone a major revision as of April, 2024. The primary focus of this page is to explain the motivation for these changes, and to describe some of the special properties of the new approach. The ideas here are explained in terms of a background image, but they apply equally as well to a background video.

To begin, consider the size of a screen image, i.e., its width and height. Images on a computer screen are usually measured in units of pixels, e.g., a 360x480 image means 360 pixels wide by 480 pixels tall. An image pixel is normally characterized as a smallest unit of image area that can have a single color. When a pixel is displayed on a computer screen, its size can depend on the physical screen resolution, and on the type of device (e.g. desktop vs tablet vs. phone); the relevant specification that relates to screen image size is the pixel density, typically expressed in pixels per inch (ppi). For example, the 360x480 image on a 240 ppi screen should display as 1.5 inches wide by 2 inches tall. When it comes to images on web pages or webapps, such as KineBody Pro, the image size may be different than that calculated using ppi. This comes about partially because a web designer can simply rescale an image to any desired size, but also because high density screens (over 100 ppi) tend to display the images using more than 1 physical pixel per image pixel; the relevant specification in this case is the ‘device pixel ratio (dpr)’, e.g. dpr = 1.5 means 2 adjacent image pixels are displayed using 3 physical pixels. The upshot of all this is that it’s generally not a good idea to rely on pixels as a measure of screen image size.

Another aspect of screen image size is how to measure the enlargement or shrinkage of an image, when an app provides the means to do so. Typically, the amount of enlargement or reduction is expressed as a ratio ( = current dimension/ original dimension), commonly called ‘zoom’, and expressed as a percentage.

Unfortunately, describing the size of background images in terms of zoom doesn’t work well in KineBody Pro, particularly when the ‘Lock to body’ feature is used. Briefly, the problem arises because an image ‘locked to body’ can be resized two different ways: after the image is loaded, it will typically be zoomed so it ‘fits well’, to match a human form in the image. Thereafter, the image will be automatically resized, by the ‘lock to body’ mechanism, whenever the body distance is changed.

So, for example: An image locked to the body could appear to be 80% of its original size (in pixels), but that value could be the product of two independent operations:

  • An original enlargement, by a factor of 2, to fit the skeleton,
  • A change in body distance, for instance from 2 to 5 meters, a factor of 2.5. To compensate, the image will be resized to ~ 1/ 2.5 or 0.4, of its previous value.
  • The final size is the product of these factors: 2 * 0.4 = 0.8.
  • Clearly, the same result could have been derived from any two factors that multiply to 0.8.

    The primary purpose of the background image calibration is to allow you to replicate the size and position of the background image, at some future time. As shown by the example above, a single factor (0.8) isn't sufficient to replicate the image size; instead, it seems necessary to keep track of two different ‘size’ factors.

    KineBody Pro avoids this problem by describing the size of a background image in terms of just one factor, the projected image height. To understand this unusual calibration, it helps to regard the background image as ‘inserted’ into the 3D KineBody viewing space, by projecting the image onto a plane parallel to the screen, located at a virtual distance equal to that of the KineBody body center (which is located in the middle of the ribcage). Once projected, the image remains in that plane, but it can be resized (i.e. zoomed), and shifted within the plane. Also, the projected image can be understood to have physical height and width, measured in meters. For example, if the screen image is 0.1m tall, and the screen is 1m distant (from the user’s eye), then projecting that image onto a plane at 20m (also from the user’s eye), will yield a projected image height of 2.0m.

    Another way to get to the same result is to compare the image size to the KineBody body height, on the screen. Suppose the image height when initially loaded into KineBody Pro appears to be about 1.25 times that of the KineBody female skeleton physical height (which is approximately 1.6m, standing upright), then the projected image height will be about 1.25* 1.6m = 2.0 m .

    By using projected image height as the ‘image size’, several useful properties emerge: For one, the projected image height is completely independent of the original image size in pixels. It's also independent of the contents of the image: if the image contains a depiction of a posed human form, that human may fill the space of the image, or it could be miniscule, or, the image may contain just a portion a human body, e.g., a hand. Regardless of the contents, if the projected image stands as tall as the KineBody female skeleton (standing upright), then its projected image height is that same value: (about) 1.6m.

    Perhaps the most useful property is that, when locked to the body, the projected image height remains constant, when the body distance changes. Thus, when you record the projected image height for future use, you don’t have to worry about the body distance.

    Just as the background image can be regarded as having physical height and width, when projected upon a plane at body distance, so too can any displacement coordinates, i.e. horizontal and vertical offsets of the image, within that plane. For background images in KineBody Pro, the offsets are measured from the KineBody body center (= the intersection of body rotation axes, located in middle ribcage) to the center of the image (i.e., half width and half height, from the lower left corner of the image).

    By defining the horizontal & vertical offsets this way, we obtain another useful property, namely: the horizontal & vertical values remain constant, when the ‘Lock to body’ mechanism is enabled, and you move the body horizontally or vertically ( via the joystick, only, at present).

    One last property of the background image size and position calibration, involves the ‘interaction’ of those values: when you enlarge or shrink the image, with the body at a fixed distance, the center of the image remains fixed, in terms of its horizontal & vertical offsets. Ultimately, this characteristic allows you to change the size and position parameters independently, and so helps support the intuitive notion that the background image is embedded into the physical space.

    In conclusion: the new calibration for size & position of background images & videos serves to circumvent various difficulties that arise from using conventional measures of image size.

     
    Related information