How to double the frame rate for simulation (cache)

Discussions about SOFTIMAGEs© Interactive Creative Environment©
cnever
Posts: 60
Joined: 02 Jun 2011, 09:02

How to double the frame rate for simulation (cache)

Post by cnever » 08 Jun 2013, 11:54

Hi

Maybe this has been discussed, probably. But how do you double the frame rate but keep all the timing and animations the same.

So originally in 25 fps you have key frames on lets say 1,2,3 seconds.
Change the fps to 50 xsi automatically changes the key frames (divides it by half in this case).

Is it possible to change the frame rate to get more simulation data to interpolate with... smoother simulation in other words without changing the form to much. I am using lagoa and standard ice particles.

Any help greatly appreciated.

thanks

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 20 Jul 2010, 22:33
Skype: gustavoboehs

Re: How to double the frame rate for simulation (cache)

Post by gustavoeb » 08 Jun 2013, 16:30

It is a bit unclear, are you talking about writing or reading your sim?

By default SI will keep the keyframes at the secconds where they are. You can change this behaviour at Playback Options (under in secconds/in frames).
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

cnever
Posts: 60
Joined: 02 Jun 2011, 09:02

Re: How to double the frame rate for simulation (cache)

Post by cnever » 08 Jun 2013, 16:40

gustavoeb wrote:It is a bit unclear, are you talking about writing or reading your sim?

By default SI will keep the keyframes at the secconds where they are. You can change this behaviour at Playback Options (under in secconds/in frames).
I will have look at the second/frame thing but I have an idea I have done that before.

But its writing data that then gets read at a later stage, so by having more cache/ frames my freeze or slow down will look better. I am retiming the simulation with keyframes, thats not the problem the first step to get more sim data is.

thanks

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 20 Jul 2010, 22:33
Skype: gustavoboehs

Re: How to double the frame rate for simulation (cache)

Post by gustavoeb » 08 Jun 2013, 17:05

What I would do in that situation is increase the framerate by some factor (say 2x) and then write cache only for other frame (with the ice caching node).
I have tested this when filing some bugs to AD, but never used in real production to be honest...
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

cnever
Posts: 60
Joined: 02 Jun 2011, 09:02

Re: How to double the frame rate for simulation (cache)

Post by cnever » 09 Jun 2013, 20:43

gustavoeb wrote:What I would do in that situation is increase the framerate by some factor (say 2x) and then write cache only for other frame (with the ice caching node).
I have tested this when filing some bugs to AD, but never used in real production to be honest...
Thanks for the feedback gustavoeb, but according to me this will just not work (in theory) - the ice node and cache manager seem exactly the same. But if you double the frame rate not only does the actual key frames change so the project completely changes but doubling the frames and caching every second frame will bring you the exact same frames/cache data?

Maybe I completely missed what you were saying. But very simply put. I have 1 second of 25 frames = 25 cache files. I would literally just want to make that second 50 frames long = 50 cache files. Without changing the keyframes or shape of anything, would this be possible?
So if you had a keyframe on frame 12 it would become a keyframe on frame 24 etc. Because I need more data to do time remapping.

But seems I am slightly doomed or completely missing something hahah

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 22:38
Location: St. Thomas, Ontario

Re: How to double the frame rate for simulation (cache)

Post by Daniel Brassard » 10 Jun 2013, 13:41

Not sure if that is what you want, but here it is anyway.

Retiming ICE Cache by Andy Nicholas

http://www.andynicholas.com/?p=362
$ifndef "Softimage"
set "Softimage" "true"
$endif

cnever
Posts: 60
Joined: 02 Jun 2011, 09:02

Re: How to double the frame rate for simulation (cache)

Post by cnever » 10 Jun 2013, 13:44

Daniel Brassard wrote:Not sure if that is what you want, but here it is anyway.

Retiming ICE Cache by Andy Nicholas

http://www.andynicholas.com/?p=362
Thanks Daniel, I have done exactly that technique. But the problem I am sitting with now is getting my simulation to spit out more frames per second without altering anything drastically.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 22:38
Location: St. Thomas, Ontario

Re: How to double the frame rate for simulation (cache)

Post by Daniel Brassard » 10 Jun 2013, 14:13

Maybe you can use the modulo trick to remap the cache file i.e

read current frame
from 0 to 49
modulo 2
read cache file
at zero insert cache zero
at one do nothing
at two insert cache one
at three do nothing
etc.

which is a modulo 2 operation from zero to 49 (0/2, 1/2, 2/2, 3/3, 4/2, ...) > (0, skip, 1, skip, 2, skip, ...)
$ifndef "Softimage"
set "Softimage" "true"
$endif

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: How to double the frame rate for simulation (cache)

Post by Bullit » 10 Jun 2013, 23:10

I think there isn't a subframe sampling to frame conversion.

Daniel idea is good if it indeed interpolates the cache.

I don't know if this work but if you scale up by 2 an ice cache in mixer i think it has to add files if you save it as new cache with the new scale?
Then maybe if you can scale down those files still remain, maybe i am just wrong. Not much experience in this.

cnever
Posts: 60
Joined: 02 Jun 2011, 09:02

Re: How to double the frame rate for simulation (cache)

Post by cnever » 11 Jun 2013, 18:57

Bullit wrote:I think there isn't a subframe sampling to frame conversion.

Daniel idea is good if it indeed interpolates the cache.

I don't know if this work but if you scale up by 2 an ice cache in mixer i think it has to add files if you save it as new cache with the new scale?
Then maybe if you can scale down those files still remain, maybe i am just wrong. Not much experience in this.
Great Idea, also seems that 2014 has this more integrated but only problem I have now (still on 2013) is how do you save the new cache file?

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: How to double the frame rate for simulation (cache)

Post by Bullit » 12 Jun 2013, 17:40

I'll have to check. I don't have 2014 either.

cnever
Posts: 60
Joined: 02 Jun 2011, 09:02

Re: How to double the frame rate for simulation (cache)

Post by cnever » 12 Jun 2013, 18:51

Bullit wrote:I'll have to check. I don't have 2014 either.
But just so you know, the cache doubles perfectly in the mixer - just exporting the new cache? :-\

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: How to double the frame rate for simulation (cache)

Post by Bullit » 12 Jun 2013, 22:44

Can't you load it in the with new scene with changed frame rate?

This is 2014 but i think there is nothing new for cache in this video from 2013/2012, the guy seems to get duplicate number of cache files from 200 to 400: