Record and replay CHOP

I want to record data coming from a LiDAR sensor, and be able to replay later on. The LiDAR signal is a CHOP with 3 channels, has around 1000 rows and updates at ~20Hz. I want to record that data for a period of time (~20 seconds), and then be able to call it up again later, to replay it.

I peeked at the Record CHOP but found it a bit slow, especially regarding that many datapoints per frame.

Is there a better way of doing that? Record tables, store them in external files, load them and replay them?

1 Like

not sure if it’s any faster , but you can also try the trail chop. With a bit of scripting you can lock it after a period of time and export the chop to disk for later usage.

1 Like

My approach would be to use a chop to top to convert to 32bit RGB float, then use a Cache top to record the data. If you need to save the data, perhaps you can create a script to then export every frame by using a Cache Select top, then use an expression like (-1*me.time.seconds) to automate the Cache Index, feed the output into a moviefileout recording into a uncompressed format, and use the (ctrl-m) dialog to export the movie offline. Then that video is the stored data, and you mix/select the data from various passes in real time by playing back and mixing different movies, then reconverting back to a Top to Chop, depending on your application.

Thank you. That was a good recommendation to record it as a movie.

I am going from a Math-Chop (to calculate from min/max x/y/z coordinates to a 0…1 float) to a Chop-to-Top directly to a Movie-File-Out. (The movie file is ~2000 pixels wide, and 1 pixel high) And then I do the reverse with a Movie-File-In to a Top-to-Chop to a Math-chop (reverse calculation). Then I have my 3D points again. Pretty easy and straightforward which is great.

I am losing some resolution, as all the 3D points are arranged a bit more grid-like, so I am still investigating that.

1 Like

You’re welcome!

So depending on the output movie file type, the actual saved movie file might be compressed to 8bit. Try saving a single picture out as an EXR and reloading it into touch - exr is 16bit natively.

Also check for 8 vs 16 vs 32 bit in all of your tops!

Good luck.

yes! the moviefileout was the 8-bit culprit. exporting an image sequence solved that. thank you!

1 Like

No problem, glad I could help!