11 Replies Latest reply on Feb 10, 2009 8:04 AM by Mylenium

    Using logged measurments to create a HUD overlay

      Dear Sirs

      I would like to present test data as a moving overlay on a video stream. This overlay would in effect be like a head-up-display (HUD).

      I can see that in AE graphics can be scripted to move - the clock hand example - but how would I change a text string or number to display the real data syncronised to the video frame number.

      Thank you.

      ~Carl
        • 1. Re: Using logged measurments to create a HUD overlay
          Andrew Yoole MVP & Adobe Community Professional
          If the data exists within AE, like composition timecode, rotation angle or spatial position data, then fairly simple expressions can be used to link those parameters to text layers.

          If the data is to be sourced from external sources, such as a text file or database, then more elaborate scripting and/or expressions will be required.

          What kind of data are you planning to use?
          • 2. Re: Using logged measurments to create a HUD overlay
            Level 1
            The data will likely be from a text file, exported from the data logger. It will include vehicle speed, pitch, roll and yaw angles and accelerations. The main feature is to introduce an artificial horizon where the video does not provide such reference features. In addition it is important to display the roll angle for example in tenths of a degree. The text needs to be clear and the numbers change smoothly.

            There is software available - Dewesoft (for example)- that processes both video and data together but uses the video as reference only. I would like to look more closely at what the video itself can communicate all be it with a little assistance from lines, scales and values.

            ~Carl
            • 3. Re: Using logged measurments to create a HUD overlay
              A. Cobb Level 3
              Can you post a sample of the data output?
              • 4. Re: Using logged measurments to create a HUD overlay
                Navarro Parker Level 3
                Have you seen Red Giant Datamator? I may help you animate your data.
                • 5. Re: Using logged measurments to create a HUD overlay
                  Level 1
                  We have yet to do the testing but below is a text file output with typical variables listed and layout. There would also be a column for the video frame numbers.

                  Data info
                  File name: C:\Data\Example_Drive01.dsd
                  Start time: 09/10/2003 21:27:46.812
                  Number of channels: 4
                  Sample rate: 100
                  Reduced rate: 0.5

                  Data1
                  Time STWH_ANGLE; MAX STWH_SIGN; MAX V_SPEED; MAX GAS_PEDAL; MAX
                  s deg. km/h %
                  09/10/2003 21:27:46.812.0 19.424999 0 88.32 0
                  09/10/2003 21:27:47.312.0 23.975 0 85.759995 0
                  09/10/2003 21:27:47.812.0 25.375 0 83.199997 0
                  09/10/2003 21:27:48.312.0 37.450001 0 80.639999 0
                  09/10/2003 21:27:48.812.0 43.399998 0 78.080002 0
                  09/10/2003 21:27:49.312.0 43.399998 0 75.519997 26.4
                  09/10/2003 21:27:49.812.0 32.899998 0 75.519997 27.200001
                  09/10/2003 21:27:50.312.0 21 0 74.239998 46.400002
                  09/10/2003 21:27:50.812.0 10.5 0 74.239998 46.400002
                  09/10/2003 21:27:51.312.0 10.5 1 74.239998 46
                  09/10/2003 21:27:51.812.0 25.375 1 75.519997 35.200001
                  09/10/2003 21:27:52.312.0 37.450001 1 75.519997 17.200001
                  09/10/2003 21:27:52.812.0 42 1 74.239998 7.2000003
                  09/10/2003 21:27:53.312.0 40.424999 1 74.239998 0
                  09/10/2003 21:27:53.812.0 35.875 1 72.959999 0
                  09/10/2003 21:27:54.312.0 35.875 1 71.68 0
                  09/10/2003 21:27:54.812.0 28.35 1 70.400002 0
                  09/10/2003 21:27:55.312.0 22.4 1 69.119995 0
                  09/10/2003 21:27:55.812.0 50.924999 0 67.839996 0
                  09/10/2003 21:27:56.312.0 67.375 0 66.559998 25.200001
                  09/10/2003 21:27:56.812.0 71.924995 0 65.279999 26
                  09/10/2003 21:27:57.312.0 71.924995 0 65.279999 11.6
                  09/10/2003 21:27:57.812.0 71.924995 0 64 14
                  09/10/2003 21:27:58.312.0 65.974998 0 62.719997 30
                  09/10/2003 21:27:58.812.0 47.950001 0 64 33.200001
                  09/10/2003 21:27:59.312.0 40.424999 0 65.279999 33.600002
                  09/10/2003 21:27:59.812.0 55.474998 0 67.839996 28.4
                  09/10/2003 21:28:00.312.0 67.375 0 69.119995 28.4
                  09/10/2003 21:28:00.812.0 76.474998 0 69.119995 34.400002
                  09/10/2003 21:28:01.312.0 76.474998 0 69.119995 48.400002
                  09/10/2003 21:28:01.812.0 64.400002 0 69.119995 55.200001
                  09/10/2003 21:28:02.312.0 31.5 0 67.839996 54
                  09/10/2003 21:28:02.812.0 25.375 1 67.839996 39.200001
                  09/10/2003 21:28:03.312.0 34.474998 1 66.559998 35.200001
                  09/10/2003 21:28:03.812.0 38.849998 1 66.559998 36
                  09/10/2003 21:28:04.312.0 38.849998 1 65.279999 37.600002
                  09/10/2003 21:28:04.812.0 34.474998 1 66.559998 41.600002
                  09/10/2003 21:28:05.312.0 7.3499999 1 66.559998 44.799999
                  09/10/2003 21:28:05.812.0 19.424999 0 67.839996 44
                  09/10/2003 21:28:06.312.0 35.875 0 67.839996 38.799999
                  09/10/2003 21:28:06.812.0 46.375 0 69.119995 35.200001
                  09/10/2003 21:28:07.312.0 58.450001 0 69.119995 32
                  09/10/2003 21:28:07.812.0 58.450001 0 69.119995 37.600002
                  09/10/2003 21:28:08.312.0 56.875 0 69.119995 49.600002
                  09/10/2003 21:28:08.812.0 55.474998 0 69.119995 58.400002
                  09/10/2003 21:28:09.312.0 40.424999 0 71.68 58.400002
                  • 6. Re: Using logged measurments to create a HUD overlay
                    Mylenium Most Valuable Participant
                    As Andrew said, in theory it's rather simple once you have the data inside AE. Based on your example, this could even mean simple copy&paste of the relevant columns as keyframes to the properties directly - you'd copy a sample header from AE into Excel (or a text editor), then replace the dummy data with your own and copy it back to AE. For animating the actual text value you'd simply use pickwhip expressions to the relevant property. Anotehr way is of course to have it all set up via scripts, which, depending on how often you do this, would be the most re-usable way. Several examples of such scripts can be found on http://www.AEnhancers.com . if you need everything "interactive" without actually creating a few hundred keyframes, then expressions would be the way to go. You could e.g. split you text into lines and store individual values in arrays. The limitation however is, that arrays and other variables can only hold a limited number of values, so this would only be suitable for rather short segemnts, given the amount of data you have...

                    Mylenium
                    • 7. Re: Using logged measurments to create a HUD overlay
                      Level 1
                      Thanks for the suggestion Navarro,

                      On the RedGiant site I see some nice Datamator graphs but I have not yet found a video example of tutorial that demonstrates what it does.

                      I'll keep looking.
                      • 8. Re: Using logged measurments to create a HUD overlay
                        Level 1
                        Mylenium,

                        If we say 25fps for a maximum 5 min clip the data array will be 7500 rows x say ten columns. What are the limits to both the expressions and the script methods. Ultimately I would like to pull together a script if the results are impressive enough!

                        As with Excel, could the limitations be overcome by batch processing the data? ie use multiple series in Excel charts.
                        • 9. Re: Using logged measurments to create a HUD overlay
                          Mylenium Most Valuable Participant
                          Expression arrays can hold up to 1024 values, which is nowhere near enough for the durations you talk about. Strings (text layers) should hold more data, but it might also already be a problem to e.g. insert your tab-delimited text into the source text property - some of it may be truncated and AE would possibly not update the expression, because it could not render the text. Therefore I don't think that this is practical. Scripts do not share that limitation, as you would be parsing the text line by line and flush the variables after the keyframe has been extracted. Pre-processing the data in Excel might eliminate some limitations, but ultimately it still comes down to AE having to handle a lot of keyframes. No matter which method you employ, it will always be quite demanding on your system performance. At best, separating the data would improve parsing performance due to less string operations, which may make you feel as if things were progressing faster, but the overall amount operations would not change. It doesn't really matter if you process one data set consisting of 5 columns or 5 separate data sets with one columns...

                          Mylenium
                          • 10. Re: Using logged measurments to create a HUD overlay
                            Level 1
                            Navarro,
                            I found better Datamator examples on the original Digital Anarchy Data Animator 1.1 site. Thanks again.

                            Mylenium,

                            Can I just check that Java script can access external files. And as for processing speed, I am used to Finite Element (stress analysis) taking hours or motion simulation packages. How slow is slow?

                            ~Carl

                            PS. We will be running it on a quad core 2.66GHz M/c with 12GB RAM, XP pro x64
                            • 11. Re: Using logged measurments to create a HUD overlay
                              Mylenium Most Valuable Participant
                              Yes, JSX scripts can parse external files; if you check the respective option in AE's prefs, they can even write them. "Slow" is not slow as in calculating a few million density samples, but you may have one or the other half our coffee break, assuming you parse all data at once.

                              Mylenium