<p>I help maintain an open-source extension for <a href="https://code.visualstudio.com/" rel="nofollow noreferrer">VSCode</a> called <a href="https://marketplace.visualstudio.com/items?itemName=cesium.gltf-vscode" rel="nofollow noreferrer">glTF Tools</a>.</p>
<p>Find the sampler for your animation. The <code>input</code> values will point to a list of times, and <code>output</code> will point to a list of values, likely quaternion values if this is rotation.</p>
<p><a href="https://i.sstatic.net/S9qTZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/S9qTZ.png" alt="screenshot of sampler" /></a></p>
<p>In the above case, you might place the cursor on the <code>7</code> (the output accessor index), and press the hotkey F12 to find the definition of accessor index 7.</p>
<p><a href="https://i.sstatic.net/31T44.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/31T44.png" alt="screenshot of accessor 7" /></a></p>
<p>Above, VSCode's JSON &quot;Breadcrumbs&quot; (the thin top row) are showing that the cursor has navigated to the accessor in question.  Now we can ask VSCode to decode the raw data here with the <code>glTF: Inspect Data</code> command, by default bound to the hotkey ALT + D.  Pressing this key should open the inspector.</p>
<p><a href="https://i.sstatic.net/AjhYA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AjhYA.png" alt="screenshot of decoded data" /></a></p>
<p>Ah well, here you can see I've picked a very simple rotation with two fairly boring quaternion keyframe values.  But if you have a more complicated list of rotation keyframes, the output here will be longer and more varied.  You may right-click on a row to copy just the row's value, or copy the entire decoded data as plain text (for pasting into a spreadsheet or text file, for example).</p>
<p>The above method works for all kinds of glTF data beyond just animations.  But there's another method specific to animations, two commands <code>glTF: Import animation</code> and <code>glTF: Export animation</code>.  These attempt to pull the raw data directly into the JSON editor for editing, but the resulting file is not valid glTF during such edits.  If you take this alternate route, remember to export the animation again when done editing.</p>
<p>Give the inspector a try first.  Good luck!</p>

CC BY-SA 4.0
2022-11-12T17:02:59.677Z
2022-11-12T17:02:59.677Z
emackey
<p>I am trying to load gltf data onto an engine I am making and I am noticing that something is wrong with the rotations. I want to be able to see the raw numeric values of the animation data in the gltf source file to compare against what my code is constructing but I cannot find anything.</p>
<p>Gestaltor doesn't seem to show the actual data, and online viewers and validators just tell you if the data is malformed or not, they don't show it.</p>

<mesh><animation><gltf>
Inspecting gltf animation data
Makogan
# Inspecting gltf animation data

(Asked by: username_0 on 2022-11-11)

I am trying to load gltf data onto an engine I am making and I am noticing that something is wrong with the rotations. I want to be able to see the raw numeric values of the animation data in the gltf source file to compare against what my code is constructing but I cannot find anything.

Gestaltor doesn't seem to show the actual data, and online viewers and validators just tell you if the data is malformed or not, they don't show it.

**Tags:** mesh, animation, gltf


---

## 1 answers

### Answer by username_1 on 2022-11-12. Score: 2

I help maintain an open-source extension for [VSCode](https://code.visualstudio.com/) called [glTF Tools](https://marketplace.visualstudio.com/items?itemName=cesium.gltf-vscode).

Find the sampler for your animation. The `input` values will point to a list of times, and `output` will point to a list of values, likely quaternion values if this is rotation.

[![screenshot of sampler](https://i.sstatic.net/S9qTZ.png)](https://i.sstatic.net/S9qTZ.png)

In the above case, you might place the cursor on the `7` (the output accessor index), and press the hotkey F12 to find the definition of accessor index 7.

[![screenshot of accessor 7](https://i.sstatic.net/31T44.png)](https://i.sstatic.net/31T44.png)

Above, VSCode's JSON "Breadcrumbs" (the thin top row) are showing that the cursor has navigated to the accessor in question. Now we can ask VSCode to decode the raw data here with the `glTF: Inspect Data` command, by default bound to the hotkey ALT + D. Pressing this key should open the inspector.

[![screenshot of decoded data](https://i.sstatic.net/AjhYA.png)](https://i.sstatic.net/AjhYA.png)

Ah well, here you can see I've picked a very simple rotation with two fairly boring quaternion keyframe values. But if you have a more complicated list of rotation keyframes, the output here will be longer and more varied. You may right-click on a row to copy just the row's value, or copy the entire decoded data as plain text (for pasting into a spreadsheet or text file, for example).

The above method works for all kinds of glTF data beyond just animations. But there's another method specific to animations, two commands `glTF: Import animation` and `glTF: Export animation`. These attempt to pull the raw data directly into the JSON editor for editing, but the resulting file is not valid glTF during such edits. If you take this alternate route, remember to export the animation again when done editing.

Give the inspector a try first. Good luck!


---

