Houdini 21.0 Nodes APEX nodes

transform::ProjectOnSphericalPorthole

Projects a point onto a circular porthole on the surface of a sphere.

On this page
Since 21.0

Projects a point onto a circular porthole sitting on the surface of a sphere. The center of the porthole aligns with the lookataxis. The angle determines the size of the porthole as an angular offset from the lookataxis to the edge of the porthole.

In addition to the projected point position, this subgraph has several outputs that quantify the position of the projected point relative to the porthole’s surface. The lookataxis and lookupaxis collectively define a UV coordinate system on the surface of the porthole. As observed from the outside surface of the sphere, the u coordinate represents the horizontal coordinate with values that increase from 0 to 1 going from left to right. The v coordinate represents the vertical coordinate (aligned with the lookupaxis) with values that increase from 0 to 1 going from bottom to top. The center of the porthole is at UV coordinate (0.5, 0.5). The delta value is the normalized radial offset from the center of the porthole to the edge of the porthole.

Inputs

point: Vector3

The point’s position.

xform: Matrix4

A world matrix representing the position and scale of the sphere. Defaults to the identity matrix, which represents a sphere of radius 1 centered on the origin.

angle: Float

The maximum angular offset (in degrees) from the center of the porthole by which the point may vary. Defaults to 180 degrees.

lookataxis: Vector3

The local axis of the xform matrix that defines the direction of the window. Defaults to (1, 0, 0).

lookupaxis: Vector3

The local axis of the xform matrix that defines the up direction of the window. Defaults to (0, 1, 0).

Outputs

point: Vector3

The position of the projected point.

u: Float

A normalized longitude value in the range [0, 1] that represents the point’s horizontal position in the uv window.

v: Float

A normalized latitude value in the range [0, 1] that represents the point’s vertical position in the uv window.

delta: Float

A normalized value in the range [0, 1] that represents the magnitude of the angular offset between the porthole’s center and the porthole’s maximum angle.

See also

APEX nodes