Previous Topic (Options PFlow Operator) Up (Contents) Next Topic (Krakatoa Geometry Test)

File Operators in Particle Flow

  Available in: Krakatoa v1.1.0 and higher.

Krakatoa v1.1.0 replaces the Krakatoa File Birth and Krakatoa File Position operators available in earlier versions with the more advanced FileBirth Operator, FileUpdate Operator and FileID Test.

File Birth Operator

  • The File Birth Operator can be used to give birth to particles according to a particle file sequence.
  • Other than the legacy Krakatoa File Birth operator which could load only a static frame, this operator allows the dynamic creation and, in combination with the File ID Test operator discussed below, removal of particles to match the behavior of the actual file sequence. For this feature to be usable, the sequence must contain a valid Born ID channel. The operator will compare two consecutive files from the sequence and determine which particles from the current frame's file do not exist in the previous file. These particles have to be added to the flow.
  • The Operator provides the following controls:
    • Particle File - click the [...] button to open a file picker and select a valid PRT, CSV or BIN particle file or file sequence. If the selected file does not contain an ID channel, a prompt will appear and the particle order will be used instead, potentially leading to incorrect results.
    • Frame Offset - this integer value can be used to offset the particle sequence in time.
    • Single Frame Only - when checked, only the exact file name specified in the Particle File field will be loaded regardless of the current time. When unchecked (default), the frame number of the file (if available) will be replaced with the current time signature and the attempt will be made to load the file as a frame of a particle file sequence.
    • Limit To Custom Range - when checked, the two Range spinners will be used to clamp the file sequence in a user-defined interval. Any attempt to load a lower or higher frame number than the specified Range will result in the frame with number corresponding to the range limit to be loaded instead. This is to prevent from loading non-existent frames.
    • Link To Object TM - when checked, the Transformation Matrix of the PFlow Emitter object will be used to transform the particle positions and velocities. When unchecked (default), positions and velocities will be loaded in absolute world coordinates.

File Update Operator

  • The File Update Operator can be used to apply particle data from a particle file sequence to existing PFlow particles, typically created by the File Birth operator.
  • It also compares the particle IDs from the previous and the current frame and marks those that have to die in a dedicated FileID channel. The values from this channel can be tested using the Krakatoa File ID Test.

Features

  • The operator can be set up to read any of the available channels in the particle sequence and
    • Write them to their default corresponding channels in PFlow (i.e. Position->Position, Color->Color etc.)
    • Redirect the data to other channels with the same data type (i.e. Color->TextureCoords; Normals->Mapping#10 etc.)
    • Combine the incoming with the existing data using Blend or Add modes
    • Blend amounts can be keyframed over time (for example blend 60% of file's Velocities with 40% of particle velocities; add 30% of file's velocities to the existing velocities etc.)
  • The Operator provides the following controls:
    • Particle File - click the [...] button to open a file picker and select a valid PRT, CSV or BIN particle file or file sequence. If the selected file does not contain an ID channel, a prompt will appear and the particle order will be used instead, potentially leading to incorrect results.
    • Channel Setup - this button opens the modeless Channel Setup dialog.
    • Frame Offset - this integer value can be used to offset the particle sequence in time.
    • Single Frame Only - when checked, only the exact file name specified in the Particle File field will be loaded regardless of the current time. When unchecked (default), the frame number of the file (if available) will be replaced with the current time signature and the attempt will be made to load the file as a frame of a particle file sequence.
    • Limit To Custom Range - when checked, the two Range spinners will be used to clamp the file sequence in a user-defined interval. Any attempt to load a lower or higher frame number than the specified Range will result in the frame with number corresponding to the range limit to be loaded instead. This is to prevent from loading non-existent frames.
    • Link To Object TM - when checked, the Transformation Matrix of the PFlow Emitter object will be used to transform the particle positions and velocities. When unchecked (default), positions and velocities will be loaded in absolute world coordinates.

Channel Setup

  • The Channel Setup button opens a new floating dialog showing all Particle Channels found in the currently selected file sequence.
    • The Checkbutton represents the name, type and loading state of a Particle Channel. When checked, the channel will be loaded. When unchecked, it will be ignored.
    • The Color Swatch symbolizes the Arity (number of components) in the Channel.
      • Red= One Component, i.e. Float or Integer value
      • Green = Two Components (2D vector)
      • Blue = Three Components (3D vector like Position, Velocity, Color, Normal etc.)
      • Yellow = Four Components (Quaternion like Orientation)
    • The Target Channel drop-down list shows possible Particle Flow channels the File Data could be copied to. This list is currently hard-coded but could be expanded.
    • The Blend Mode drop-down list shows the available data blending modes (Blend and Add). Default is Blend.
    • The Blend Amount spinner shows the amount of data to be blended with the existing values in the Channel.
      • The default value is 100.0, which in Blend mode means "Replace existing data with File Data".
      • The Blend Amount value is keyframable over time, allowing for gradual blending of data over time.
      • Since blending the Particle ID makes no sense, the spinner will be disabled for the ID channel.
    • The Keys [>>] button provides additional features related to keyframing the Blend Amount spinner.
      • Currently, the only available feature is Delete All Keys which removes the Blend Amount animation from the Channel.

Krakatoa File ID Test

  • The File ID Test can be used to compare values stored in the custom File ID channel crated by the File Birth Operator to determine which particles have died on the current frame according to the particle sequence.
  • The File ID channel of "to die" particles will be set to -1 so the default settings will send out any particles that have "left" the sequence. Wiring the File ID Test to an Event containing a Delete operator would remove these particles from the flow.
  • The test can also be used to split particles whose File ID channel is in a certain range by using the Less Than, Greater Than, Or and And options to specify a test range. For example, to split particles whose File ID (which is typically the Born ID from a saved Particle Flow) is between 100 and 542, you could check the "Greater Than" option, set its value to 100 and enter 542 in the Less Than field.
 WARNING: Loading a particle file sequence containing duplicated IDs 
 will affect all particles matching the ID range.
 For example, if two Particle Flow systems were saved to the same PRT file, 
 resulting in more than one particle with the same ID, and you set the ID Test
 to send out particles with IDs between 0 and 100, BOTH sets of particles from
 the two PFlows in that ID range will be sent out.