Under sample a PRT cache



Can we under sample a prt cache? The manual refers to fumefx, TP, max legacy,…
But nothing about undersampling a PRT cache that still have velocity attributes.



Can you explain a bit more what you are trying to do? Remember that Stoke is a rather large set of tools, and I am not sure whether you are talking about the Stoke Particle Simulator, the Stoke Field Magma, the Stoke Field Simulator, or something else.

Where are you sampling the PRT cache? How are you sampling it? What is the desired workflow?

The more you write, the more I will write back, I promise :slight_smile:


Hey bobo, thanks for your reply. So basically my actual situation is this. I am exporting particles from Houdini in prt format. Then loading those in prt loader in Krakatoa MX. I want to add stoke particles as it gives a more ethereal look. Also if i just need more particles i can do it right there and not go back to H.

The technique is documented here thinkboxsoftware.com/stoke-m … ld-source/
But I wanted to source from my existing cache that still has velocity attribute.
Like a Velocity field from PRT Loader.

Thanks again


I see. This is rather funny now that I read it. I must have been so convinced it is obvious that you can use Krakatoa objects as sources, I have totally forgotten to mention them on that page. :blush:

The relevant sentence says “Stoke MX can use the velocities of any 3ds Max particle systems”, which of course includes any Krakatoa PRT objects with a valid Velocity channel. These include PRT Loaders (if the PRT sequence contains a Velocity channel, or if you make one with Magma), PRT Volumes from animated meshes (particles get a velocity from the vertex velocities of the mesh), PRT FumeFX (particles get the velocity from the FumeFX grid). All other PRT objects might require additional Magma work to produce a valid Velocity channel.

In addition, other Stoke Particle Simulators’ particles which always have a valid Velocity channel can be used to drive Stoke Particle Simulators.

You can pick a PRT Loader directly in the Velocity Sources section of the Stoke Particle Simulator - this will put the velocities on a grid and you have control over the grid spacing. The larger the grid voxels, the faster it will be at expense of quality, as more particle velocities would be combined in a single voxel.

Alternatively, you can make a Stoke Field Magma and sample the driving particles using various operators:

  • Stoke > PVelocitySplat - this was designed specifically to splat velocities onto a grid and has a built-in Remove Divergence option which is on by default, thus producing a divergence-free, uncompressible fluid behavior.
  • Stoke > ParticleSplat - this was designed to sample any number of channels from a particle system to create multiple fields. It does not have a Remove Divergence option built in, but you can add a Divergence operator behind it to do so.
  • Object > ParticleSumCount - this will let you sample any channels of the nearest N particles with an optional falloff (so farther particles have less influence). You can then divide the Velocity channel by the TotalWeight to get an average, otherwise you would get the sum of the N velocities.
  • Object > ParticleSumRadius - this will let you sample any channels of the particles within a specified radius, with an optional falloff. You can then divide the Velocity channel by the TotalWeight to get an average, otherwise you would get the sum of the N velocities. Note that here we are using a spherical region to stuff a cubic voxel, and the region can be much larger than the voxel spacing, so you can get significant blurring. But the larger the radius, the slower it will get.
  • Object > NearestParticle - this lets you get any channels from the nearest particle, no matter how far it is. No averaging will be performed, but every voxel in the Stoke Field Magma will get some velocity from whatever particle was closest to it, even if it was miles away.
    Once you have a field sampled, you can always resample it on a larger grid (just set the Relative size to > 1). This includes setting the spacing of the Stoke Particle Simulator larger or smaller than the spacing of the Stoke Field Magma.

The Stoke Field Magma approach gives you more flexibility to control what ends up in the field, but for your case using the PRT Loader directly in the Stoke Field Magma might work well enough.

Let me know if this helps.


Thanks Bobo. I don’t have Stoke yet and wanted to see if this workflow would work. That’s why i didn’t try it myself.
thanks for your confirmation.