Prt fumefx particles dont move

Hello, i have fume sim of the tornado. I need get sand effect. I use prt fume object then render it with ktakatoa, but particles dont move through volume. And I see standing pattern. How can i avoid it without PF and fumefx follow?

The PRT FumeFX was meant mainly for rendering the FumeFX Smoke data as a dense point cloud or in Voxel rendering mode, not for replacing advected particles. PRT FumeFX converts each voxel to one or more points. Since voxels don’t move, the points don’t move between frames, either.

To have moving particles, you need to advect them by the FumeFX velocities. You can use either PFlow + FumeFX Follow, or Stoke.

Thanks, stoke is help me. But how can i use density of the fume fx for density for stoke particles like prt_fumefx. When i apply age to density preset of magma flow its not working. But maybe i can somehow use density of fumefx directly to stoke by magma like prt_fumefx?

In general terms, the Smoke channel of FumeFX is loaded as Density by the Krakatoa PRT FumeFX, and by the Stoke Field Loader.
However, the Stoke Particle Simulator does not acquire the Density value of the FumeFX Grid when the FumeFX is picked as the Distribution Source.

Also, both the Krakatoa PRT FumeFX and the Stoke Particle Simulator use the Smoke (and Fire) channels to decide where to seed new particles which is a boolean decision - if the channel has a value above the specified threshold, a particle may be seeded.

If you want your Stoke Particle Simulator particles to get the Density value of the FumeFX voxel where they were born, you need to

  • Create a Krakatoa PRT FumeFX
  • Pick it as the Distribution Source in Stoke
  • Check the “Density” checkbox on the list of Channels to acquire
    In this case, the Density will remain constant throughout the life of the particle.
    If you want to fade off the Density over time, you can use a Magma modifier where the incoming Density is multiplied by (1-Age/LifeSpan) and is output as Density again.

If you want your Stoke Particle Simulator particles to get the actual Density of the Smoke in the voxels around them as they move through the simulation, you can either

  • use a Magma modifier that samples a Krakatoa PRT FumeFX via NearestParticle+ParticleQuery to get the Density channel of the closest particle,
  • use a Magma modifier that samples the FumeFX Grid using InputField and outputs its Smoke channel as Density (requires Krakatoa 2.3.1 or higher)
  • use a Stoke Field Loader to load the FXD files of the FumeFX simulation to do the same (but it makes little sense if you already have the FumeFX Grid object in the scene)
    This way, as the particle moves around, it will always get the value of the FumeFX grid at its position.
    WARNING: Since the Stoke object is always simulated in World Space, the Magma that samples the Density in the above examples should use only InputChannel Position without a ToWorld conversion operator to avoid double-transform if the Stoke object is not at the world origin.

I am sure you will have followup question, feel free to ask :slight_smile:

So, i have 2.1.8 version and i try last variant.
I created stoke_field aligned it with fumefx grid. In magma flow of the stoke_field i transfer smoke channel to density
And i stuck how transfere this density to stoke particles. I load it by krakatoa particles loader and when i input stoke_field to magma i can finde only position chanel.

And i try first variant but when rendering i get error : magma internal error at line 512 of file simple_compiller/ and it cut

1 input obj prt_fumefx plag it to nearestparticle to particles and to particlequery to particles. Expose density chanel in particlequery and plug it to density output. In lookup point plug inputChannel position.

That magmaflow sctipt on krakatoa loader

You are using an ancient public beta build of Krakatoa MX which is not only not supported, but does not contain the InputField node added to Krakatoa MX 2.3.1 and higher.

The alternative is, as I mentioned, using PRT FumeFX object and a NearestParticle + ParticleQuery flow to read the Density from the PRT FumeFX into the Stoke sim.

Here is the workflow:

  • Create a PRT FumeFX object.

  • Pick the FumeFX Grid as source.

  • Align the PRT FumeFX object’s pivot to the FumeFX Grid’s pivot.

  • Uncheck the Jitter Position option to create a grid of particles that sample the FumeFX grid.

  • Set the Seed In Smoke > Minimum to 0.0 to create a particle in every voxel with valid Smoke channel.

  • Add a Magma to the Stoke Particle Simulator

  • In the Magma Editor, create an Output node and set it to Density channel.

  • With the Output node still selected, create a NearestParticle operator from the Objects category (press O > P )

  • Drag and release a wire from its Particles socket to create an InputParticles object.

  • Pick the PRT FumeFX object as the source.

  • Select the NearestParticle operator again and press SHIFT+P to create an InputChannel Position - note that the Stoke particles are always in World Space, so no transform into World Space is needed here.

  • Select the NearestParticle operator again and press the button [Add Particle Query].

  • In the ParticleQuery operator, select Density from the drop-down list and press the Add… button

  • Press the Remove… button to remove the default Position channel output.

RESULT: At this point, the Density Output of the ParticleQuery should output to the Density of the flow.

You could visualize the values as Color by converting the Density output of the ParticleQuery to Vector and possibly dividing by some value (in my case, 500) to reduce the value within the 0-1 range for color display.

Here is the FumeFX grid I tested with, the Krakatoa PRT FumeFX made from it, the Stoke simulation emitting from the FumeFX grid and advecting using its Velocities, and the Density channel visualized as Black-To-Red gradient:

In Krakatoa MX 2.3.1 and higher, the steps are much simpler, as the Magma can read channels directly from the FumeFX grid using a dedicated InputFiled operator.

Hope this helps.

Thanks for help Bobo! And another question : if my fumefx grid stay not in origin point. If i create prtFumefx obj in origin, stoke particles will stay at fumefx grid place and prtFumefx particles will stay at the origin point. And it position do not coincide. It work anyway or need to create prtFunefx obj aligned to fumefx grid?

The Krakatoa PRT FumeFX object must be aligned to the FumeFX grid (it operates in object space, then transforms the particles based on where the PRT FumeFX Icon is). You can use the Align tool to match Pivot Point to Pivot Point in XYZ. If the FumeFX grid is also moving in space (keyframed transforms), you can link the PRT FumeFX to follow the FumeFX grid and stay aligned.

I am going to update my previous post to reflect that, as my FumeFX grid was at the origin, and that’s why my PRT FumeFX had to be there.

The Stoke simulation is always in world space, so the Magma modifier remains the same as I posted.

Thanks Bobo all work perfect. Thanks for help!