Welcome, Guest

Author Topic: Suggestion: A time slider in the interface  (Read 8692 times)

pete1061

  • **
  • Posts: 10
Suggestion: A time slider in the interface
« on: December 28, 2011, 12:36:26 PM »
What this program needs is a time slider in the interface (just like in any video control) so that you can go back to any point in the simulation and play back events that you may have missed.

smjjames

  • *****
  • Posts: 1128
Re: Suggestion: A time slider in the interface
« Reply #1 on: December 28, 2011, 01:01:45 PM »
The idea is a good one, the only problem is that in US, time only goes in one direction and that it doesn't actually record everything like a video. The video function only takes a screenshot every x frames or every frame. So, you'd need a program to stitch together those frames (the photos and movies part of windows live will work) or just get some video recording program such as fraps.

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Suggestion: A time slider in the interface
« Reply #2 on: December 28, 2011, 01:03:47 PM »
you can also set time step backwards to play the simulation backwards, however, this will cause errors to accumulate and magnify over time.

pete1061

  • **
  • Posts: 10
Re: Suggestion: A time slider in the interface
« Reply #3 on: March 09, 2012, 04:57:05 AM »
The idea is a good one, the only problem is that in US, time only goes in one direction and that it doesn't actually record everything like a video. The video function only takes a screenshot every x frames or every frame. So, you'd need a program to stitch together those frames (the photos and movies part of windows live will work) or just get some video recording program such as fraps.

I'm not talking about recording it like a video.

I'm talking about it keeping track of the positions & movement vectors of the objects in the simulation as it goes (at selectable intervals), so that one could go back and restart the simulation at any point back to when it was started.

Recording a video with something like fraps would only get one view of the simulation. Logging positions would allow one to re-start the sim at any point and make changes or view from different angles.

And about playing it backwards... not really what I was going for. That would likely open a new pandoras box.

Steroidkloud

  • ****
  • Posts: 36
  • There'll be another time...
Re: Suggestion: A time slider in the interface
« Reply #4 on: March 30, 2012, 09:55:04 AM »
It's not impossible. Look how they do it in Forza. You can instantly rewind in real time by pressing a button and then stop rewinding at the point you want to continue driving. If you are not sure what I mean, search it on Youtube "Forza 4 rewind feature".

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Suggestion: A time slider in the interface
« Reply #5 on: March 30, 2012, 01:05:55 PM »
It might be possible to save data for where the points are at which time. It might make simulation files a lot bigger though.

pete1061

  • **
  • Posts: 10
Re: Suggestion: A time slider in the interface
« Reply #6 on: April 02, 2012, 10:37:34 PM »
Yeah, but how big is too big for the simulation files?
It's 2012, multi-terabyte drives are dirt cheap. Anyway there is plenty of room to spare, currently simulation files are pretty small, all of mine are under 1MB. I wouldn't mind files even up to 100-300 MB. 10's of MB is just fine.
There could be options for how much of a history it would save for better control over file size.

Must all software be castrated just for the sake of people with old computers that have tiny drives?
Chances are, if your drive is under 100GB, your system won't be able to run the sim in the first place.

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Suggestion: A time slider in the interface
« Reply #7 on: April 02, 2012, 10:44:56 PM »
Drive space has nothing to do with the amount of memory or processor capacity.

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Suggestion: A time slider in the interface
« Reply #8 on: April 03, 2012, 04:19:11 AM »
Yeah, but how big is too big for the simulation files?
It's 2012, multi-terabyte drives are dirt cheap. Anyway there is plenty of room to spare, currently simulation files are pretty small, all of mine are under 1MB. I wouldn't mind files even up to 100-300 MB. 10's of MB is just fine.
There could be options for how much of a history it would save for better control over file size.

Must all software be castrated just for the sake of people with old computers that have tiny drives?
Chances are, if your drive is under 100GB, your system won't be able to run the sim in the first place.

It makes it harder to share simulation files. Also my laptop only has 30 gb space and i run universe sandbox fine :)


as to how big to it will be, i can only guess. Let us assume a 1000 body simulation, and have it run at 10,000 years for 1000 million years, like a galaxy collision. This results in 100,000 timesteps. Assuming that it takes 1 kilobytes to store information for 1 body at 1 frame, this is 1 mb for 1 frame or 100gb for the whole simulation. Of course we can optimize this to save once every 1000 frames which reduces the filesize to 100mb. THis is just a very rough estimatino so i may be off by a lot.

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Suggestion: A time slider in the interface
« Reply #9 on: April 03, 2012, 11:45:00 AM »
Actually each position would take about 32 bytes to record, so your results are way too high.

Bla

  • Global Moderator
  • *****
  • Posts: 1013
  • The stars died so you can live.
Re: Suggestion: A time slider in the interface
« Reply #10 on: April 03, 2012, 12:52:44 PM »
Actually each position would take about 32 bytes to record, so your results are way too high.
It would also need to save velocities, masses, names, densities etc.

pete1061

  • **
  • Posts: 10
Re: Suggestion: A time slider in the interface
« Reply #11 on: April 03, 2012, 01:54:22 PM »
Let's do some math here...

store position every interval (it doesn't have to be EVERY frame, it can be user selected for anything, day, month year, anything)
That's 3 floating point numbers @ 8 bytes each = 24bytes

store velocity, 4 floats @ 8bytes = 32bytes

mass, 1 float = 8bytes
diameter, 1 float = 8bytes

total 72 bytes per object per interval.

name only needs to be stored once for the whole path, not every interval.
density can be easily re-calculated off of mass & diameter.

Then how long of a simulation can be recorded?
Well that depends on how powerful your computer is.
(this is an extreme scenario)
Let's just say you have a REALLY fast computer and you can actually do a 10,000 year sim of 1000 objects @ 60 frames per second (you'd need something pretty good to do that, likely you will only be averaging 10 fps or less)

Run the sim at 1 hour per frame would take

10,000 / 365.25 = 3,652,500 days = 87,660,000 hours( simulation timesteps)

 @ 60 fps =  1,461,000 seconds = 24,350 min = 405.83 hours = 16.9 days
 @ 10 fps =  8,766,000 seconds =  146,100 min = 2,435 hours = 101.4 days

so, if you we're patient enough to just let your computer run for over 3 months, doing nothing else on it.
you'd have 87,660,000,000 times 72 bytes stored for those 1000 objects.
That's 6,311,520,000,000 bytes
6,163,593,750 Kilobytes
6,019,135 Megabytes
5,878 Gigabytes

But that's if you set it to store every 1 hour frame.

Set it to store every day of simulation time
262,980,000,000 bytes
256,816,406 Kilobytes
250,797 Megabytes
245 Gigabytes

Still a lot of data

so, how about every 30 days
8,766,000,000 bytes
8,560,547 Kilobytes
8,360 Megabytes

Every year..
720,000,000 bytes
703,125 Kilobytes
687 Megabytes

I do admit that is a lot of data.
BUT Who's gonna run a sim that big for that long?
Most are going to run MUCH shorter & smaller sims.
And don't forget about applying data compression on to that.
These numbers are raw, uncompressed data.

I still think it's a cool idea.
Some folks just like to be wet blankets and shoot ideas down for the fun of shooting something down.

....

One more thing, the sim already kinda stores a history of positions(not velocity, diameter & mass though)  in the form of trails.
« Last Edit: April 03, 2012, 02:03:35 PM by pete1061 »

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Suggestion: A time slider in the interface
« Reply #12 on: April 05, 2012, 04:46:43 PM »
I'm just discussing the practicality of it

I run the average sim for around 2 hours at 60 fps so it might not be too bad

And you need to save textures luminosity temp density radius , and many more so it'd probably take more than 72 bits

I sometimes save every 5 minutes manually so I can go back and experiment and fine tune the collision or whatever some more

ShoeUnited

  • ****
  • Posts: 47
  • Non opus est, si pretium non habetis.
Re: Suggestion: A time slider in the interface
« Reply #13 on: April 11, 2012, 12:26:04 PM »
A nice idea.  But how about we move the vectors and velocities into their own file?  Say we make it record every timestep.  Each object is assigned a hex number or something to keep track of it.  This file is solely a record of coordinates, velocities, trajectories, and objects at whichever timestep.  The .ubox file itself could be kept as its own file with an initial timestep of 0 (with proper vectors and everything else already kept in there).  But as a means for those of us wanting a rewind feature, a separate file that logs coordinate data etc. would work just as well wouldn't it?  As far as I can imagine that is what the program is doing -math based on coordinates and variables to plot new coordinates-. 

So, really all you'd need is a slightly spiffy log file of coordinate data @ timestep, no?  I see no harm in adding velocities etc.  I think the real problem would be from trying to figure out where to put added/removed/exploded/collided data.  You could list it as coordinates at a timestep, but then you'd have a whole list of additional data (velocities, masses, gravitational vectors) to deal with.  I personally love the idea, and it is feasible providing you have the processor power, drive and ram capacity, and throughput to write to another file on a drive.

Another way of doing it might be to have a series of save files.  But as I can see, a simple 4 object model (Molniya Satellites) is roughly 112KB at one time step.  Over time this could eat up data quickly: say 60fps * 1 minute * 1 hour of game * 112kb =~ 23GB of data.   And I do put in 1 hour of gaming easily when I play. :)  Sure I have a couple external terabyte drives, but it is a lot of data to ask for. 

So I think the best idea would still be to keep a log file (permanent or temporary) of vector/coordinate data.  I believe this is how things have been done since Blinx the Cat for the original Xbox -the first game I ever played that had a rewind function and wasn't a VHS game-.