Closed theotherbigfoot closed 11 months ago
Thanks for the extensive list of issues and ideas!
This is a nice feature to make manual timelapses yes and can work next to the existing features. I created #38 to track
I cannot reproduce. When I trigger a transition I can pause the camera, all cameras or the game (by opening the config GUI with the pause enabled). And in all cases this is pausing the camera. Which is also supported by the code:
Main.tick()
function shuld not be calledSo if you could give some steps on how to reproduce, it would be nice :)
Should be the case when 1 is implemented and 2 is working properly/as expected
I do not fully understand, you mean a button that (saves and) opens the screenshot in an external (to factorio) image viewer?
When "smooth camera movement" is enabled, it is (should be) a linear progression from original camera position to requested position. Problem is that I do not keep/have the original position, so I need some maths to calculate the step for each screenshot by calculating the number of 'left over steps' and the 'left over distance' in order to get the step length. This is done here: https://github.com/veger/TLBE/blob/master/scripts/camera.lua#L124 I guess it is fairly readable, even if you ware not a programmer. If you find some issues with my math, please let me know :wink:
I am not rounding down camera position, zoom factor, etc. Of course the values have some precision, but that should be negligible for this use-case. When a screenshot is taken, the values are not rounded as well and factorio (while having some precision) accepts partial tiles as well: take_screenshot function (follow MapPosition for details on precision) In the GUI is do round the values to full tiles, to keep things neat(er). I quickly confirmed by showing the unrounded position in the GUI, and it is indeed not rounded.
So I do not know why the panning is jagged...? Can it be a framerate issue, screen refreshes at e.g. 60Hz and the movie does not match nicely, causing to skip frames once in a while? (Not a video editor/editing expert, so I am just wildly guessing now :) )
It is a nice idea, and I have thought about it myself:
So unless you have a very tempting use-case I doubt that I will implement this (as I want to play the game as well, and this would take a lot of my free-time to implement :wink:
Follow up on issue 2, nope still can't pause it. This is what I am trying to do. I have a set of co-ordinates for the current position and the proposed position. If I am able to pause the transition then I want to run it at a high frame rate so that I can capture a single screenshot at a time. 24 screenshots proposed to get from A to B, so I am going to run the transition at 12 frames a minute for two minutes. I start the transition to get the initial screenshot then immediately pause it. Wait a minute, unpause the timelapse to get a single screenshot again and the camera has moved a significant distance. Wait two minutes, unpause, get a single screenshot, and the camera seems to have moved about double the distance than what it did for a single minute.
Even though the timelapse is supposed to be paused, the camera is still moving in the background. The only thing the pause button seems to do during a transition is stop recording the shots.
Oh... I see! (I guess)
It is because it calculates the step using the lastModifiedTick and game.tick. So when pausing a camera (for some time) the game ticks progress and become farther away from the lastModifiedTick. Causing a big(ger) jump than expected.
When I have some time, I'll try to reproduce again.
Just to give you a sense of why this is so annoying, the alternative, if I can't pause it, is to run the transition at a single frame per minute for 24 minutes so that I can guarantee I can get all things I want to get done for that shot. I might have a single frame that takes a minute to create and that dictates the duration of every other frame in the transition. I have tried running this at 2 frames a minute but it can get really stressful at times, trying to squeeze everything in before the camera moves. The end result is a single transition that takes 24 minutes to make, produces less than a second of real footage and I spend half the time sitting waiting for the camera to tick over.
I really don't want to put pressure on you because you are basically doing this out of the goodness of your own heart and I don't want to push my luck, I am incredibly grateful for anything you can do with my list, but this issue is a big problem for me. Anything you can do would be amazing.
I still cannot reproduce (I guess my tests are too short?), but I see a/the problem in the code.
The game ticks will pass when the camera is paused. And while the code calculates the step size using game ticks and start time of transition the step size will/should change because time 'disappeared', the transition should continue (although with the wrong step sizes). An additional issue is that when the transition time is passed, while the camera is paused, unpausing it won't finish the transition to the final location/scale!
So there are definitely things going on with respect to point 2.
Correct. If the camera is paused while a transition completes then the camera is locked in the position it was when the timelapse was paused. It won't move to the final destination. I noticed this in one of my early videos.
Forgive me, I am a simpleton when it comes to coding, but isn't it just a case of creating our own custom tick timer that is linked to the game timer but stops ticking when the timelapse pause button is pushed? An independent timelapse tick timer? I genuinely don't know what I'm talking about though, if there is something technical that I'm not aware of (there will be) then just tell me and I'll stop trying to help.
No worries about not being a (expert) coder, being interested is good :+1:
Yes, you generally need to make a custom timer to make transitions. The mod does this by marking the tick when the transition started and calculate the passed time. The advantage of this is that the code does not need to create additional timers, which reduces complexity (tracker only need to keep track of the latest change it had) and is more performant (no need to update some transition timer each tick for each camera).
Which is fine, unless you are able to pause the transitions... :scream: :wink: This is an oversight I had :smile: I will think of a system that has a transition timer for each camera, so they can be paused independently
"Problem is that I do not keep/have the original position"
OK .. but is there a technical reason why we can't store the original position? Then the linear (or non-linear) interpolation becomes really quite easy. It also would feed into the box-drawing enhancement, as we can render the origin box, the destination box and the pan box in 3 different colors.
I vaguely remember this was because trackers change (especially with the player tracker), cameras switch trackers. So keeping the original position is 'weird' as it changes over and over (especially when active building with the area tracker).
So when implementing the smooth transitions, it became more easy to use current state of the camera and the intended state and transition into it.
I forgot the exact reasons, and they even might be obsolete by now... In order to fix #43, I guess a redesign of the smooth transitions is going to be needed
Now I remember: the idea of trackers is that they track something in-game like a player, buildings, a static area, etc. Camera on the other hand take screenshots or their current position, while using trackers to update (transition) their position.
So a camera is not notified that a tracker points to something new (as a tracker doesn't know if/when it is going to be used, and thus cannot inform camera(s)). Therefore, the camera checks when a tracker lastly noticed a change (and updated their 'position') and start a new transition form there on. This could even happen in the middle of another transition!
By moving the 'start transition' time to the camera, it would be possible to pause the transition (compared the game ticks) and (re)start new transitions. I guess it would even make it easier to have multiple (non-linear) transition types in the future.
@theotherbigfoot I think all of your requests made it into v1.5.0 If you feel there is something that is missed, or you have new ideas feel free to open a new issue!
Thanks again for the wonderful ideas, the mod ha some great improvements in this version.
Ahh dude, absolutely my pleasure. I have wanted these changes for so long, the fact that you have incorporated them into the mod is incredible.
Thank you
I have a lot of ideas here, to the point where I will probably need to come back and add to it because I've forgotten something. I'm not expecting anything. I can work with the mod you have already built no problem, I like it a lot. What you can or can't do or when is totally in your hands. I just struggle to do nothing if I feel like I have a good idea, youtube is useful for me in that respect. Here goes.
For the time being this is all that comes to mind. I know it's a lot. As I said, it is entirely up to you what you want to do with this list. Thank you for responding to my youtube comment and thank you for considering this. I am incredibly grateful.