Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All new cameras: Add camera path editing for movie recording #43

Closed
FransBouma opened this issue Aug 28, 2017 · 6 comments
Closed

All new cameras: Add camera path editing for movie recording #43

FransBouma opened this issue Aug 28, 2017 · 6 comments

Comments

@FransBouma
Copy link
Owner

FransBouma commented Aug 28, 2017

Hatti's BF1 tools have this, and it's really cool.

Basically it should work like this:
(All quaternions are unit quaterions. We already do this, but just in case we're not, they have to be normalized)

  • User clicks start-camera path
  • There's a user key to add path nodes. In-game, when the freecam is enabled, when a path is active, and the user presses the specific key, a pathnode is added at the location of the freecam, with the quaterion it has at that location, and the location itself in worldcoords. This is stored with the path
  • There's an active move speed value. It's stored with a newly created path node. The speed is actually a value how many interpolations in a second are done between two path nodes. Faster speed means lower # of interpolations. See below.
  • When the user is done creating the path, s/he clicks a button and the path consists of the start node, end node and all nodes in between.
  • the user can now start 'play' to play the camera movement over the path, where the camera is moved from path node to path node, over an interpolated beziercurve.
  • Use DirectX math lib's quaternion slerp function to calculate new interpolated quaternions between path nodes at x intervals, where x is calculated from the move speed of start and end node of a path part. This is the camera rotation part. The coordinates are calculated from the beziercurve through the path nodes.

Calculating the speed.

As smooth play requires a ticker, we can calculate based on the time taken between frames the time needed to play y units. E.g. if we play on 30hz, and we have a 60fps framerate, we get a new tick every 2 frames. If the speed is 10, we can define e.g. that '10' means we move 10 units per tick. If the speed is 5, we move 5 units per tick. the lower the value, the more interpolations are done between two nodes in a path.

We have to come up with a formulate for this, but it looks rather straightforward. It's either a lower-boundary on the speed (the 'slowest' one can move) or a higher-boundary on the speed (the maximum one can move).

Papers / Guides

See Catmull-Rom/Overhauser splines: https://www.codeproject.com/Articles/30838/Overhauser-Catmull-Rom-Splines-for-Camera-Animatio They're superior for this.

See: https://graphicsrunner.blogspot.nl/2008/05/camera-animation-part-ii.html

Also:
See: https://www.engr.colostate.edu/ECE481A2/Readings/Rotation_Animation.pdf (or equivalent)
See: https://www.scss.tcd.ie/publications/tech-reports/reports.94/TCD-CS-94-18.pdf (bezier/bspline based camera paths)

Todo

Bezier curves/spline curves for interpolation between multiple nodes on a path. See e.g. https://gamedev.stackexchange.com/questions/64529/camera-movement-with-slerp

@danysterkhov
Copy link

Hey! Wanted to ask if you get to try this out in any of the new cameras you did? I'm interested in function like this for DMC5 camera, and if you could get this done, how much do you want for it?

@FransBouma
Copy link
Owner Author

It's a lot of work and I don't have a lot of time atm, so when I have time I'll perhaps add it, but it's not my top priority. THe lack of time is the main roadblock

@danysterkhov
Copy link

Got it, thank you for fast response!

@Kasatos95
Copy link

i've used the Cinetools by hattiwatti, he went to work for DICE. The Tools were simple to use to be honest. i don't have any experience with coding other than just changing some keybinds in text files.

there was an option to do slowmotion in the tools to a degree. but i presume it would only go to a certain limit because of the servers in bf1 bf4 exct.
i know of people that want to record their footage in slowmotion to have more frames in the clips they want to record. such as myself i can only do 60fps and it hurts to not be able to slow down animations. currently i can only record freeze frames and it makes video not as interesting, because of there not being any movement other than the camera movement i can get with my controller.
especially in Batman Arkham knight, it is one of my favourite games and i would have loved to do more creative cinematics in the game. There are too few options to make something good

do you think you can make such cinetools like done by hatti in future? maybe even with better features?
and if you were to have the time. how much effort and time goes into this? i dont want to annoy people asking these kind of questions like: can you update this tool or fix a bug or implement something new.

@FransBouma
Copy link
Owner Author

@Kasatos95 I can make tools with camera paths etc. but as I said above, it takes a lot of work and thus time and currently I don't have a lot of time so it's not going to happen soon.

Another limiter is that I often don't have access to dof/other effects in the game's engine of the particular game. For me camera paths require effects to be settable at given points so the camera can interpolate between them. Reshade would work great but one can't set reshade properties from the outside, so camera paths might work out but there won't be camera effects in it, which to me is something which makes the whole feature useless.

@Kasatos95
Copy link

ah okay, thanks for making a simple explenation! i understand that you don't have much free time, also thanks for doing what you can and have done before :) @FransBouma you make life easier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants