Topic: Running a scene backwards?

I have been trying to plan what I'm doing in my various projects, and I'm slowly coming to an end of the editor GUI and framework system, so I'm looking at what tasks I can work on next. There are a lot of fundemental things missing so far (for exampe, entity selection/manipulation) but in order to keep... motivated, I think I want to try and find a task I can work on which is interesting, even if it's not quite as useful.

One of the options I'm considering is trying to make a video tool. At it's most basic, what I will probably start off doing is making it render to texture, and then encode to ogg with libtheora. In theory I don't think that would be too difficult. What I would like for the video creator to be able to scrub backwards and forwards through the scene, potentially making changes.

Obviously this is far too much work for a small distraction task, however I would like to keep it in mind if/when I do this, so it can be added later. I already have a couple of thoughts for what I can do, the main thing I'm unsure about is how you would go about playing a scene backwards. I know that it definitely can't have non-deterministic behaviours, and have to support anything with negative time deltas... I'm just wondering if there's any thoughts on how to get things to support backwards, forwards and being edited on the fly tongue

Re: Running a scene backwards?

Nistur wrote:

I have been trying to plan what I'm doing in my various projects, and I'm slowly coming to an end of the editor GUI and framework system, so I'm looking at what tasks I can work on next. There are a lot of fundemental things missing so far (for exampe, entity selection/manipulation) but in order to keep... motivated, I think I want to try and find a task I can work on which is interesting, even if it's not quite as useful.

One of the options I'm considering is trying to make a video tool. At it's most basic, what I will probably start off doing is making it render to texture, and then encode to ogg with libtheora. In theory I don't think that would be too difficult. What I would like for the video creator to be able to scrub backwards and forwards through the scene, potentially making changes.

Obviously this is far too much work for a small distraction task, however I would like to keep it in mind if/when I do this, so it can be added later. I already have a couple of thoughts for what I can do, the main thing I'm unsure about is how you would go about playing a scene backwards. I know that it definitely can't have non-deterministic behaviours, and have to support anything with negative time deltas... I'm just wondering if there's any thoughts on how to get things to support backwards, forwards and being edited on the fly tongue

As far as adding video texture support into martis, my suggestion would be to use OpenCV, its fairly trival and I have done it in SFML2 for video playbck support not to mention using it in ogre for motion tracking "steering a ball with my head" wink.

Now for playing video? backwards. Thts not going to be easy because of how video is decoded and stored in the buffer, you would have to stream it to the buffer starting from the end of the file and then extract the frames in reverse. It might be easyer to just play audio and your character/scene animations in reverse. Might wink

Re: Running a scene backwards?

Thanks for the reply (and apologies for not being on for so long, been stressful, but that's not important)

I think what I was trying to suggest got a bit misunderstood here. I wasn't wanting to decode and play a movie in game (although this would always be useful) but rather use the Maratis Engine and Editor to work as a scene manager for rendering video. The backwards issue was to be to make iteration over the scene easier (rather than resetting back to the initial state and replaying only in one direction) An example of what I mean is in the talk by Bret Victor.

This was basically just a dream project, something I thought would be pretty cool to do smile Not sure how feasible.

Re: Running a scene backwards?

The talk by Bret Victor is very interesting, I remember seeing the mario-like video somewhere.
Some of the real-time code modification might be a bit complex to do, but as lua is quite fast to 'compile' it would be interesting to try. For a timelapse, a basic system would be to record all inputs at 60hz and to recompute the logic loop when the script is modified (I'm not sure it will be realistic for a big game or a long timelapse).