Houdini 21.0 Nodes APEX nodes

transform::ProjectOnSphericalWindow

Projects a point onto a rectangular window located on the surface of a sphere.

On this page
Since 21.0

Projects a point onto a rectangular window sitting on the surface of a sphere. The center of the window aligns with the lookataxis. The urange and vrange determine the size of the window as angular offsets from the lookataxis to the horizontal and vertical window edges. As observed from the outside surface of the sphere, the horizontal window direction increases from left to right, and the vertical window direction increases from bottom to top, with the up direction aligned to the lookupaxis.

In addition to the projected point position, this subgraph has several outputs that quantify the position of the projected point relative to the window’s surface. 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 with values that increase from 0 to 1 going from bottom to top. The center of the window is at UV coordinate (0.5, 0.5).

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.

urange: Vector2

Represents the minimum and maximum longitudinal range (in degrees). Defaults to (-180, 180), representing the full range.

vrange: Vector2

Represents the minimum and maximum latitudinal range (in degrees). Defaults to (-90, 90), representing the full range.

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.

See also

APEX nodes