I’m trying to save and partition a Nparticle system drived by fluids and I need to get the playback speed to 0.25 because the speed of fluid sims but if I try to make the partitioning with the prt saver, the plugin goes wrong and the nparticle stops on emit.
Any way to save cache and partitions with Playback speed less than 1 like the Ncache properties… “Evaluate every… frames” attributte?
I upload an image. I now htat it’s Maya on Mac but i’m partitioning on windows obviously,
There are two issues here, the one is relatively easy to solve, the other one is a bit larger.
I just modified the PRT Saver to read the (playbackOptions -q -by) value and use it to advance the time slider while saving.
I assume this will correctly simulate your system if the value is set to 0.252.
Unfortunately, unlike our XMesh file sequences which already support sub-frames in the form of “somefile_0001,25.xmesh” (comma as decimal delimiter), our PRT Loaders in both Maya and Max have currently no knowledge of sub-frame files.
The modified Saver I am testing overwrites the same full frame multiple times, e.g.
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0001.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0001.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0001.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0001.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0002.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0002.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0002.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0002.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0003.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0003.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0003.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0003.prt]
...
which results in the last sample to stick and the previous 3 sub-frames to be overwritten.
I could modify the saver to produce decimal frame numbers, but then it would require both our KMY and KMX developers to add support for them in the respective PRT Loaders, which is currently not on the ToDo list. That’s the larger issue.
If you intend to render only full frames, the above fix might be good enough for you since it would advance the time correctly to perform the simulation at sub-steps, but you won’t be using the actual sub-step data.
But if you intend to actually use the substeps, I could add an option to increment the frame counter independently from the time slider, so the frame names above would be
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0001.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0002.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0003.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0004.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0005.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0006.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0007.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0008.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0009.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0010.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0011.prt]
// KMY2PRT: Saving [C:/Users/Borislav/Documents/maya/projects/default/PRT/v001/PlasmaStep_particleShape1_part001of100_0012.prt]
...
Then in the PRT Loader you could specify a Playback Graph curve to advance at 1/4 of the speed and you would get the right speed and all sub-frames preserved.
Any feedback on this matter would be very valuable to us!
The only need in my case, I gess is the most general for high velocities “problems”, not high speed cameras, is the ability to save cache on subframes, like Ncache “Evaluate Every…” attributte and render on entire frames. So we can capture all the particles at these velocities and show o whole frames correctly, without gaps.
Once again, there is a simple solution and a complex solution.
The simple solution would capture the sub-frames, but will name the files with full numbers. I have already made the changes to the PRT Saver code of Krakatoa MY to support that
The complex solution would both capture the sub-frames AND name the files accordingly. But this would also require a change in the PRT Loader of both Krakatoa MX and Krakatoa MY, so right now it doesn’t look likely to happen.
In other words, I wanted you to confirm that the 1) would be good for you. You wouldn’t be able to tell by the file name which sub-frame it is, but if you load it in a PRT Loader and apply a Playback Graph curve, you would get what you want…
Here is a prototype, see if it does what you want. Just set the timeslider step to less than 1 and it should update accordingly, while still incrementing the frame numbers as full integers. So 100 frames of animation at 0.5 step will produce 200 frames with numbers 0001 to 0200 representing 1-100 with half a step…
It might be buggy, it hasn’t been tested much.
Back up your original file, for example on Windows mine is under
C:\Program Files\Thinkbox\Krakatoa Maya\Maya2013_x64\scripts
Then replace with the new version. KMY2PRT_Saver_20130123.zip (6.62 KB)
Hey Bobo, I think it’s a problem related to the scene, so it’s work perfect.
I saw other problem. My timeline starts on frame 90 and emitting particles on 100, but in this new version of the prt saver the saving process is starting on frame 1 instead frame 90.
This was kind of As Designed, but it might not make sense. When using sub-frame samples, I reset the frame counter to 1 since the numbers do not represent the real frames anymore anyway. So whatever your first frame is, if the timeSlider is not set to step of 1.0, the counter will start at 1 and increment by 1 with each sub-frame step.
You can fix this by locating the line
if ($timeSliderStep != 1.0) $currentFrameCounter = 1;
and remarking it with // or removing it completely. See if that fixes the issue and I will modify our code here.
Or I might make it an option.
I don’t know if the attributte playback Graph in the prt loader works ok, because when I wrote 0.252 or other number the particles dissapears.
Can you confirm that? I’m in the beta version finishing this shoot again.
Maybe I’m doing something wrong. I only check Enable Playback Gapgh and in the textfield value I wrote 0.252. Maybe I need to key the value? Do you have any instruction for that?
Yes, you need to key the value. The value tells the PRT Loader which frame to load on the current frame.
So when the Graph is off, you get frame 0001 on frame 1, frame 0002 on frame 2 etc.
If you enable the Playback Graph and want the same result, you have to set a key of 1 on frame 1 and a key on frame, say, 48 with a value of 48. This will give you linear playback (assuming your tangents are linear too).
Now if you want this to play twice as fast, you can set the key value to 96 on frame 48 and the PRT Loader will pretty much skip every second frame, unless you advance with sub-frames - then you will see the additional frames on every half frame…
If you want it to play twice as slow, you set the key on frame 48 to a value of 24.
Note that if you are showing velocities, the velocity will be scaled by the Playback Graph derivative (twice as fast will give you twice as long velocity vectors). When you don’t keyframe the value, it stays at the same value throughout the timeline, there is no motion, and Velocities will be scaled to 0.0 and the particles will not draw in the viewport anymore.
In your case, if you used a step of 1/4, you will have to keyframe your Playback Graph to go 4 times faster, so on frame 48 you would have 4*48 = 192. If you have an animation of 1000 frames, you have to set a key with value of 1 on frame 1 and value of 4000 on frame 1000 and so on…
Note that the PRT Loader has a checkbox to calculate the positions on subframes based on both frames (left and right) using cubic interpolation. This will produce smoother motion when performing extreme slowdowns. But in your case you actually want to perform a speed up (play back more files than there are full frames in the time line), so this does not apply. It has to read two files, so it is a bit slower. It only works if the files contain an ID channel.