[MOD]Camera: Record your flight[WIP]

Post Reply
sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

[MOD]Camera: Record your flight[WIP]

by sofar » Post

Record your flight - Camera - Demo mod

This mod enables the player to record a flight path and replay.

During recording, the player no longer is under the influence of gravity and turns with the camera. Acceleration and braking are smooth and gentle, and strafing is disabled. The player will not stop moving by themselves and will go in a straight line. For optimum smooth paths, one should enable cinematic camera control (F8).

The goal of this mod are two fold: First, for entertainment and demonstration purposes. We'd like to show how cool Minetest is, and my goal is to make a "demo" Minetest subgame that can be used to provide a quick way for players to see how interesting and visually appealing Minetest can be.

Second, developers are looking for ways to reliably replay certain maps to do performance testing on rendering times. A fixed map and fixed player movement path are two of the largest requirements to make that doable. With this mod, this is in reach - and we just need an FPS counter to make it a fairly usable test.

How do use this mod?

Start a recording:

Code: Select all

/camera
Save a recording to file with a name:

Code: Select all

/camera save <name>
Play a previously saved recording from file:

Code: Select all

/camera play <name>
List previously recorded files:

Code: Select all

/camera list
While recording:
- use up/down to accelerate/decelerate
- use jump to brake
- use crouch to stop recording



License: MIT for code

Location: https://github.com/minetest-mods/camera
Last edited by sofar on Tue Feb 07, 2017 17:52, edited 2 times in total.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [MOD]Camera: Record your flight[WIP]

by twoelk » Post

great news!

I had just come to the conclusion that I need movement along a fixed path to record a nice video and minecart tracks kept sort of getting in the way. I had fiddled with the explore mod but not having to code the movement path but rather record a macro is by far the better idea.

I wonder wether you could also provide a method to add waypoints along a path and then let the mod calculate a nice smoother path along these fixed points. Maybe at these fixed points also the viewing direction could be stored and a time set that is used to calculate the movement speed between individual points.

Now if I could feed that recorded movement into the mapper or translate it to some common vector/geolocation format I might be abble to display my movement on an overview map.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [MOD]Camera: Record your flight[WIP]

by Fixer » Post

+1 ! Waiting big to test all the things with it :}
Last edited by Fixer on Mon Feb 01, 2016 21:30, edited 1 time in total.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [MOD]Camera: Record your flight[WIP]

by sofar » Post

twoelk wrote:I wonder wether you could also provide a method to add waypoints along a path and then let the mod calculate a nice smoother path along these fixed points. Maybe at these fixed points also the viewing direction could be stored and a time set that is used to calculate the movement speed between individual points.
This mod is a quick hack, it's choppy and sharp turns are awkward. Changing to a waypoint like system is something I'd like to do.

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [MOD]Camera: Record your flight[WIP]

by Sokomine » Post

I'd love to have something like this for rails. Or at least something similar: Let the client check the ground and act accordingly. Instead of carts beeing handled by the server, just let the player walk like on rails.
A list of my mods can be found here.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [MOD]Camera: Record your flight[WIP]

by sofar » Post

Sokomine wrote:I'd love to have something like this for rails. Or at least something similar: Let the client check the ground and act accordingly. Instead of carts beeing handled by the server, just let the player walk like on rails.
My thought was actually to add the cart as a bone to the player animation, this way the cart moves with the player no matter what.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [MOD]Camera: Record your flight[WIP]

by TumeniNodes » Post

sofar, does the recorded scene save somewhere? Not sure if I'm missing something?
If not, is this a feature you might add eventually to this? i.e. save video to...

I really like this mod
A Wonderful World

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [MOD]Camera: Record your flight[WIP]

by sofar » Post

TumeniNodes wrote:sofar, does the recorded scene save somewhere? Not sure if I'm missing something?
If not, is this a feature you might add eventually to this? i.e. save video to...

I really like this mod
It currently only records in memory, not to disk. With a little bit of saving/restoring it should be easy to make it write out the recording.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [MOD]Camera: Record your flight[WIP]

by octacian » Post

For those of you who are interested in this mod, a few new features are coming. As sofar mentioned in the updated OP, the mod is now licensed under the MIT license and in the minetest-mods organization. Not only that, but the mod no longer uses an item to start or play recordings, but rather uses a single chatcommand (see OP).

Aside from that, recording paths can now be saved to the disk per-player with the /camera command (see OP for specifics). Also, note that after recording, you must do /camera save <name> to save it. When playing back with /camera play, if no recording to play is specified, camera will check the temporary memory for an unsaved recording to play. I do have one warning though, and that is that the mod will not warn you when overwriting another recording.

The main thing that I am working on now is allowing right/left strafing.

Anyways, have fun!
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [MOD]Camera: Record your flight[WIP]

by TumeniNodes » Post

octacian wrote:For those of you who are interested in this mod, a few new features are coming. As sofar mentioned in the updated OP, the mod is now licensed under the MIT license and in the minetest-mods organization. Not only that, but the mod no longer uses an item to start or play recordings, but rather uses a single chatcommand (see OP).

Aside from that, recording paths can now be saved to the disk per-player with the /camera command (see OP for specifics). Also, note that after recording, you must do /camera save <name> to save it. When playing back with /camera play, if no recording to play is specified, camera will check the temporary memory for an unsaved recording to play. I do have one warning though, and that is that the mod will not warn you when overwriting another recording.

The main thing that I am working on now is allowing right/left strafing.

Anyways, have fun!
Awesome!
As this advances, IMO this will end being the absolute BEST tool to do ingame vids.
being able to save the recordings is a huge addition, thanks.

Although I have to admit, I actually liked using the cam inv item to click to record but, I'll get used to using commands instead.

>edit: I was just thinking..., would it be possible to set /home as the default save-to folder, similar to using F12 for screenshots? and save as AVI?
Also, is there not an unused feature button in MT? somewhere within F9-F11 which could be used to turn recording on and off...?
I'm just suggesting these for ease of use on the user end
A Wonderful World

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [MOD]Camera: Record your flight[WIP]

by octacian » Post

TumeniNodes wrote: >edit: I was just thinking..., would it be possible to set /home as the default save-to folder, similar to using F12 for screenshots? and save as AVI?
Also, is there not an unused feature button in MT? somewhere within F9-F11 which could be used to turn recording on and off...?
I'm just suggesting these for ease of use on the user end
Saving to /home/<user> would not work unless mod security were disabled and would for that reason be theoretically dangerous if the paths were to mess up (which they could/would) on Mac and Windows. Plus, this doesn't actually record a "physical" video file but saves the path as a table followed by writing it to a file. Minetest doesn't allow to directly save to a video file AFAIK, but if it does at some point, will implement. Essentially, you have to use an external recording program. It would, however, allow for map creators to have cinematic shots.

IDK if there's an unused feature button, it'd be nice if there was. Will look into it at some point.

tl;dr: no, not possible and IDK.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [MOD]Camera: Record your flight[WIP]

by Miniontoby » Post

Looks good.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 12 guests