# Animate Bones and Markers : Check Your Animation with MayaCams

## **\*\*UNDER CONSTRUCTION\*\*** <a href="#checkyouranimationwithmayacams-underconstruction" id="checkyouranimationwithmayacams-underconstruction"></a>

### Import x-ray videos into Maya with correct x-ray camera perspectives <a href="#checkyouranimationwithmayacams-importx-rayvideosintomayawithcorrectx-raycameraperspectives" id="checkyouranimationwithmayacams-importx-rayvideosintomayawithcorrectx-raycameraperspectives"></a>

1. Open a new scene in Maya<br>
2. Click **Xcam** in the XROMM maya tool shelf. A window will appear:\
   ![](/files/-M-QIYTkp_wWp01Ex9La)
3. Browse or type your MayaCam file in the MayaCam File Path box. This file likely have a name similar to \[ *Cube\_Before/After\_CamNumber\_ImageNumber* ]Mayacam.csv. This file will tell Maya how to create a camera that has the same alignment as the Xray camera did in the actual setup.
4. For the optional **Image Path**, Browse to Find the appropriate undistorted image or image sequence. This is what will be shown  in frame when looking through the aligned Xray camera.&#x20;
   1. If you are checking calibration, this file will be the undistorted cube image. Leave **Image sequence** unchecked.
   2. If you are checking digitization or animations, this file will be the first in the sequence of undistorted .tif images of created from the Xray video. As long as all of the .tif files in the sequence are in a separate folder, you only need to select the first one. Check **Image Sequence**, and Maya will find the other files.
5. Name your camera (perhaps Xcam1)
6. Click import. The panel display will change to Xcam1 and Hardware Texturing will be selected automatically (as of Maya XROMM Tools 2.1.6).
7. Repeat for Xcam2

If Xcam camera panel is not automatically selected,

1. Close the XCam window
2. Select Panels -> Perspective -> xrayCam1Shape1
3. On the active camera window pane(s),
   * Select Shading -> Smooth Shade All
   * Select Hardware Texturing

If the images do not display, try this:

1. Click on the image frame (will be called Xcam1\_Plane).
   1. This can be done either in the main window, or through Window -> Hypergraph: Heirarchy, and then clicking on Xcam1\_Plane.
2. If the Attribute Editor is not open on the left side of your screen, open it by clicking on Window ---> Attribute Editor
3. Select the tab Xcam1lambert; you may have to click on a black arrow next to tabs for popup menu of more tabs
4. Click on the black arrow next to Color
   1. If you are working with a single image, such as a calibration cube image, u**ncheck** the Use Image Sequence box
   2. If you are working with an image sequence such as an Xray video, **uncheck** and **recheck** the Use Image Sequence box
5. Repeat steps 1-11 for second camera
6. make sure that the end time of animation range and the end time of playback range match the number of images in your sequence. If your image sequence does not start at 1, make sure the start and end times of the animation and playback range match the starting and ending numbers of your image sequence.

## **\*\*UNDER CONSTRUCTION\*\*** <a href="#checkyouranimationwithmayacams-underconstruction-.1" id="checkyouranimationwithmayacams-underconstruction-.1"></a>

### Understanding Xray Camera Setups <a href="#checkyouranimationwithmayacams-understandingxraycamerasetups" id="checkyouranimationwithmayacams-understandingxraycamerasetups"></a>

Once you have imported one or more Xray cameras into Maya, you can use them to check that your data makes sense.&#x20;

* To look through either of the Xray cameras, select Panels -> Perspective -> \[Desired camera]
* When looking through these perspectives, imported Xray marker coordinates, cube marker coordinates, animation objects etc. should line up with the Xray behind them. The following are examples of what digitized markers and animated bones should look like.\
  &#x20;\
  &#x20;
* ![(minus)](/files/-M-QIYV9RI3R4IPZUljn) **If the cube marker coordinates, animation objects etc. don't line up with the Xray image behind them, there is a mistake somewhere. You should go back and check that you have done everything correctly so far.** ![(minus)](/files/-M-QIYV9RI3R4IPZUljn)
* Looking through the Persp camera (Panels -> Perspective -> Persp) you should also be able to toggle around the screen and see the whole scene as it was set up in the Xray lab. The Xray emitters will be indicated by little green camera animations, and the image intensifiers are where the Xray images appear.
* ![(minus)](/files/-M-QIYV9RI3R4IPZUljn) **If the scene seems incorrect (Especially if the cube marker coordinates, animation objects etc. are behind the Xray plane, rather than between the Xray camera and the Xray image) it is likely that something went wrong, and you should check that you have done everything correctly so far.**  ![(minus)](/files/-M-QIYV9RI3R4IPZUljn)
* If you imported an animation or image sequence, press play in the lower right corner of the screen to see the whole animation (orange circle). The cube marker coordinates, animation objects, etc. should continue to line up with the Xray Camera behind them.
  1. The animation range you wish to see must fit within the time in the Blue and Yellow boxes, where Blue is the start frame and Yellow is the end frame.
  2. Understanding how to play your animation
     1. The Green and Red boxes are the whole range that the animation sequence can currently be played from.&#x20;
     2. To play only part of that, you can change the numbers in the Blue and Yellow boxes.
     3. You can also drag the Purple dots to change the current segment being played (Blue and Yellow boxes).&#x20;
     4. The white number 90 and the 90 in the box indicate the current frame.\
        &#x20;
* To change your view, click **PSDR** in the XROMM shelf.
  * To zoom in and out, click and hold the **left mouse button** and move your mouse left and right.
  * To pan, click and hold **ctrl + left mouse button**, and move the mouse left, right, up, or down.
  * To change the transparency of a bone model or markers, click and hold the **middle mouse button**, and move the mouse left and right.
* If you wish to view the scene through both Xray Cameras at once,
  * Go to Panels -> Panel Editor -> Edit Layouts -> two planes side by side
  * Use Panels -> Perspective and select one of the two x-ray cams for each panel.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.brown.edu/xromm/animate-bones-and-markers/xromm-check-your-animation-with-mayacams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
