I need to slow down a prt by about half its current speed. Using the graph editor seems to produce wonky results as I need to slow it down by alot. Is there a way to do this with a KCM so that the particles still travel along their original animation but at a much slower speed?
As you discovered, slowing down a lot produces strange results. The reason is that the PRT Loader has only full frames saved to disk, and all intermediate positions are produced by moving the particle along a straight line (the velocity vector stored in the PRT file). The particle always uses the CLOSEST frame, so if you are asking about a sub-frame between half a frame before and half a frame after a full frame, the new position will be based on the position and velocity of that frame. But the moment you move more than half a frame away from a full frame, the NEXT frame is taken, and its velocity is projected BACKWARDS up to half a frame. Since the velocities could have changed direction a lot between two frames (if the particle is not traveling along a straight line), there can be a significant discontinuity at the half-frame point.
The only way to solve this would be to store sub-frames when saving PRT files, but we don’t support that at this point (but we might in the future).
You might have to resim your particles, or live with the results of the current PRT retiming.
i had same problem and bobo was nice enough to write a script for that a year ago, with the setup i had i still got some funny interpolation, but theoretically it should work,
with this setup you can generate 20,000 frames of particles with a 200frame particle range for example
– Instructions:
–Change stepping nummer to increase sub-frame samples – 20 equals 20 new particle frames per original frame
–Change Filename to your choice
–Run script in a scene in which you wish to increase particle frames for slow motion effect
–It takes awhile, be patient and you will have LOTS of particles (they can be easily loaded and used in Krakatoa to timebend and rerender)
(
local start = 0.0 --this is the first frame
local end = 1000.0 --this is the last frame
local step = 20 --this is the number of samples per frame
local cnt = start as integer --this is the counter for the current frame number
local theParticleFileName = (FranticParticles.GetProperty “ParticleFiles”) --get the output PRT file name
FranticParticles.SetProperty “Presets:SaveRenderHistory” “false” --disable history saving
for t = start to end by (1.0/step) do --loop from start frame to end frame with the given step
(
local theFileName = FranticParticles.ReplaceSequenceNumber theParticleFileName ((floor t) as integer) --figure out what the saved file will be called
deleteFile theFileName --make sure it does not exist yet
render frame:t vfb:off --call the renderer at a sub-frame to save a PRT with full frame
if doesFileExist theFileName do --if it was found,
(
local theBaseFile = (getFileNameFile theFileName) --grab the base file name, then build the new file name with suffix SubFrame_
local targetFilename = getFileNamePath theFileName + substring theBaseFile 1 (theBaseFile.count-4) + "SubFrame_00000" + getFileNameType theFileName
targetFilename = FranticParticles.ReplaceSequenceNumber targetFilename cnt --set the target frame number based on the integer counter stored in cnt
deleteFile targetFilename --make sure it does not exist before saving over it
renameFile theFileName targetFilename --rename the saved file to the new file name
)
cnt+=1 --increment the integer frame counter by one
)--end t loop
)--end script