Lookat example file
This example shows how to use the Lookat POP to make copied geometry point in a particular direction. This is useful when the copied geometry should always be seen face on, like sprites for example.
Three particles are birthed on a grid. They are assigned an up vector to give the particle some frame of reference. The up vector is the y axis, rotated by however much the camera path is rotated.
The Lookat works by applying a transformation that will rotate the z axis to point towards the requested direction. By making the up vector point in the same direction as the plane that the camera moves, the instanced grids' up direction will always be oriented correctly.
The Suppress Rule POP is here to tell Houdini not to apply the default position rules which usually advance the particle positions by its velocity. In this example, we just want the particles to stay still and rotate.
Finally, the Lookat POP applies a transformation so that the particle’s z axis will point towards the z axis of cam1.