Better Slow Motion

  • agustrusher
    20th Mar 2014 Member 0 Permalink

    So, I was fooling around with gravitons in jacob1's mod and I wanted to slow down the sim. Not see it step by step (pressing the f key), just make it slower so I could better see the formation and devlopment of systems - I mean when its at regular speed, you miss everything and just see flying particles into a clump, and I wanted to see the development of smaller gravitational systems into the bigger one...

     

    *ahem*

     

     

    Anyway, when you slow down the framerate, particles just jump to their next calculated positions in each frame depending on their velocity (I assume), so...why can't it be a smooth transition. Like...the framerate a seperate thing from the simulation speed. I know this is silly, considering the the simulation speed is the framerate for TPT (I again assume); but still, a "smoother" or live slow motion.

     

    Of course, I'm no programming expert (or amateur), so I wouldn't know its feasibility. :/

  • jacob1
    21st Mar 2014 Developer 0 Permalink
    Do you mean something like setting the frames per second cap? By default it's 60, but you can type this into the console to slow it down: tpt.setfpscap(30) (replace 30 with whatever cap you want). A really large cap or a cap of 2 disables the fps cap entirely and lets the simulation go as fast as it can.
  • agustrusher
    21st Mar 2014 Member 0 Permalink

    @jacob1 (View Post)

    Yes, I mean the fps cap in terms of framerate (disregarding computer performance).

    I think you may not understand what I'm suggesting here. Yes, you can raise the fpscap to make the sim go faster, so the reverse is possible; however there is a obvious problem when you lower the fps. Particles "jump" to there calculated positions based on their velocity, because each frame is a step in the simulation. What I'm proposing is sort of...well, the only thing I know to compare it to would be anti-aliasing - smooth out the roughness. In this case, the particle jump. The velocity will be the same, it just won't jump in accordance to where it should be. Instead it travels - slowly; hence slow motion - at a constant rate in accordance to the particle's velocity and how much the sim is slowed. They'll still be travelling the same distance over time.

     

    Ex. 

    A bunny makes one, 1' hop every second - present particle travel

    A mouse scurries at a speed of 1' a second - My proposal

     

    I'm sorry if I'm getting, like, EVERY terminology wrong; I'm just not really proficient in this stuff/explanation.

  • jacob1
    21st Mar 2014 Developer 0 Permalink
    Unfortunately something like that isn't possible. I can't make particles only move half the distance they should in an attempt to slow them down. With the way the simulation is done, particles just move how they do. You can't simulate half of a frame or half the movement in that frame, especially because of the way particles check for obstacles in movement. You could always rewrite everything but that would be a lot of work and might cause bugs.

    Usually people don't want to track individual particles so closely, in the case of GVRT they all mass together all the time anyway.
  • detroit671
    23rd Mar 2014 Member 0 Permalink

    @jacob1 (View Post)

     Just remember, this could be very useful for developing highly complicated saves, such as engines, counters, or video players

  • jenn4
    23rd Mar 2014 Member 0 Permalink
    Couldn't you just fake a slowmotion by altering the velocity and gravity value?
    For instance: if the 'speed of the element was defined only by the velocity properties", you could drop the values to a half of the original and create a 'slowmotion'.
    Edited once by jenn4. Last: 23rd Mar 2014
  • boxmein
    23rd Mar 2014 Former Staff 0 Permalink
    The thing you suggested is possible via simply linerarly tweening the positions of the shape. If one were to call rendering and updating separately (as is kind-of required for slow motion areas), then one could just calculate the amount of frames in the meantime and the next position after said frames, divide the position change by the amount of frames and then simply redraw the pixel at appropriate gaps? Even more so, one can do the same thing with the zoom window, creating ever-more complex tweens. It's a tremendous undertaking however.
  • Schneumer
    23rd Mar 2014 Member 0 Permalink

    If what i think he is saying is what he is saying, you can't move half a pixel. Unless pixels were quartered. And half that. Quartered.

     

    However, jacob1, you could just make it like this. Instead of 4 frames,in slow mo, 8 frames btry would sprk pscn? And etc, like....life only depletes by 1 in two frames. Or just double the regular life.



  • detroit671
    29th Mar 2014 Member 0 Permalink

    @Schneumer (View Post)

     Just remember that would also double the amount of space needed on a computer. I'm sure that there are users on here that use computers that can just support the standard 4 frame mode.