Previous Topic (MagmaFlow Using Surface Operators) Up (Tutorials) Next Topic (Mixing Additive And Volumetric Shading)

Using PRT Loader Birth and Update Operators in Particle Flow

 Available in Krakatoa v1.5.0 and higher

Introduction

  • The Krakatoa PRT Loader Birth and Krakatoa PRT Loader Update operators were designed as replacement of the Krakatoa File Birth and Krakatoa File Update operators.
  • They provide the following benefits compared to their older counterparts:
    • The Krakatoa PRT Loader Birth and Krakatoa PRT Loader Update use a PRT Loader's particle stream to load particles and respect all its settings including
    • Both Operators support the Viewport and Render % spinners in Particle Flow, allowing the display of a fraction of all particles on top of the control provided by the Render Percentage in PRT Loader. This can be very useful when working with millions of particles - the old operators could only show 100% in the viewport, causing problems in real world production.

Workflow Examples

Creating a PRT File Sequence

  • To demonstrate the features of the new Operators, let's create a simple Particle Flow:

  • On frame 32, it looks like this in the viewport:

  • Using Krakatoa in Save Particles To File Sequence mode, we save the animation of these particles to a PRT sequence using Position, Velocity, ID, Orientation and Scale channels.

Reloading the PRT File Sequence

  • We can now disable the first Particle Flow system.
  • When we create a PRT Loader and load the saved files into the scene, the viewport looks like this:

  • Now let's create a second Particle Flow system:

  • In the Krakatoa PRT Loader Update operator, we can check all channels we previously saved.

  • We can move the PRT Loader to the side and reenable the original Particle Flow to compare:

  • If we would change the Viewport percentage in the second Particle Flow's System rollout to 50%, it would show 50% of the particles.

  • And here is 10% Viewport:

Applying Forces To The Reloaded Particles

  • Let's uncheck "Use Node Transform" in the PRT Loader - the particles will move to the original location while the PRT Loader's icon will remain offset for easier selection.
  • If we would disable the loading of the Positions channel in the Krakatoa PRT Loader Update operator, the particles will be positioned initially only by the Birth operator and then move only based on the velocity and the PFlow integrator.
  • For example, we could create a wind force blowing sideways, add a Force operator and pick the Wind in it.

  • The result is our particles moving sideways away from the original positions loaded by the PRT Loader:

Deforming Particles

  • As mentioned already, all deformations applied to the PRT Loader will be taken into account by the Particle Flow using the PRT Loader Update operator.
  • This means that you can apply Bend, Twist, Path Deform or even Free Form Deformations to your Particle Flow particles by working with the PRT Loader.
  • Here is the flow bent at -45 degrees:

  • And here is a Path Deformed particle system moving along a spline. All the controls like Stretch, Percent along the path, Rotation and Twist can be used, resulting the the Particle Flow particles following the deformations:

  • And this is a 4x4x4 FFD applied to the PRT Loader and indirectly to the Particle Flow:

Culling Particles

  • As with deformations, culling particles in the PRT Loader will affect the particles loaded into Particle Flow.
  • Other than the Krakatoa Geometry Test operator available in Particle Flow since Krakatoa v1.1.0, this method is history-independent.
  • Particles can get culled and then reappear again on the other side of the culling volume:

Using The Color Channel

 WARNING!!!
 Enabling the Color channel in the Krakatoa PRT Loader Update in 3ds Max 9, 2008 and pure 2009
 will cause a Particle Flow error which cannot be closed - a restart of 3ds Max will be required. 
 This is a known bug in Particle Flow which has been fixed in 3ds Max 2009 with Creative Extension
 and 3ds Max 2010. The following discussion applies to the latter versions only!
  • Since the PRT Loader provides a Color Channel in its particle stream even if the loaded PRT file sequence does not provide one, it is also possible to enable the loading of the particle color found in the PRT Loader as the Vertex Color channel of the Particle Flow system.
    • For example, a PRT sequence without a Color Channel will use the Object Wireframe Color of the PRT Loader if no material is assigned.
    • If we would select the Color channel to be loaded by the Krakatoa PRT Loader Update operator, the Vertex Color Channel of the Particle Flow will be set to the same color.
    • We can see this by right-clicking the PF_Source object and in the Particle View>Properties... dialog, check Vertex Channel Display with Vertex Color selected. Check Shaded if desired.
 Note:
 In order to render the Vertex Colors of the Particle Flow, you will have to add a Vertex Color Map
 to the Diffuse map slot of the Material assigned using a Material Dynamic Operator.
  • Here is the Particle Flow of a PRT Loader with dark blue Object Color:

  • Of course, if we would set the Color channel to something else, we would get the data visualized by the Vertex Colors of the Particle Flow.
    • For example, let's add a KCM to the PRT Loader and change the Input from Channel to Vector with orange color, we get this:

  • Even better, we can take other channels like Velocity or Position and turn them into Color.
  • Here is the Position Channel multiplied by 0.005 and copied to the Color Channel:

  • Since the KCMs respect the deformations before them on the stack, if we add a Bend Modifier and bend the system to the one side, the colors will change because the X (Red) component will change in the KCM Position Channel Input:

  • Here is the result of the same Bend modifier with 90 degrees Angle and -90 degrees Direction:

SUMMARY

  • As you can see from the examples about, the Krakatoa toolset (PRT Loader and PFlow Operators) can now be used to manipulate dynamically Particle Flows including caching, retiming, culling, deformations, channel editing etc.
  • These abilities can be used independently from the Krakatoa Renderer, for example if you need a PRT sequence rendered as Shapes in Scanline or another renderer, you can use the Krakatoa tools to tweak the system to your liking and use Particle Flow to provide the final render mesh to the renderer of your choice.

SEE ALSO