Simulation time synced video recording

Typically: "How do I... ", "How can I... " questions
Post Reply
Wilsonator
Posts: 45
Joined: 25 Sep 2015, 19:10

Simulation time synced video recording

Post by Wilsonator »

I am having trouble recording a video that is synced with simulation time.

To clarify, I have a simulation that is running much slower than real time. So lets say 1000s of program run time, equal 10s of simulation time (e.g. 1/100 of real time). I want to record a video of this simulation for say 10s of simulation time, such that when I play it back it plays in real time for 10s. What I am currently getting is a video that runs at neither program run time of 1000s, nor simulation synced time of 10s, but instead something odd in between. How can I record a simulation time synced recording such that when I play it back I get to view a real time playback of the simulation time.

Is this question clear?

Thanks!

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Simulation time synced video recording

Post by coppelia »

Hello,

normally you can adjust everything. You can find out how many frames are generated per simulation time. From there, knowing that the video will produce 20 frames per second (be default), you can skip some displayed frames for the video. There is an item that says ___ displayed frames result in 1 recorded frame, and also the video Frame rate. Those items can be found in the video recorder settings.

Cheers

Wilsonator
Posts: 45
Joined: 25 Sep 2015, 19:10

Re: Simulation time synced video recording

Post by Wilsonator »

Depending on current computational load, the simulation rendering for me tends to drift between 35fps to 20fps. Is there any way to adjust for this in the video recording? I am currently running a simulation with a low time step that will take ~300s real time to simulation 1s simulation time. For a 120fps video, I selected to record ever 75th frame based on your comments. While this produced something reasonable, the video does have odd moments when the fps of the simulation drifts around a bit. Any solutions for this?

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Simulation time synced video recording

Post by coppelia »

Am I correct in the assumption that you want to link the real-time to the video time via a specific factor? This is not possible for the video recorder: it can only link the simulation time to the video time.

I see 2 options:
  • you use an external application that will generate the video
  • you use a modified version of the high-resolution screen capture tool (in Models/tools/high-res screenshot tool.ttm), that will generate a new image exactly when you need it. You then have various tools available to stitch the images together into a video.
Cheers

Post Reply