RSS< Twitter< etc

Stoke Particle Simulator Animating Krakatoa PRT Maker

Work In Progress, Last Edited April 25, 2013 


The following tutorial discusses the use of the Stoke Particle Simulator to turn otherwise static particle objects into dynamic systems.

This tutorial requires Krakatoa MX 2.1.8 or higher to be installed on the system (either the FREE Evaluation version or the commercial version)

The Base Scene

We will create the test scene from scratch:  

  • From the Krakatoa menu, select Open PRT Maker Designer UI.
  • Click the Create PRT Maker button.
  • Select the PRT Maker and scale it up 10 times (1000%)
  • In the PRT Maker base object, enter 10000 for Render Count and then uncheck the View Count checkbox - as result, the viewport and renderer will use 10,000 particles.
  • Create a Wind Space Warp at the world origin (which is also the default location of the PRT Maker).
  • Set the Wind to Spherical
  • Set the Force Strength to 0.1, Wind Turbulence to 1.0,  Frequency to 0.01 and  Scale to 0.05

Creating a Basic Stoke Simulation

 Let's create a Stoke MX object that emits from the PRT Maker and is driven by the Wind Space Warp: 

  • Select the PRT Maker and the Wind Space Warp and click the Stoke icon, then click in the viewport to create the Stoke object - the PRT Maker will be added as a Distribution object and a Velocity Source, while the Wind will be added as Velocity Source only. 
  • Select the PRT Maker on the Velocity Sources list and press Remove - it has no Velocities and we don't want it there.
  • Switch the Display to Velocity in order to show lines instead of Large Dots.
  • Click the SIMULATE button  

RESULT: 100 particles will be emitted on each frame using random seed particles from the 10,000 available in the PRT Maker:

Replicating By ID Channel

This is not what we want to do though - we want one particle to be created for each of the 10,000 particles in the PRT Maker. 

  • Select the PRT Maker in the Distribution sources list
  • Check the option "Use Seed Count As Rate" - this will take the count of the source system and create one Stoke particle for each source particle.
  • Press the SIMULATE button  - the simulation will take significantly longer 

RESULT: What we get is still not what we want - we are generating 10,000 particles per frame for a total of 1 million on the last frame, but we want to create only on the first frame. This is because the PRT Maker has no valid ID channel to track the birth of the particles.

Generating An ID Channel Using Krakatoa Magma

We have to create our own ID channel for any object that does not provide its own ID channel - this includes PRT Maker, PRT Volume, PRT Surface, PRT FumeFX etc. PRT Loaders can contain an ID channel if it was included during the PRT file saving and the saved source had one - Particle Flow, Thinking Particles, Naiad and RealFlow all can produce PRTs with a valid ID channel, while Max Legacy Particles for example do not have one. 

  • Select the PRT Maker and add a new Magma modifier. (We could use the existing one which sets the Color channel of the PRT Maker, but it is a better idea to keep the two separate for now)
  • Open the Magma Editor
  • Press Ctrl+SPACEBAR to open the ActiveType tool and type outid
  • Press Enter to confirm the creation of the Output ID channel.
  • Press Ctrl+SPACEBAR again and enter index

  • Check the >AUTO option and close the Editor.
  • Select the Stoke MX object and press SIMULATE again

RESULT: This time, only 10,000 particles will be created on frame 1 and animated by the Wind over time, because all seed particles' IDs are marked as used and will not generate any more particles:

Acquiring All Channels

In order to replicate the original PRT Maker completely, we can acquire all channels detected in the Distribution source. 

  • Select the Stoke MX object and check the ColorScalar, RandomValue, Color and Emission channels.
  • Switch the Display to Large Dots again to match the display of the PRT Maker.
  • Hide the PRT Maker source.
  • Press SIMULATE again. 

RESULT: The Color channel of the Stoke particles will now show the color acquired from the Distribution particles at creation time:

Accessing The Acquired Channels

Not only did we copy the Color channel to match the exact look of the PRT Maker before emission, but we also acquired all its other channels needed to affect the particles using Magma modifiers.

For example, we could generate a new Color distribution based on the ColorScalar channel generated by the PRT Maker, and the Stoke particles would apply the exact same colors without the need to resimulate

  • Unhide the PRT Maker and select it.
  • Copy the second from top Magma modifier responsible for the Color generation from the PRT Maker and paste as instance on the Stoke object's stack.
  • Open the Magma Editor and change the red and blue colors to cyan and yellow (for example by swapping them with their Complementary colors)

RESULT: Without performing any simulation, both the PRT Maker and the Stoke particles generate the same colors!

The new colors are fully dynamic - disabling the instanced Magma modifier on either object would turn off the color generation of the PRT Maker, and would reveal the baked red and blue Colors from the simulation run in the Stoke particles!


Stoke MX lets you replicate a particle system with a valid ID channel and acquire all its channels at particle birth. This will let you turn otherwise non-animatable particle clouds into dynamic systems.