Krakatoa Geometry Lookup Operator

Available in Krakatoa v1.1.2 and higher

Introduction

../../../_images/krakatoa_geometry_lookup_operator.png
  • This bonus operator introduced in Krakatoa v1.1.2 uses the same kdTree acceleration structure as the Krakatoa Geometry Test, the PRT Loader’s Culling feature and the Krakatoa Magma IntersectRay and NearestPoint operators.
  • It provides a very fast way for finding the closest point from a particle to a geometry surface and acquiring the surface properties including face index, barycentric coordinates, smoothed surface normal and texture mapping coordinates.

Why Use This Operator

  • The Krakatoa Geometry Lookup operator is similar to some existing operators or workflows already available in Particle Flow.
  • It is typically two to three times faster than comparable operators found in Particle Flow Tools Box #1 and #3 and many orders of magnitude faster than using the Speed By Surface + Rotate In Speed Space combination of standard operators.

Birth of 1M particles, Position Object Surface with 100,000 faces, 2 Omni Lights

Particle Flow Setup Total Time Update PFlow Krakatoa Rendering Time
Rendering Without Normals 7 seconds 2 seconds 5 seconds
PFlow Speed By Surface -> Rotation Speed Space -> Speed = 0 14344 seconds 14337 seconds 5 seconds
Data Operator 39 seconds 2+32 seconds Birth+DataOp 5 seconds
Krakatoa Geometry Lookup -> Normals to TM 16 seconds 2+9 seconds Birth+Lookup 5 seconds
Rendering From Cache 5 seconds   5 seconds
  • As you can see from the above example, the normal acquisition of 1 million particles from 100,000 faces takes 9 seconds using the Krakatoa Geometry Lookup operator.
  • This is over 3.5 times faster than a Data Operator and 1593 times faster than the standard Particle Flow setup which took almost exactly FOUR HOURS.

User Interface Controls

Max search radius

  • This value defines the maximum distance to consider while searching for surface points.
  • Default is 10 generic units.

Pick Object Button

  • This pick button can be used to define the surface to search.

Remove Object

  • This button can be used to remove the object from the operator.
  • This disables the operator and removes any dependencies on the picked object.

Point position

Use

  • This checkbox enables the point position copying to a Particle Flow channel.
  • When unchecked, the closest Point Position will not be copied to a channel.
  • When checked, the Point Position will be copied as follows:

Put into:

  • These radio buttons define the target channel to copy the Point Position to.

MXS Vector

  • Copy the Point Position to the Script Vector Channel.
  • This is selected by default.

UVW Ch:

  • Copy the Point Position to the Particle Mapping Channel defined by the corresponding spinner.
  • Default is 2.

Barycentric coords

Use

  • This checkbox enables the copying of the Barycentric Coordinates to Particle Flow channels.
  • When unchecked, the closest Point’s Face Index and Barycentric will not be copied to channels.
  • When checked, the data will be copied as follows:

Put into:

  • These radio buttons define the target channel to copy the barycentric coordinates to.

Face id-> MXS Integer

  • Copy the Point Position to the Script Vector Channel.
  • This is hard coded.

Bary -> UVW Ch:

  • Copy the Barycentric coordinates to the Particle Mapping Channel defined by the corresponding spinner.
  • Default is 3.

Left-shift coordinates (for use with box3)

  • Formats the values for use with Particle Flow Box #3.

Normal Vector

Use

  • This checkbox enables the copying of the Surface’s Normal Vector to a Particle Flow channel.
  • When unchecked, the closest Point’s Surface Normal Vector will not be copied to a channel.
  • When checked, the data will be copied as follows:

Put into:

  • These radio buttons define the target channel to copy the Normal Vector to.

TM

  • Create a Transformation Matrix using the Normal Vector as the X axis and set the orientation of the particle to it in the Particle Matrix channel.

MXS Matrix

  • Create a Transformation Matrix using the Normal Vector as the X axis and copy to the Script Matrix channel.

UVW Ch:

  • Copy the Surface Normal Vector to the specified Particle Mapping Channel.
  • Default is 4.

Surface UVW at point:

Use

  • This checkbox enables the copying of the Surface’s Texture Coordinates to a Particle Flow channel.
  • When unchecked, the closest Point’s Surface Texture Coordinate will not be copied to a channel.
  • When checked, the data will be copied as follows:

Sample UVW ch:

  • This spinner defines the channel to sample from.
  • Default is 1.

UVW Channel:

  • This spinner defines the channel to write to.
  • Default is 5.