Media Got any pics or vids to share?

Megasquirt Logs for Telemetry in Videos

Thread Tools
 
Search this Thread
 
Old 01-19-2021, 07:46 PM
  #1  
Junior Member
Thread Starter
 
Spei's Avatar
 
Join Date: Mar 2019
Posts: 166
Total Cats: -7
Default Megasquirt Logs for Telemetry in Videos

Hey all, just wanted to share something I made that other video creators could possibly use. It's an After Effects template that will read a modified .csv log off a Megasquirt ECU. Right now it's pretty rudimentary but it gets the job done and looks pretty slick. I think there are other pieces of software out there. I just didn't like the look of them, and plus having the ability to customize the gauge style, placement, and data shown in a "modern" style in AE seemed much more appealing to me.

Here are 2 examples of the template being used:



Right now it's a bit of work to set up and stuff but once it's set it's set. I might expand on the idea and find ways to make it more convenient to set up, but for now, you should have a decent idea of how to use AE and its expression system to get it working. My next reply will explain how to set it up and how to change the template to cover more log data and whatnot.
Attached Files
File Type: zip
Telemetry Overlay.zip (1.94 MB, 28 views)

Last edited by Spei; 01-19-2021 at 07:49 PM. Reason: Added files
Spei is offline  
Old 01-19-2021, 08:54 PM
  #2  
Junior Member
 
Dr.Sep's Avatar
 
Join Date: Sep 2020
Location: Rochester, Ny
Posts: 344
Total Cats: 76
Default

this is awesome! Well done
Dr.Sep is offline  
Old 01-19-2021, 09:23 PM
  #3  
Junior Member
Thread Starter
 
Spei's Avatar
 
Join Date: Mar 2019
Posts: 166
Total Cats: -7
Default

Take a log
Megasquirt will take the log in a.MSL format so you'll have to convert it to a .CSV through MegalogViewer. Also, I had my data rate set to 25hz but I'm not sure if this will affect timing up the data with the video (I'll explain later).

Modify the log
Megasquirt outputs a CSV file but it has a different format style than AE accepts.

When you import your CSV file into an editor it should look something like this.


Delete these rows at the top


And these rows at the bottom


In the end, you should have something like this


Convert CSV to MGJson
So AE can take this CSV file, but in order for the data to be read each frame, you need to convert the CSV to a MotionGraphics JSON or .mgJSON file. This is similar to how Gopro's overlay their telemetry on videos.

https://goprotelemetryextractor.com/csv-gpx-to-mgjson/

This site will convert your CSV to .mgJSON. From there you can import the .mgJSON file into AE.

Updating Composition in AE
Once you've imported the .mgJOSN into AE. Find the "Telemetry" composition. Inside that composition, you'll see a layer called "log". This is where all the gauges will get their data from. In order to use your data. Just drag and drop your .mgJSON file into the composition. Delete the existing "log" and rename your .mgJSON layer to "log". This should update all the gauges accordingly.

This is with proper data/working gauges


If you don't have data in the .mgJSON file or an error occurs. It will look something like this.



Modifying Gauges
Due to these gauges being expression driven, it's quite easy to duplicate and change the gauges.

For example, this is the "MAT" gauge. This is the expression that grabs the MAT data off the .mgJSON and changes the text to the current value in time. To change this gauge, you would simply change the ("MAT") parameter at the end of the expression to another data value. Such as ("AFR"),("CLT"),..etc.


Another thing to note. If you know your way around AE, you can totally change up the style of these gauges. All these "gauges" are is just a shape layer or some vector style shape that gets modified with data values. For example, you can change the tachometer to a bar, similar to the TPS. Or change the MAT style gauges to a gauge that looks like the tach. I won't go in-depth into that stuff though, that's a whole other topic.

Adding Gauges
If you wish to have several gauges, simply just duplicate the composition and rename everything accordingly. In my example, I only have the "boost" and "MAT" gauges cause it was just there to test it. You can add as many gauges as you want and change the position of them the composition.

"Calibrating" Gauges
So obviously all the data given in the .mgJSON files work with your gauges, but maybe they don't scale properly. For calibration, we'll be looking at the RPM needle and MAT gauge.

For the RPM needle to match with the label on the tachometer layer we need to divide the .mgJOSN RPM value by a certain number. This number happens to be 28 in my case for the RPM. For the MAT it happened to be 1.3. All these values just determine how much to "scale" the graphic that corresponds with the increase/decrease of your MAT, RPM, etc.



In this example, on the left, the MAT data is divided by 1.3 while the right is divided by 2.3. You just change it to your liking really. Or if you change to say CLT, the bar may scale differently due to CLT values being much higher than MAT. (Hopefully).



Overlaying Telemetry Over Video
So this is sort of a tricky part. I haven't yet figured out an easy way to sync up the overlayed telemetry with video other than just trial and error. In those two video clips I linked in the original post, I had taken the "Telemetry" composition that was overlayed on the video and stretched it to 115% effectively slowing down the data playback to match what was happening on the video. This was where I was messing with the data rate in TunerStudio. I set mine to 25hz cause that was closest to the 30fps that my phone recorded the video at. I'll be messing with different ways to sync it up. One way I would imagine would just to rev the car a couple of times at the beginning of the video/log and sync it there. Other than the syncing, all you have to do is just drop the Telemetry composition on top of your video and you're good to go.

In the end, you should have something like this!


If I make any major changes or have any "breakthroughs" I'll post 'em here. If you got questions feel free and post em, I might be able to help. I hope some of you guys who like to take videos of you tracking the car or want to spice up your YT vids could utilize this. If not, I have something to spice up my own videos.
Spei is offline  
Old 01-19-2021, 09:31 PM
  #4  
Junior Member
Thread Starter
 
Spei's Avatar
 
Join Date: Mar 2019
Posts: 166
Total Cats: -7
Default

Originally Posted by Dr.Sep
this is awesome! Well done
Thanks!
Spei is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Chiburbian
MEGAsquirt
0
08-25-2016 08:22 AM
1993z32
Media
4
07-23-2015 09:40 AM
3rdCarMX5
Fabulous Fabrication
1
04-02-2014 07:37 PM
psreynol
ECUs and Tuning
43
02-02-2014 12:17 PM
Mobius
Media
6
10-23-2012 12:06 PM



Quick Reply: Megasquirt Logs for Telemetry in Videos



All times are GMT -4. The time now is 09:05 AM.